Adobe Campaign Standard API reference
This document lists information about the previous versions of the Adobe Experience Platform Mobile SDKs. Check out this page for latest versions and solution support of the Mobile SDKs.
extensionVersion
Returns the running version of the Campaign Standard extension.
Swift
Syntax
Copied to your clipboard+ (nonnull NSString*) extensionVersion;
Example
Copied to your clipboardlet campaignVersion = ACPCampaign.extensionVersion()
Objective-C
Syntax
Copied to your clipboard+ (NSString * _Nonnull)extensionVersion
Example
Copied to your clipboardNSString *campaignVersion = [ACPCampaign extensionVersion];
Java
Syntax
Copied to your clipboardpublic String extensionVersion()
Example
Copied to your clipboardCampaign.extensionVersion();
Swift
Syntax
Copied to your clipboard+ (nonnull NSString*) extensionVersion;
Example
Copied to your clipboardlet campaignVersion = ACPCampaign.extensionVersion()
Objective-C
Syntax
Copied to your clipboard+ (NSString * _Nonnull)extensionVersion
Example
Copied to your clipboardNSString *campaignVersion = [ACPCampaign extensionVersion];
registerExtension
Registers the Campaign Standard extension with the Mobile Core.
When using React Native, register the Adobe Campaign Standard extension with Mobile Core in native code as shown on the Android and iOS tabs.
Java
Syntax
Copied to your clipboardpublic static void registerExtension()
Example
Copied to your clipboardCampaign.registerExtension();
Swift
Syntax
Copied to your clipboard+ (void) registerExtension
Example
Copied to your clipboardACPCampaign.registerExtension()
Objective-C
Syntax
Copied to your clipboard+ (void) registerExtension
Example
Copied to your clipboard[ACPCampaign registerExtension];
When using React Native, register the Adobe Campaign Standard extension with Mobile Core in native code as shown on the Android and iOS tabs.
resetLinkageFields
Clears previously stored linkage fields in the mobile SDK and triggers a Campaign rules download request to the configured Campaign server.
This method unregisters any previously registered rules with the Rules Engine and clears cached rules from the most recent rules download.
Java
Syntax
Copied to your clipboardpublic static void resetLinkageFields()
Example
Copied to your clipboardCampaign.resetLinkageFields()
setLinkageFields
Sets the Campaign linkage fields (CRM IDs) in the mobile SDK to be used for downloading personalized messages from Campaign.
The set linkage fields are stored as a base64 encoded JSON string in memory and they are sent in a custom HTTP header X-InApp-Auth
.
Java
Syntax
Copied to your clipboardpublic static void setLinkageFields(final Map<String, String> linkageFields)
Example
Copied to your clipboardHashMap<String, String> linkageFields = new HashMap<String, String>();linkageFields.put("cusFirstName", "John");linkageFields.put("cusLastName", "Doe");linkageFields.put("cusEmail", "john.doe@email.com");Campaign.setLinkageFields(linkageFields);
Swift
Syntax
Copied to your clipboard+ (void) setLinkageFields: (nonnull NSDictionary<NSString*, NSString*>*) linkageFields
Example
Copied to your clipboardACPCampaign.setLinkageFields(["cusFirstName": "John", "cusLastName": "Doe", "cusEmail": "john.doe@email.com"])
Objective-C
Syntax
Copied to your clipboard+ (void) setLinkageFields: (NSDictionary<NSString*, NSString*>*) linkageFields
Example
Copied to your clipboard[ACPCampaign setLinkageFields:@{@"cusFirstName" : @"John", @"cusLastName": @"Doe", @"cusEmail": @"john.doe@email.com"}];
Java
Syntax
Copied to your clipboardpublic static void setLinkageFields(final Map<String, String> linkageFields)
Example
Copied to your clipboardHashMap<String, String> linkageFields = new HashMap<String, String>();linkageFields.put("cusFirstName", "John");linkageFields.put("cusLastName", "Doe");linkageFields.put("cusEmail", "john.doe@email.com");Campaign.setLinkageFields(linkageFields);
Swift
Syntax
Copied to your clipboard+ (void) setLinkageFields: (nonnull NSDictionary<NSString*, NSString*>*) linkageFields
Example
Copied to your clipboardACPCampaign.setLinkageFields(["cusFirstName": "John", "cusLastName": "Doe", "cusEmail": "john.doe@email.com"])
Objective-C
Syntax
Copied to your clipboard+ (void) setLinkageFields: (NSDictionary<NSString*, NSString*>*) linkageFields
Example
Copied to your clipboard[ACPCampaign setLinkageFields:@{@"cusFirstName" : @"John", @"cusLastName": @"Doe", @"cusEmail": @"john.doe@email.com"}];