Skip to content

Commit

Permalink
Fixes according to review
Browse files Browse the repository at this point in the history
  • Loading branch information
calebk1 committed Nov 16, 2021
1 parent 2b40393 commit 8377ac9
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 73 deletions.
52 changes: 26 additions & 26 deletions using-mobile-extensions/adobe-campaignclassic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,43 @@
4. Click **Save**.
5. Complete the publishing process to update the SDK configuration.

For more information about publishing, see [Publishing](https://experienceleague.adobe.com/docs/launch/using/publish/overview.html).
For more information about publishing, see the [publishing overview](https://experienceleague.adobe.com/docs/launch/using/publish/overview.html).

### Configure Campaign Classic extension

![Configuring the Campaign Classic extension](../../.gitbook/assets/acc-configure-extension.png)

{% hint style="info" %}
You can retrieve your Campaign Classic registration on tracking endpoint URLS in the Campaign Classic interface under the **Tools > Advanced > Deployment wizard** menu. The endpoint for push notifications is usually the same as the URL that is used for web forms and surveys.
You can retrieve your Campaign Classic registration or tracking endpoint URLS in the Campaign Classic interface under the **Tools > Advanced > Deployment wizard** menu. The endpoint for push notifications is usually the same as the URL that is used for web forms and surveys.
{% endhint %}

#### Registration endpoints

Type the registration endpoint URL\(s\) for your Campaign Classic instances. You can specify up to three unique endpoints for your development, staging, and production environments.
Type the registration endpoint URL(s) for your Campaign Classic instances. You can specify up to three unique endpoints for your development, staging, and production environments.

{% hint style="warning" %}
For this extension, the registration endpoint URLs should be entered **without** a prefixing `https://.`
{% endhint %}

#### Tracking endpoints

Type the tracking endpoint URL\(s\) for your Campaign Classic instances. Like the registration URLs, you can specify up to three unique endpoints for your development, staging, and production environments.
Type the tracking endpoint URL(s) for your Campaign Classic instances. Like the registration URLs, you can specify up to three unique endpoints for your development, staging, and production environments.

{% hint style="warning" %}
For this extension, the tracking endpoint URLs should be entered **without** a prefixing `https://.`
{% endhint %}

#### Integration key \(iOS\)
#### Integration key (iOS)

You can specify up to three unique iOS integration keys for your development, staging, and production environments. iOS integration keys are generated after creating a service that contains iOS applications using the Campaign Classic [client console](https://experienceleague.adobe.com/docs/campaign-classic/using/installing-campaign-classic/connect-to-campaign/installing-the-client-console.html). For more information on where to find the integration key, see [Configuring the mobile application in Adobe Campaign](https://experienceleague.adobe.com/docs/campaign-classic/using/sending-messages/sending-push-notifications/configure-the-mobile-app/configuring-the-mobile-application.html).
You can specify up to three unique iOS integration keys for your development, staging, and production environments. iOS integration keys are generated after creating a service that contains iOS applications using the [Campaign Classic client console](https://experienceleague.adobe.com/docs/campaign-classic/using/installing-campaign-classic/connect-to-campaign/installing-the-client-console.html). For more information on where to find the integration key, see the tutorial on [configuring the mobile application in Adobe Campaign](https://experienceleague.adobe.com/docs/campaign-classic/using/sending-messages/sending-push-notifications/configure-the-mobile-app/configuring-the-mobile-application.html).

#### Integration key \(Android\)
#### Integration key (Android)

Specify up to three unique Android integration keys for your development, staging, and production environments. Like iOS, the Android integration keys are generated after creating a service that contains Android applications using the Campaign Classic [client console](https://experienceleague.adobe.com/docs/campaign-classic/using/installing-campaign-classic/connect-to-campaign/installing-the-client-console.html). For more information on where to find the integration key, see [Configuring the mobile application in Adobe Campaign](https://experienceleague.adobe.com/docs/campaign-classic/using/sending-messages/sending-push-notifications/configure-the-mobile-app/configuring-the-mobile-application-android.html).
You can specify up to three unique Android integration keys for your development, staging, and production environments. Android integration keys are generated after creating a service that contains Android applications using the [Campaign Classic client console](https://experienceleague.adobe.com/docs/campaign-classic/using/installing-campaign-classic/connect-to-campaign/installing-the-client-console.html). For more information on where to find the integration key, see the tutorial on [configuring the mobile application in Adobe Campaign](https://experienceleague.adobe.com/docs/campaign-classic/using/sending-messages/sending-push-notifications/configure-the-mobile-app/configuring-the-mobile-application-android.html).

#### Request timeout

Time, in seconds, to wait for a response from the registration or tracking endpoint before timing out. The SDK default timeout value is 30 seconds.
The response timeout is the amount of time, in seconds, to wait for a response from the registration or tracking endpoint before timing out. The SDK default timeout value is 30 seconds.

## Add Campaign Classic to your app

Expand Down Expand Up @@ -79,9 +79,9 @@ Time, in seconds, to wait for a response from the registration or tracking endpo

or you can manually include the [Mobile Core](https://github.com/Adobe-Marketing-Cloud/acp-sdks/releases/tag/v1.0.1-ACPCore) and [Campaign Classic](https://github.com/Adobe-Marketing-Cloud/acp-sdks/releases/tag/v1.0.0-ACPCampaignClassic) libraries found in Github.

2. In Xcode project, import the Mobile Core and Campaign Classic extensions:
2. In the Xcode project, import the Mobile Core and Campaign Classic extensions:

**Objective C**
**Objective-C**

```objectivec
#import "ACPCore.h"
Expand Down Expand Up @@ -128,18 +128,7 @@ public class CampaignClassicTestApp extends Application {
{% endtab %}

{% tab title="iOS" %}
In your App's `application:didFinishLaunchingWithOptions:` method, register the Campaign Classic and Lifecycle extensions:

#### Objective C

```objectivec
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[ACPCampaignClassic registerExtension];
[ACPLifecycle registerExtension];
// Override point for customization after application launch.
return YES;
}
```
In your app's `application:didFinishLaunchingWithOptions:` method, register the Campaign Classic and Lifecycle extensions:

#### Swift

Expand All @@ -151,24 +140,35 @@ func application(_ application: UIApplication, didFinishLaunchingWithOptions lau
return true;
}
```

#### Objective-C

```objectivec
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[ACPCampaignClassic registerExtension];
[ACPLifecycle registerExtension];
// Override point for customization after application launch.
return YES;
}
```
{% endtab %}
{% endtabs %}

## Configuration keys

To update SDK configuration programmatically, use the following information to change your Campaign Classic configuration values. For more information, see [Configuration API reference](https://aep-sdks.gitbook.io/docs/using-mobile-extensions/mobile-core/configuration/configuration-api-reference).
To update SDK configuration programmatically, use the following information to change your Campaign Classic configuration values. For more information, see the [Configuration API reference](https://aep-sdks.gitbook.io/docs/using-mobile-extensions/mobile-core/configuration/configuration-api-reference).

| Key | Required | Description | Data Type |
| :--- | :--- | :--- | :--- |
| `build.environment` | Yes | Specifies which environment to use \(prod, dev, or staging\) when sending registration and tracking information. It is also used to specify which mobile app integration key to use. | String |
| `build.environment` | Yes | Specifies which environment to use (prod, dev, or staging) when sending registration and tracking information. It is also used to specify which mobile app integration key to use. | String |
| `campaignclassic.timeout` | No | Specifies the amount of time to wait for a response from the Campaign Classic registration or tracking server. | Integer |
| `__dev__campaignclassic.marketingServer` | No | Sets the development environment marketing server, which receives registration requests. | String |
| `__dev__campaignclassic.trackingServer` | No | Sets the development environment tracking server, which receives tracking requests. | String |
| `__dev__campaignclassic.ios.integrationKey` | No | Sets the development environment iOS mobile app integration key, which links the app to an iOS application campaign in Campaign Classic. | String |
| `__dev__campaignclassic.android.integrationKey` | No | Sets the development environment Android mobile app integration key, which links the app to an Android application campaign in Campaign Classic. | String |
| `__stage__campaignclassic.marketingServer` | No | Sets the staging environment marketing server, which receives registration requests. | String |
| `__stage__campaignclassic.trackingServer` | No | Sets the staging environment tracking server, which receives tracking requests. | String |
| `__stage__campaignclassic.ios.integrationKey` | No | Sets the staging environment iOS mobile app integration key, which links the app to an iOS application campaign in Campaign Classic. | String |
| `__stage__campaignclassic.ios.integrationKey` | No | Sets the staging environment iOS mobile app integration key, which links the app to an iOS application campaign in Campaign Classic. | String |
| `__stage__campaignclassic.android.integrationKey` | No | Sets the staging environment Android mobile app integration key, which links the app to an Android application campaign in Campaign Classic. | String |
| `campaignclassic.marketingServer` | Yes | Sets the production environment marketing server, which receives registration requests. | String |
| `campaignclassic.trackingServer` | Yes | Sets the production environment tracking server, which receives tracking requests. | String |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ String campaignClassicExtensionVersion = CampaignClassic.extensionVersion();
{% endtab %}

{% tab title="iOS" %}
### Objective-C
### Swift

**Example**

```objectivec
NSString *campaignClassicExtensionVersion = [ACPCampaignClassic extensionVersion];
```swift
let campaignClassicExtensionVersion = ACPCampaignClassic.extensionVersion()
```

### Swift
### Objective-C

**Example**

```swift
let campaignClassicExtensionVersion = ACPCampaignClassic.extensionVersion()
```objectivec
NSString *campaignClassicExtensionVersion = [ACPCampaignClassic extensionVersion];
```
{% endtab %}
{% endtabs %}
Expand All @@ -42,7 +42,7 @@ The `registerDevice` API lets you register a user device with Campaign Classic.
{% tab title="Android" %}
### Java

To prepare your app to handle push notifications, see the tutorial on [setting up a Firebase Cloud Messaging client app on Android](https://firebase.google.com/docs/cloud-messaging/android/client). After you receive the Firebase Cloud Messaging \(FCM\) SDK registration token, send this token and the device information to Campaign Classic by using the `registerDevice` API.
To prepare your app to handle push notifications, see the tutorial on [setting up a Firebase Cloud Messaging client app on Android](https://firebase.google.com/docs/cloud-messaging/android/client). After you receive the Firebase Cloud Messaging (FCM) SDK registration token, send this token and the device information to Campaign Classic by using the `registerDevice` API.

The `registerDevice` API registers a device with your Campaign Classic registration server. It takes the FCM registration token as a parameter with a user key that identifies a user, such as an email address or a login name. You can also provide a map of the custom key-value pairs that you want to associate with the registration. A boolean value is returned in the callback, which signals whether the registration was successful.

Expand Down Expand Up @@ -82,9 +82,21 @@ public void onNewToken(String token) {
{% endtab %}

{% tab title="iOS" %}
{% hint style="info"}
To get your app ready to handle push notifications, see the tutorial on [configuring remote notification support](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1). After you receive the Apple Push Notification service (APNs) token, send this token and the device information to Campaign Classic using the `registerDevice` API.

The `registerDevice` API registers a device with your Campaign Classic registration server. It takes the APNS token as a parameter with a user key that identifies a user, such as an email address or a login name. You can also provide a map of the custom key-value pairs that you want to associate with the registration. A boolean value is returned in the callback, which signals whether the registration was successful.
{% endhint %}

### Swift

**Example**

```swift
ACPCampaignClassic.registerDevice(deviceToken, userKey: userKey, additionalParams: additionalParams, callback: {(_ success: Bool?) -> Void in
NSLog("Registration Status: %d", success)
})
```

### Objective-C

Expand All @@ -107,15 +119,6 @@ The `registerDevice` API registers a device with your Campaign Classic registrat
NSLog(@"Registration Status: %d", success);
}
```

### Swift

**Example**

```swift
ACPCampaignClassic.registerDevice(deviceToken, userKey: userKey, additionalParams: additionalParams, callback: {(_ success: Bool?) -> Void in
NSLog("Registration Status: %d", success)})
```
{% endtab %}
{% endtabs %}

Expand All @@ -125,11 +128,10 @@ The `trackNotificationReceive` API sends the received push notification's tracki

{% tabs %}
{% tab title="Android" %}

The `trackNotificationReceive` API sends the received push notification's tracking information to the configured Adobe Campaign Classic server. If `trackInfo` is null or does not contain the necessary tracking identifiers, `messageId` \(`_mId`\) and `deliveryId` \(`_dId`\), no track request is sent.

### Java

If `trackInfo` is null or does not contain the necessary tracking identifiers, `messageId` (`_mId`) and `deliveryId` (`_dId`), no track request is sent.

**Syntax**

```java
Expand Down Expand Up @@ -160,9 +162,18 @@ public class MyFirebaseMessagingService extends FirebaseMessagingService {
{% endtab %}

{% tab title="iOS" %}
### trackNotificationReceive

The `trackNotificationReceive` API sends the received push notification's tracking information to the configured Adobe Campaign Classic server. You might pass the `launchOptions` that were received before opening the application or `userInfo` , which contains the received push payload in `trackInfo`. If `trackInfo` is null or does not contain the necessary tracking identifiers, `broadlogId` \(`_mId`\) and `deliveryId` \(`_dId`\), no track request is sent.
{% hint style="info" %}
Please note that you can pass the `launchOptions` that were received before opening the application or `userInfo` , which contains the received push payload in `trackInfo`. If `trackInfo` is null or does not contain the necessary tracking identifiers, `broadlogId` (`_mId`) and `deliveryId` (`_dId`), no track request is sent.
{% endhint %}

### Swift

**Example**

```swift
ACPCampaignClassic.trackNotificationReceive(trackInfo[String:String])
```

### Objective-C

Expand All @@ -187,13 +198,6 @@ The `trackNotificationReceive` API sends the received push notification's tracki
}
```

### Swift

**Example**

```swift
ACPCampaignClassic.trackNotificationReceive(trackInfo[String:String])
```
{% endtab %}
{% endtabs %}

Expand All @@ -203,13 +207,12 @@ The `trackNotificationClick` API sends the clicked push notification's tracking

{% tabs %}
{% tab title="Android" %}
### Java

{% hint style="info" %}
If `trackInfo` is null, or does not contain the necessary tracking identifiers, `messageId` (`_mId`) and `deliveryId` (`_dId`), a track request is **not** sent.
{% endhint %}

### Java

**Syntax**

```java
Expand Down Expand Up @@ -250,6 +253,13 @@ public void onResume() {
You can pass the `launchOptions` that was received before opening the application or `userInfo`, which contains the received push payload in `trackInfo`. If `trackInfo` is null or does not contain the necessary tracking identifiers, `broadlogId` (`_mId`) and `deliveryId` (`_dId`), a track request is **not** sent.
{% endhint %}

### Swift

**Example**

```swift
ACPCampaignClassic.trackNotificationClick(trackInfo[String:String])
```

### Objective-C

Expand All @@ -270,14 +280,6 @@ You can pass the `launchOptions` that was received before opening the applicatio
completionHandler();
}
```

### Swift

**Example**

```swift
ACPCampaignClassic.trackNotificationClick(trackInfo[String:String])
```
{% endtab %}
{% endtabs %}

Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

The following events are handled by the Adobe Campaign Classic extension:

### Campaign Request Content <a id="campaignclassic-content-request"></a>
### Campaign request content <a id="campaignclassic-content-request"></a>

This event is a request to make a registration or a track \(receive or click\) call and is generated by the API when the following conditions are met:
This event is a request to make a registration or a track (receive or click) call and is generated by the API when the following conditions are met:

* When a registration request needs to be sent \(`registerDevice`\).
* When a track receive request needs to be sent \(`trackNotificationReceive`\).
* When a track click request needs to be sent \(`trackNotificationClick`\).
* When a registration request needs to be sent (`registerDevice`).
* When a track receive request needs to be sent (`trackNotificationReceive`).
* When a track click request needs to be sent (`trackNotificationClick`).

#### Data payload definition

Here are the key-value pairs in this event:
The following key-value pair is used in this event:

| **Key** | **Value Type** | **Optional** | **Description** |
| :--- | :--- | :--- | :--- |
Expand Down Expand Up @@ -58,13 +58,13 @@ The `trackNotificationClick` parameters are also sent in the event, as described
}
```

### Configuration Response Content <a id="configuration-response-content"></a>
### Configuration response content <a id="configuration-response-content"></a>

The data property in this event is used by each extension to modify its settings. Each extension is responsible for reading out the part of the data property for which it is concerned.

#### Data payload definition <a id="data-payload-definition-2"></a>

The following key/value pairs are used by the configuration event in the Adobe Campaign Classic extension.
The following key/value pairs is used by the Adobe Campaign Classic extension from the configuration event.

| **Key** | **Value Type** | **Optional** | **Description** |
| :--- | :--- | :--- | :--- |
Expand All @@ -88,7 +88,7 @@ This event is dispatched in a response to the `registerDevice` API and contains

#### Data payload definition

Here is the definition of the key-value pairs in this event:
The following key-value pair is used in this event:

| **Key** | **Value Type** | **Optional** | **Description** |
| :--- | :--- | :--- | :--- |
Expand Down

0 comments on commit 8377ac9

Please sign in to comment.