diff --git a/plugin.xml b/plugin.xml index db239c01..f19187f7 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version=4.13.0>" ADBMobile Adobe Mobile Services Plugin @@ -42,6 +42,6 @@ - + diff --git a/sdks/Android/AdobeMobileLibrary/ADBMobileConfig.json b/sdks/Android/AdobeMobileLibrary/ADBMobileConfig.json index 0bc186c5..8f90a01c 100644 --- a/sdks/Android/AdobeMobileLibrary/ADBMobileConfig.json +++ b/sdks/Android/AdobeMobileLibrary/ADBMobileConfig.json @@ -10,6 +10,7 @@ "referrerTimeout" : 0, "batchLimit" : 0, "privacyDefault" : "optedin", + "backdateSessionInfo" : false, "poi" : [] }, "target" : { @@ -17,10 +18,11 @@ "timeout" : 5 }, "audienceManager" : { - "server" : "" + "server" : "", + "analyticsForwardingEnabled": false }, "acquisition" : { - "server" : "", + "server" : "", "appid" : "" } } diff --git a/sdks/Android/AdobeMobileLibrary/adobeMobileLibrary-4.13.0.jar b/sdks/Android/AdobeMobileLibrary/adobeMobileLibrary-4.13.0.jar new file mode 100644 index 00000000..54c7a05f Binary files /dev/null and b/sdks/Android/AdobeMobileLibrary/adobeMobileLibrary-4.13.0.jar differ diff --git a/sdks/Android/AdobeMobileLibrary/adobeMobileLibrary-4.4.1.jar b/sdks/Android/AdobeMobileLibrary/adobeMobileLibrary-4.4.1.jar deleted file mode 100644 index 73b7da20..00000000 Binary files a/sdks/Android/AdobeMobileLibrary/adobeMobileLibrary-4.4.1.jar and /dev/null differ diff --git a/sdks/Android/AndroidWear_README.txt b/sdks/Android/AndroidWear_README.txt new file mode 100644 index 00000000..52cbf4e5 --- /dev/null +++ b/sdks/Android/AndroidWear_README.txt @@ -0,0 +1,142 @@ +==================================== +Android Wearable Implementation +==================================== + +Starting in Android SDK version 4.5.0, Android Wearable are supported. This allows you to collect usage data from your Android Wearable Apps. + +==================================== +Getting Started +==================================== +The following steps are to be performed in your Android Studio project. This guide is written assuming you have a project with at least two (2) modules in it; one for the Handheld app, and one for the Wearable app. For more information on developing for Android Wearable, please go to https://developer.android.com/training/building-wearables.html. + + +## Configure the SDK for Handheld app (Android Studio) ## + +1. Add the ADBMobileConfig.json file to the assets folder of your project. +2. Add the adobeMobileLibrary-*.jar file to the libs folder, or make sure it get referenced by the project. You might need to sync the gradle project after adding the jar file. +3. In the onCreate method of your main activity, allow the SDK access to your application context using Config.setContext: + +@Override +public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.main); + + // Allow the SDK access to the application context + Config.setContext(this.getApplicationContext()); +} + +4. Add following code to AndroidManifest.xml + + + + + + + ....... + + + +5. Make sure your project has included google-play-services.jar +6. Implement WearableListenerService, or add the corresponding code into your own WearableListenerService: + +public class WearListenerService extends WearableListenerService { + + @Override + public void onMessageReceived(MessageEvent messageEvent) { + super.onMessageReceived(messageEvent); + } + + private GoogleApiClient mGoogleApiClient; + + @Override + public void onCreate() { + super.onCreate(); + mGoogleApiClient = new GoogleApiClient.Builder(this) + .addApi(Wearable.API) + .build(); + mGoogleApiClient.connect(); + } + @Override + public void onDestroy() { + super.onDestroy(); + mGoogleApiClient.disconnect(); + } + + @Override + public void onDataChanged(com.google.android.gms.wearable.DataEventBuffer dataEvents) { + DataListenerHandheld.onDataChanged(dataEvents, mGoogleApiClient, this); + } +} + +7. Add WearListenerService into AndroidManifest.xml + + + ....... + + + + + + + + +## Configure the SDK for Wear app (Android Studio) ## + +1. Add the same ADBMobileConfig.json file to the assets folder of your wearable project. +Or you can change the gradle config to use the ADBMobileConfig.json in the assets folder of the handheld app. +android { + + sourceSets { + main { + assets.srcDirs = ['src/main/assets','../mobile/src/main/assets'] + } + } +} +2. Add the adobeMobileLibrary-*.jar file to the libs folder, or make sure it get referenced by the project. You might need to sync the gradle project after adding the jar file. +3. In the onCreate method of the main activity, allow the SDK access to your application context using Config.setContext: + +@Override +public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.main); + // Allow the SDK access to the application context + Config.setContext(this.getApplicationContext(), Config.ApplicationType.APPLICATION_TYPE_WEARABLE); +} + +4. Add following code to AndroidManifest.xml + + ....... + + + +5. Make sure your project has included google-play-services.jar +6. Implement WearableListenerService, or add the corresponding code into your own WearableListenerService: + +public class WearListenerService extends WearableListenerService { + @Override + public void onDataChanged(com.google.android.gms.wearable.DataEventBuffer dataEvents) { + DataListenerWearable.onDataChanged(dataEvents); + } +} + +7. Add WearListenerService into AndroidManifest.xml + + + ...... + + + + + + + + +For full documentation on how to use the iOS 4.x SDK, please visit https://marketing.adobe.com/resources/help/en_US/mobile/android/dev_qs.html + +Notes: +1. There is one additional context(A.RunMode) added to indicate whether the data comes from handheld app or wearable app. +a.RunMode = Application means the hit comes from handheld app +a.RunMode = Extension means the hit comes from wearable app +2. SDK automatically sync aid/vid/visitor service id/privacy status from the handheld app to wearable app, so it's better not calling setPrivacyStatus/setUserIdentifier/idSync from wearable app. +3. In-app messages, target and aam are disabled for wearable app. diff --git a/sdks/Android/ReleaseNotes.txt b/sdks/Android/ReleaseNotes.txt index 70715a98..34793d48 100644 --- a/sdks/Android/ReleaseNotes.txt +++ b/sdks/Android/ReleaseNotes.txt @@ -5,7 +5,93 @@ Included are notes from the latest major revision to current. For full SDK documentation, please visit: https://marketing.adobe.com/resources/help/en_US/mobile/android/ -4.4.1 (26 Jan, 2015) +4.13.0 (15 Sep, 2016) +- Deep Linking - Enhancements to enable tracking of 3rd party deferred deep links + +4.12.0 (18 Aug, 2016) +- Visitor ID Service - Added new method to append visitor identity to a given URL in-order to transfer identity to a web-based implementation. + +4.11.1 (28 Jul, 2016) +- In App Messaging - Fixed a fullscreen message issue that could cause a crash when the fullscreen message activity is killed by the system +- In App Messaging - Fixed a bug that prevented fullscreen and alert messages from displaying after a local notification was triggered +- Deep Linking - Fixed an issue that could cause a crash when using custom deeplink urls +- Audience Manager - Improved handling of empty or invalid responses from AAM server + +4.11.0 (16 Jun, 2016) +- Target - New Target API for passing in requestLocation parameters +- Target - Fixed the bug where mboxHost/orderId/orderTotal were not correctly handled in legacy Target API +- Postbacks/In-App Messaging - Removed requirements on analytics for Postbacks and In-App Messaging +- Postbacks - Fixed the issue where post body was encoded when the content type is application/json +- Postbacks - Fixed a crash when key or value in context data was passed in as null and a postback was configured + +4.10.0 (19 May, 2016) +- New Feature - New Target API +- New Feature - PII data collection + +4.9.0 (5 May, 2016) +- New Feature - deep linking with acquisition +- New Feature - callback system allowing access to acquisition, deep link, and lifecycle information +- New Feature - message payload support for local and push messaging + +4.8.3 (18 Feb, 2016) +- Configuration - privacy status is now respected for Target, Audience Manager, and Visitor ID Service activity +- Visitor ID Service - fixed a bug caused by attempting to sync a null identifier +- Audience Manager - timeout for AAM requests is now configurable in the Mobile Services UI and in ADBMobileConfig.json +- Fixed a bug that was preventing proper database initialization + +4.8.2 (21 Jan, 2016) +- Acquisition - fixed a bug where referrer data was not inserted into lifecycle data if the intent was triggered before first launch +- Postbacks - fixed a bug where requests were not triggered for the lifetime value amount trait +- Postbacks - fixed an encoding issue with non-string context data values in requests +- Target - Resolved race condition that could lead to occasional crashes + +4.8.1 (4 Nov, 2015) +- Visitor ID Service - added support to AAM for customer IDs and authentication state +- Analytics - fixed an issue introduced in 4.8.0 where last known hit timestamp was not updated. + +4.8.0 (2 Nov, 2015) +- Visitor ID Service - added support to send in an authentication state when syncing Visitor ID Service identifiers +- Audience Manager - added support for automatic forwarding of Analytics data to Audience Manager +- Analytics - fixed an issue where backdated hits would contain current device information +- Fixed a compile error with Google Play Services 8.1 when ProGuard is enabled + +4.7.0 (skipped to match cadence with iOS) + +4.6.1 (24 Sept, 2015) +- New Feature - Android 6.0(Marshmallow) compatibility + +4.6.0 (16 Sept, 2015) +- New Feature - support for push messaging +- New Feature - support for 3rd party callbacks +- Acquisition - enhanced functionality added for acquisition +- Analytics - fixed a bug preventing an aid from being re-generated if Visitor ID Service was enabled, then later disabled + +4.5.4 (20 Aug, 2015) +- Configuration - made a small change to configuration loading to support better integration with PhoneGap + +4.5.3 (16 July, 2015) +- Analytics - fixed a bug where unsuccessful close of HTTP connection could result in failure of sending non-ssl Analytics requests in older Android Versions + +4.5.2 (26 June, 2015) +- Audience Manager - fixed a bug where lack of destination urls in AAM response could result in no visitor profile being available locally + +4.5.1 (18 June, 2015) +- In App Messaging - fixed a bug where messages were incorrectly triggered if all messages were disabled at once +- In App Messaging - fixed a bug where messages were not being triggered after their showrule was changed +- In App Messaging - fixed a bug where an Activity reference could cause memory leaks +- Visitor ID Service - fixed an issue causing location hint to be set incorrectly for visitor id service on analytics calls +- Analytics - Added an optional config item to allow for disabling backdating on the session info hit + +4.5.0 (29 Apr, 2015) +- Added support for Android Wear devices +- Check out our Android Wear Example in GitHub: https://github.com/Adobe-Marketing-Cloud/mobile-services/releases/tag/v1.0-Android-wear + +4.4.2 (16 Apr, 2015) +- Added Locale to in-app messaging traits +- Added custom data on lifecycle to in-app messaging traits +- Added ssl support for Target calls + +4.4.1 (19 Feb, 2015) - Fixed an issue where ssl connections could cause a full connection on every call 4.4.0 (15 Jan, 2015) diff --git a/sdks/iOS/AdobeMobileLibrary/ADBMobile.h b/sdks/iOS/AdobeMobileLibrary/ADBMobile.h index d890f826..32866a2f 100644 --- a/sdks/iOS/AdobeMobileLibrary/ADBMobile.h +++ b/sdks/iOS/AdobeMobileLibrary/ADBMobile.h @@ -2,10 +2,12 @@ // ADBMobile.h // Adobe Digital Marketing Suite -- iOS Application Measurement Library // -// Copyright 1996-2013. Adobe, Inc. All Rights Reserved +// Copyright 1996-2016. Adobe, Inc. All Rights Reserved +// +// SDK Version: 4.13.0 #import -@class CLLocation, CLBeacon, ADBTargetLocationRequest, ADBMediaSettings, ADBMediaState; +@class CLLocation, CLBeacon, TVApplicationController, ADBTargetLocationRequest, ADBMediaSettings, ADBMediaState; #pragma mark - ADBMobile @@ -16,11 +18,56 @@ * @see setPrivacyStatus */ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { - ADBMobilePrivacyStatusOptIn = 1, /*!< Enum value ADBMobilePrivacyStatusOptIn. */ - ADBMobilePrivacyStatusOptOut = 2, /*!< Enum value ADBMobilePrivacyStatusOptOut. */ - ADBMobilePrivacyStatusUnknown = 3 /*!< Enum value ADBMobilePrivacyStatusUnknown. @note only available in conjunction with offline tracking */ + ADBMobilePrivacyStatusOptIn = 1, /*!< Enum value ADBMobilePrivacyStatusOptIn. */ + ADBMobilePrivacyStatusOptOut = 2, /*!< Enum value ADBMobilePrivacyStatusOptOut. */ + ADBMobilePrivacyStatusUnknown = 3 /*!< Enum value ADBMobilePrivacyStatusUnknown. @note only available in conjunction with offline tracking */ +}; + +/** + * @brief An enum type. + * The possible authentication state. + * @see visitorSyncIdentifiers + */ +typedef NS_ENUM(NSUInteger, ADBMobileVisitorAuthenticationState) { + ADBMobileVisitorAuthenticationStateUnknown = 0, /*!< Enum value ADBMobileVisitorAuthenticationStateUnknown. */ + ADBMobileVisitorAuthenticationStateAuthenticated = 1, /*!< Enum value ADBMobileVisitorAuthenticationStateAuthenticated. */ + ADBMobileVisitorAuthenticationStateLoggedOut = 2 /*!< Enum value ADBMobileVisitorAuthenticationStateLoggedOut. */ +}; + +/** + * @brief An enum type. + * The possible types of app extension you might use + * @see setAppExtensionType + */ +typedef NS_ENUM(NSUInteger, ADBMobileAppExtensionType) { + ADBMobileAppExtensionTypeRegular = 0, /*!< Enum value ADBMobileAppExtensionTypeRegular. */ + ADBMobileAppExtensionTypeStandAlone = 1 /*!< Enum value ADBMobileAppExtensionTypeStandAlone. */ }; +/** + * @brief An enum type. + * The possible callback events with registerAdobeDataCallback + * @see registerAdobeDataCallback + */ +typedef NS_ENUM(NSUInteger, ADBMobileDataEvent) { + ADBMobileDataEventLifecycle, + ADBMobileDataEventAcquisitionInstall, + ADBMobileDataEventAcquisitionLaunch, + ADBMobileDataEventDeepLink +}; + +/** @defgroup ADBConfigParameters + * These constant strings can be used as the keys for common parameters within Configuration + * Example: NSURL *url = callbackData[ADBConfigKeyCallbackDeepLink]; + */ + +/* + * Used within ADBMobileDataCallback + * Key for deep link URL. + */ +FOUNDATION_EXPORT NSString *const __nonnull ADBConfigKeyCallbackDeepLink; + + /** * @class ADBMobile * This class is used for all interaction with the Adobe Mobile Services. @@ -33,7 +80,7 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @brief Gets the version. * @return a string pointer containing the version value. */ -+ (NSString *) version; ++ (nonnull NSString *) version; /** * @brief Gets the privacy status. @@ -53,19 +100,32 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @brief Gets user's current lifetime value * @return a NSDecimalNumber pointer to the current user's value. */ -+ (NSDecimalNumber *) lifetimeValue; ++ (nullable NSDecimalNumber *) lifetimeValue; /** * @brief Gets the user identifier. * @return a string pointer containing the user identifier value. */ -+ (NSString *) userIdentifier; ++ (nullable NSString *) userIdentifier; /** * @brief Sets the user identifier. * @param identifier a string pointer containing the user identifier value. */ -+ (void) setUserIdentifier:(NSString *)identifier; ++ (void) setUserIdentifier:(nullable NSString *)identifier; + +/** + * @brief Sets the IDFA. + * @param identifier a string pointer containing the IDFA value. + */ ++ (void) setAdvertisingIdentifier:(nullable NSString *)identifier; + +/** + * @brief Sets the device token for push notifications + * @param deviceToken an NSData pointer containing the deviceToken value. + * @note This method should only be used within the application:didRegisterForRemoteNotificationsWithDeviceToken: method + */ ++ (void) setPushIdentifier:(nullable NSData *)deviceToken; /** * @brief Gets the preference for debug log output. @@ -91,13 +151,61 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @note This should be the first method called upon app launch. */ + (void) collectLifecycleData; +/** + * @brief Begins the collection of lifecycle data. + * @note This should be the first method called upon app launch. + * @param data a dictionary pointer containing the context data to be added to the lifecycle hit. + */ ++ (void) collectLifecycleDataWithAdditionalData:(nullable NSDictionary *)data; /** * @brief allows one-time override of the path for the json config file - * @note This *must* be called prior to AppDidFinishLaunching has completed and before any other interactions with the Adobe Mobile library have happened. + * @note This *must* be called prior to AppDidFinishLaunching has completed and before any other interactions with the Adobe Mobile library have happened. + * Only the first call to this function will have any effect. + */ ++ (void) overrideConfigPath: (nullable NSString *) path; + +/** + * @brief set the app group used to sharing user defaults and files among containing app and extension apps + * @note This *must* be called in AppDidFinishLaunching and before any other interactions with the Adobe Mobile library have happened. * Only the first call to this function will have any effect. */ -+ (void) overrideConfigPath: (NSString *) path; ++ (void) setAppGroup: (nullable NSString *) appGroup; + +/** + * @brief Configures the Adobe Mobile SDK setting to determines what kind of extension is currently being executed. + * @note When using the extension library, please refer to the online documentation to help you decide which setting you need + * @param type an ADBMobileAppExtensionType value indicating the type of extension for your currently running executable + * @see ADBMobileAppExtensionType + */ ++ (void) setAppExtensionType:(ADBMobileAppExtensionType)type; + +/** + * @brief Synchronize certain defaults between a Watch app and the iOS app in the SDK via Watch Connectivity + * @note This method should only be used in WCSessionDelegate methods. + * @return a bool value indicating if the settings dictionary was meant for consumption by ADBMobile + */ ++ (BOOL) syncSettings:(nullable NSDictionary *) settings; + +/** + * @brief Initialize the SDK for WatchKit apps + * @note This method should only be called from applicationDidFinishLaunching in your WKExtensionDelegate class + */ ++ (void) initializeWatch; + +/** + * @brief Registers the ADBMobile class in the JSContext object of the tv application controller + * @note This method should only be called from AppleTV apps written using TVML/TVJS + * @param tvController is the TVApplicationController initialized to bridge the native and JS environments for the app + */ ++ (void) installTVMLHooks:(nullable TVApplicationController *)tvController; + +/** + * @brief Register the callback for Adobe data. The callback block will get called when SDK receive any form of data that is populated by the sdk automatically (eg. lifecycle, acquisition). + * @param callback a block pointer to call any time adobe creates a piece of data. event(String) is the name of the event that caused the callback. adobeData is a dictionary with all the context data created during that session. + */ ++ (void) registerAdobeDataCallback:(nullable void (^)(ADBMobileDataEvent event, NSDictionary* __nullable adobeData))callback; + #pragma mark - Analytics @@ -107,7 +215,7 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @param data a dictionary pointer containing the context data to be tracked. * @note This method increments page views. */ -+ (void) trackState:(NSString *)state data:(NSDictionary *)data; ++ (void) trackState:(nullable NSString *)state data:(nullable NSDictionary *)data; /** * @brief Tracks an action with context data. @@ -115,16 +223,16 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @param data a dictionary pointer containing the context data to be tracked. * @note This method does not increment page views. */ -+ (void) trackAction:(NSString *)action data:(NSDictionary *)data; ++ (void) trackAction:(nullable NSString *)action data:(nullable NSDictionary *)data; /** * @brief Tracks an action with context data. * @param action a string pointer containing the action value to be tracked. * @param data a dictionary pointer containing the context data to be tracked. - * @note This method does not increment page views. + * @note This method does not increment page views. * @note This method is intended to be called while your app is in the background(it will not cause lifecycle data to send if the session timeout has been exceeded) */ -+ (void) trackActionFromBackground:(NSString *)action data:(NSDictionary *)data; ++ (void) trackActionFromBackground:(nullable NSString *)action data:(nullable NSDictionary *)data; /** * @brief Tracks a location with context data. @@ -132,20 +240,44 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @param data a dictionary pointer containing the context data to be tracked. * @note This method does not increment page views. */ -+ (void) trackLocation:(CLLocation *)location data:(NSDictionary *)data; ++ (void) trackLocation:(nullable CLLocation *)location data:(nullable NSDictionary *)data; +#if !TARGET_OS_WATCH && !TARGET_OS_TV /** * @brief Tracks a beacon with context data. * @param beacon a CLBeacon pointer containing the beacon information to be tracked. * @param data a dictionary pointer containing the context data to be tracked. * @note This method does not increment page views. */ -+ (void) trackBeacon:(CLBeacon *)beacon data:(NSDictionary *)data; ++ (void) trackBeacon:(nullable CLBeacon *)beacon data:(nullable NSDictionary *)data; /** * @brief Clears beacon data persisted for Target */ + (void) trackingClearCurrentBeacon; +#endif + +/** + * @brief Tracks a push message click-through + * @param userInfo an NSDictionary pointer containing the push message payload to be tracked. + * @note This method does not increment page views. + */ ++ (void) trackPushMessageClickThrough:(nullable NSDictionary *)userInfo; + + +/** + * @brief Tracks a local notification message click-through + * @param userInfo an NSDictionary pointer containing the message payload to be tracked. + * @note This method does not increment page views. + */ ++ (void) trackLocalNotificationClickThrough:(nullable NSDictionary *)userInfo; + +/** + * @brief Tracks a Adobe Deep Link click-through + * @param url The URL resource received from UIApplication delegate method. + * @note Adobe Link data will be appended to the lifecycle call if it is a launch event, otherwise an extra call will be sent. + */ ++ (void) trackAdobeDeepLink:(nullable NSURL *)url; /** * @brief Tracks an increase in a user's lifetime value. @@ -153,7 +285,7 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @param data a dictionary pointer containing the context data to be tracked. * @note This method does not increment page views. */ -+ (void) trackLifetimeValueIncrease:(NSDecimalNumber *)amount data:(NSDictionary *)data; ++ (void) trackLifetimeValueIncrease:(nullable NSDecimalNumber *)amount data:(nullable NSDictionary *)data; /** * @brief Tracks the start of a timed event @@ -162,7 +294,7 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @note This method does not send a tracking hit * @attention If an action with the same name already exists it will be deleted and a new one will replace it. */ -+ (void) trackTimedActionStart:(NSString *)action data:(NSDictionary *)data; ++ (void) trackTimedActionStart:(nullable NSString *)action data:(nullable NSDictionary *)data; /** * @brief Tracks the start of a timed event @@ -171,29 +303,29 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @note This method does not send a tracking hit * @attention When the timed event is updated the contents of the parameter data will overwrite existing context data keys and append new ones. */ -+ (void) trackTimedActionUpdate:(NSString *)action data:(NSDictionary *)data; ++ (void) trackTimedActionUpdate:(nullable NSString *)action data:(nullable NSDictionary *)data; /** * @brief Tracks the end of a timed event * @param action a required NSString pointer that denotes the action name to finish tracking. - * @param logic optional block to perform logic and update parameters when this timed event ends, this block can cancel the sending of the hit by returning NO. + * @param block optional block to perform logic and update parameters when this timed event ends, this block can cancel the sending of the hit by returning NO. * @note This method will send a tracking hit if the parameter logic is nil or returns YES. */ -+ (void) trackTimedActionEnd:(NSString *)action - logic:(BOOL (^)(NSTimeInterval inAppDuration, NSTimeInterval totalDuration, NSMutableDictionary *data))block; ++ (void) trackTimedActionEnd:(nullable NSString *)action + logic:(nullable BOOL (^)(NSTimeInterval inAppDuration, NSTimeInterval totalDuration, NSMutableDictionary* __nullable data))block; /** * @brief Returns whether or not a timed action is in progress * @return a bool value indicating the existence of the given timed action */ -+ (BOOL) trackingTimedActionExists:(NSString *)action; ++ (BOOL) trackingTimedActionExists:(nullable NSString *)action; /** * @brief Retrieves the analytics tracking identifier * @return an NSString value containing the tracking identifier * @note This method can cause a blocking network call and should not be used from a UI thread. */ -+ (NSString *) trackingIdentifier; ++ (nullable NSString *) trackingIdentifier; /** * @brief Force library to send all queued hits regardless of current batch options @@ -211,6 +343,13 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { */ + (NSUInteger) trackingGetQueueSize; +#pragma mark - Acquisition +/** + * @brief Allows developer to start an app acquisition campaign as if the user had clicked on a link. This his helpful for creating manual acquisition links and handling the app store redirect yourself (such as with an SKStoreView) + * @param appId ID of the app in Adobe Mobile Services + * @param data optional dictionary pointer containing context data, should at least contain keys a.referrer.campaign.name and a.referrer.campaign.source + */ ++ (void) acquisitionCampaignStartForApp:(nullable NSString *)appId data:(nullable NSDictionary *)data; #pragma mark - Media Analytics @@ -222,10 +361,10 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @param playerID ID of media player. * @return An ADBMediaSettings pointer. */ -+ (ADBMediaSettings *) mediaCreateSettingsWithName:(NSString *)name - length:(double)length - playerName:(NSString *)playerName - playerID:(NSString *)playerID; ++ (nonnull ADBMediaSettings *) mediaCreateSettingsWithName:(nullable NSString *)name + length:(double)length + playerName:(nullable NSString *)playerName + playerID:(nullable NSString *)playerID; /** * @brief Creates an ADBMediaSettings populated with the parameters. @@ -237,55 +376,55 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @param CPM . * @return An ADBMediaSettings pointer. */ -+ (ADBMediaSettings *) mediaAdCreateSettingsWithName:(NSString *)name - length:(double)length - playerName:(NSString *)playerName - parentName:(NSString *)parentName - parentPod:(NSString *)parentPod - parentPodPosition:(double)parentPodPosition - CPM:(NSString *)CPM; ++ (nonnull ADBMediaSettings *) mediaAdCreateSettingsWithName:(nullable NSString *)name + length:(double)length + playerName:(nullable NSString *)playerName + parentName:(nullable NSString *)parentName + parentPod:(nullable NSString *)parentPod + parentPodPosition:(double)parentPodPosition + CPM:(nullable NSString *)CPM; /** * @brief Opens a media item for tracking. * @param settings a pointer to the configured ADBMediaSettings * @param callback a block pointer to call with an ADBMediaState pointer every second. */ -+ (void) mediaOpenWithSettings:(ADBMediaSettings *)settings - callback:(void (^)(ADBMediaState *mediaState))callback; ++ (void) mediaOpenWithSettings:(nullable ADBMediaSettings *)settings + callback:(nullable void (^)(ADBMediaState* __nullable mediaState))callback; /** * @brief Closes a media item. * @param name name of media item. */ -+ (void) mediaClose:(NSString *)name; ++ (void) mediaClose:(nullable NSString *)name; /** * @brief Begins tracking a media item. * @param name name of media item. * @param offset point that the media items is being played from (in seconds) */ -+ (void) mediaPlay:(NSString *)name offset:(double)offset; ++ (void) mediaPlay:(nullable NSString *)name offset:(double)offset; /** * @brief Artificially completes a media item. * @param name name of media item. * @param offset point that the media items is when complete is called (in seconds) */ -+ (void) mediaComplete:(NSString *)name offset:(double)offset; ++ (void) mediaComplete:(nullable NSString *)name offset:(double)offset; /** * @brief Notifies the media module that the media item has been paused or stopped * @param name name of media item. * @param offset point that the media item was stopped (in seconds) */ -+ (void) mediaStop:(NSString *)name offset:(double)offset; ++ (void) mediaStop:(nullable NSString *)name offset:(double)offset; /** * @brief Notifies the media module that the media item has been clicked * @param name name of media item. * @param offset point that the media item was clicked (in seconds) */ -+ (void) mediaClick:(NSString *)name offset:(double)offset; ++ (void) mediaClick:(nullable NSString *)name offset:(double)offset; /** * @brief Sends a track event with the current media state @@ -293,7 +432,7 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @param name name of media item. * @param data optional dictionary pointer containing context data to track with this media action. */ -+ (void) mediaTrack:(NSString *)name data:(NSDictionary *)data; ++ (void) mediaTrack:(nullable NSString *)name data:(nullable NSDictionary *)data; #pragma mark - Target @@ -302,7 +441,41 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @param request a ADBTargetLocationRequest pointer. * @param callback a block pointer to call with a response string pointer parameter upon completion of the service request. */ -+ (void) targetLoadRequest:(ADBTargetLocationRequest *)request callback:(void (^)(NSString *content))callback; ++ (void) targetLoadRequest:(nullable ADBTargetLocationRequest *)request callback:(nullable void (^)(NSString* __nullable content))callback; + +/** + * @brief Processes a Target service request. + * @param name a string pointer containing the name of the mbox + * @param defaultContent a string pointer containing the content to be returned on failure + * @param profileParameters a dictionary of parameters to be added to the profile + * @param orderParameters a dictionary + * @param mboxParameters a dictionary of parameters for the mbox + * @param callback a block pointer to call with a response string pointer parameter upon completion of the service request. + */ ++ (void) targetLoadRequestWithName:(nullable NSString *)name + defaultContent:(nullable NSString *)defaultContent + profileParameters:(nullable NSDictionary *)profileParameters + orderParameters:(nullable NSDictionary *)orderParameters + mboxParameters:(nullable NSDictionary *)mboxParameters + callback:(nullable void (^)(NSString* __nullable content))callback; + +/** + * @brief Processes a Target service request. + * @param name a string pointer containing the name of the mbox + * @param defaultContent a string pointer containing the content to be returned on failure + * @param profileParameters a dictionary of parameters to be added to the profile + * @param orderParameters a dictionary + * @param mboxParameters a dictionary of parameters for the mbox + * @param requestLocationParameters a dictionary of parameters for request location + * @param callback a block pointer to call with a response string pointer parameter upon completion of the service request. + */ ++ (void) targetLoadRequestWithName:(nullable NSString *)name + defaultContent:(nullable NSString *)defaultContent + profileParameters:(nullable NSDictionary *)profileParameters + orderParameters:(nullable NSDictionary *)orderParameters + mboxParameters:(nullable NSDictionary *)mboxParameters + requestLocationParameters:(nullable NSDictionary *)requestLocationParameters + callback:(nullable void (^)(NSString* __nullable content))callback; /** * @brief Creates a ADBTargetLocationRequest populated with the parameters. @@ -312,9 +485,9 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @return A ADBTargetLocationRequest pointer. * @see targetLoadRequest:callback: for processing the returned ADBTargetLocationRequest pointer. */ -+ (ADBTargetLocationRequest *) targetCreateRequestWithName:(NSString *)name - defaultContent:(NSString *)defaultContent - parameters:(NSDictionary *)parameters; ++ (nullable ADBTargetLocationRequest *) targetCreateRequestWithName:(nullable NSString *)name + defaultContent:(nullable NSString *)defaultContent + parameters:(nullable NSDictionary *)parameters; /** * @brief Creates a ADBTargetLocationRequest populated with the parameters. @@ -326,50 +499,74 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @return A ADBTargetLocationRequest pointer. * @see targetLoadRequest:callback: for processing the returned ADBTargetLocationRequest pointer. */ -+ (ADBTargetLocationRequest *) targetCreateOrderConfirmRequestWithName:(NSString *)name - orderId:(NSString *)orderId - orderTotal:(NSString *)orderTotal - productPurchasedId:(NSString *)productPurchasedId - parameters:(NSDictionary *)parameters; ++ (nullable ADBTargetLocationRequest *) targetCreateOrderConfirmRequestWithName:(nullable NSString *)name + orderId:(nullable NSString *)orderId + orderTotal:(nullable NSString *)orderTotal + productPurchasedId:(nullable NSString *)productPurchasedId + parameters:(nullable NSDictionary *)parameters; + +/** + * @brief Gets the custom visitor ID for target + * @return thirdPartyId a string pointer containing the value of the third party id (custom visitor id) + */ ++ (nullable NSString *) targetThirdPartyID; + +/** + * @brief Sets the custom visitor ID for target + * @param thirdPartyID a string pointer containing the value of the third party id (custom visitor id) + */ ++ (void) targetSetThirdPartyID:(nullable NSString *)thirdPartyID; /** - * @brief Clears target cookies from shared cookie storage + * @brief Resets the user's experience */ + (void) targetClearCookies; +/** + * @brief Gets the value of the PcID cookie returned for this visitor by the Target server + * @return An NSString pointer containing the PcID for this user + */ ++ (nullable NSString *) targetPcID; + +/** + * @brief Gets the value of the SessionID cookie returned for this visitor by the Target server + * @return An NSString pointer containing the SessionID for this user + */ ++ (nonnull NSString *) targetSessionID; + #pragma mark - Audience Manager /** * @brief Gets the visitor's profile. * @return A dictionary pointer containing the visitor's profile information. */ -+ (NSDictionary *) audienceVisitorProfile; ++ (nullable NSDictionary *) audienceVisitorProfile; /** * @brief Gets the DPID. * @return A string pointer containing the DPID value. */ -+ (NSString *) audienceDpid; ++ (nullable NSString *) audienceDpid; /** * @brief Gets the DPUUID. * @return A string pointer containing the DPUUID value. */ -+ (NSString *) audienceDpuuid; ++ (nullable NSString *) audienceDpuuid; /** * @brief Sets the DPID and DPUUID. * @param dpid a string pointer containing the DPID value. * @param dpuuid a string pointer containing the DPUUID value. */ -+ (void) audienceSetDpid:(NSString *)dpid dpuuid:(NSString *)dpuuid; ++ (void) audienceSetDpid:(nullable NSString *)dpid dpuuid:(nullable NSString *)dpuuid; /** * @brief Processes an Audience Manager service request. * @param data a dictionary pointer. * @param callback a block pointer to call with a response dictionary pointer parameter upon completion of the service request. */ -+ (void) audienceSignalWithData:(NSDictionary *)data callback:(void (^)(NSDictionary *response))callback; ++ (void) audienceSignalWithData:(nullable NSDictionary *)data callback:(nullable void (^)(NSDictionary* __nullable response))callback; /** * @brief Resets audience manager UUID and purges current visitor profile @@ -382,16 +579,59 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * @return an NSString value containing the Marketing Cloud ID * @note This method can cause a blocking network call and should not be used from a UI thread. */ -+ (NSString *) visitorMarketingCloudID; ++ (nullable NSString *) visitorMarketingCloudID; + +/** + * @brief Synchronizes the provided identifiers to the visitor id service + * @param identifiers a dictionary containing identifiers, with the keys being the id types and the values being the correlating identifiers + */ ++ (void) visitorSyncIdentifiers: (nullable NSDictionary *) identifiers; + +/** + * @brief Synchronizes the provided identifiers to the visitor id service + * @param identifiers a dictionary containing identifiers, with the keys being the id types and the values being the correlating identifiers + * @param authState a authentication state will be applied for all the items in identifiers dictionary + */ ++ (void) visitorSyncIdentifiers: (nullable NSDictionary *) identifiers authenticationState:(ADBMobileVisitorAuthenticationState) authState; /** * @brief Synchronizes the provided identifiers to the visitor id service - * @param dictionary containing identifiers, with the keys being the id types and the values being the correlating identifiers + * @param identifierType a string pointer containing the identifier type + * @param identifier a string pointer containing the identifier + * @param authState a authentication state will be applied */ -+ (void) visitorSyncIdentifiers: (NSDictionary *) identifiers; ++ (void) visitorSyncIdentifierWithType: (nullable NSString *) identifierType identifier:(nullable NSString *)identifier authenticationState:(ADBMobileVisitorAuthenticationState) authState; + +/** + * @brief Returns all visitorIDs that have been synced + * @return an array of readonly ADBVisitorIDs + */ ++ (nullable NSArray *) visitorGetIDs; + +/** + * @brief Appends visitor identifiers to the given URL + * @return NSURL object containing the modified URL + * @note This method can cause a blocking network call. Blocking time is limited to 100ms, but care should still be taken to not call this on time-sensitive threads. + */ ++ (nullable NSURL *) visitorAppendToURL: (nullable NSURL *) url; + +#pragma mark - PII collection + +/** + * @brief Submits a PII collection request + * @param data a dictionary containing PII data + */ ++ (void) collectPII:(nullable NSDictionary *)data; @end +#pragma mark - ADBVisitorID +@interface ADBVisitorID : NSObject +- (nullable NSString *)idType; +- (nullable NSString *)identifier; +- (ADBMobileVisitorAuthenticationState) authenticationState; +@end + #pragma mark - ADBTargetLocationRequest /** @defgroup ADBTargetParameters @@ -399,15 +639,15 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) { * Example: contextData[ADBTargetParameterOrderId] = @"12345"; * @{ */ -FOUNDATION_EXPORT NSString *const ADBTargetParameterOrderId; ///< The key for an Order ID. -FOUNDATION_EXPORT NSString *const ADBTargetParameterOrderTotal; ///< The key for an Order Total. -FOUNDATION_EXPORT NSString *const ADBTargetParameterProductPurchasedId; ///< The key for a Product Purchased ID. -FOUNDATION_EXPORT NSString *const ADBTargetParameterCategoryId; ///< The key for a Category ID. -FOUNDATION_EXPORT NSString *const ADBTargetParameterMbox3rdPartyId; ///< The key for an Mbox 3rd Party ID. -FOUNDATION_EXPORT NSString *const ADBTargetParameterMboxPageValue; ///< The key for an Mbox Page Value. -FOUNDATION_EXPORT NSString *const ADBTargetParameterMboxPc; ///< The key for an Mbox PC. -FOUNDATION_EXPORT NSString *const ADBTargetParameterMboxSessionId; ///< The key for an Mbox Session ID. -FOUNDATION_EXPORT NSString *const ADBTargetParameterMboxHost; ///< The key for an Mbox Host. +FOUNDATION_EXPORT NSString *const __nonnull ADBTargetParameterOrderId; ///< The key for an Order ID. +FOUNDATION_EXPORT NSString *const __nonnull ADBTargetParameterOrderTotal; ///< The key for an Order Total. +FOUNDATION_EXPORT NSString *const __nonnull ADBTargetParameterProductPurchasedId; ///< The key for a Product Purchased ID. +FOUNDATION_EXPORT NSString *const __nonnull ADBTargetParameterCategoryId; ///< The key for a Category ID. +FOUNDATION_EXPORT NSString *const __nonnull ADBTargetParameterMbox3rdPartyId; ///< The key for an Mbox 3rd Party ID. +FOUNDATION_EXPORT NSString *const __nonnull ADBTargetParameterMboxPageValue; ///< The key for an Mbox Page Value. +FOUNDATION_EXPORT NSString *const __nonnull ADBTargetParameterMboxPc; ///< The key for an Mbox PC. +FOUNDATION_EXPORT NSString *const __nonnull ADBTargetParameterMboxSessionId; ///< The key for an Mbox Session ID. +FOUNDATION_EXPORT NSString *const __nonnull ADBTargetParameterMboxHost; ///< The key for an Mbox Host. /** @} */ // end of group ADBTargetParameters /** @@ -416,9 +656,9 @@ FOUNDATION_EXPORT NSString *const ADBTargetParameterMboxHost; ///< The */ @interface ADBTargetLocationRequest : NSObject -@property (nonatomic, strong) NSString *name; ///< The name of the target location. -@property (nonatomic, strong) NSString *defaultContent; ///< The default content that should be returned if the request fails. -@property (nonatomic, strong) NSMutableDictionary *parameters; ///< Optional. The parameters to be attached to the request. +@property (nonatomic, strong, nullable) NSString *name; ///< The name of the target location. +@property (nonatomic, strong, nullable) NSString *defaultContent; ///< The default content that should be returned if the request fails. +@property (nonatomic, strong, nullable) NSMutableDictionary *parameters; ///< Optional. The parameters to be attached to the request. @end @@ -433,21 +673,21 @@ FOUNDATION_EXPORT NSString *const ADBTargetParameterMboxHost; ///< The @property (readwrite) bool segmentByMilestones; ///< Indicates if segment info should be automatically generated for milestones generated or not, the default is NO. @property (readwrite) bool segmentByOffsetMilestones; ///< Indicates if segment info should be automatically generated for offset milestones or not, the default is NO. @property (readwrite) double length; ///< The length of the media item in seconds. -@property (nonatomic, strong) NSString *channel; ///< The name or ID of the channel. -@property (nonatomic, strong) NSString *name; ///< The name or ID of the media item. -@property (nonatomic, strong) NSString *playerName; ///< The name of the media player. -@property (nonatomic, strong) NSString *playerID; ///< The ID of the media player. -@property (nonatomic, strong) NSString *milestones; ///< A comma-delimited list of intervals (as a percentage) for sending tracking data. -@property (nonatomic, strong) NSString *offsetMilestones; ///< A comma-delimited list of intervals (in seconds) for sending tracking data. +@property (nonatomic, strong, nullable) NSString *channel; ///< The name or ID of the channel. +@property (nonatomic, strong, nullable) NSString *name; ///< The name or ID of the media item. +@property (nonatomic, strong, nullable) NSString *playerName; ///< The name of the media player. +@property (nonatomic, strong, nullable) NSString *playerID; ///< The ID of the media player. +@property (nonatomic, strong, nullable) NSString *milestones; ///< A comma-delimited list of intervals (as a percentage) for sending tracking data. +@property (nonatomic, strong, nullable) NSString *offsetMilestones; ///< A comma-delimited list of intervals (in seconds) for sending tracking data. @property (nonatomic) NSUInteger trackSeconds; ///< The interval at which tracking data should be sent, the default is 0. @property (nonatomic) NSUInteger completeCloseOffsetThreshold; ///< The number of second prior to the end of the media that it should be considered complete, the default is 1. // Media Ad settings @property (readwrite) bool isMediaAd; ///< Indicates if the media item is an ad or not. @property (readwrite) double parentPodPosition; ///< The position within the pod where the ad is played. -@property (nonatomic, strong) NSString *CPM; ///< The CMP or encrypted CPM (prefixed with a "~") for the media item. -@property (nonatomic, strong) NSString *parentName; ///< The name or ID of the media item that the ad is embedded in. -@property (nonatomic, strong) NSString *parentPod; ///< The position in the primary content the ad was played. +@property (nonatomic, strong, nullable) NSString *CPM; ///< The CMP or encrypted CPM (prefixed with a "~") for the media item. +@property (nonatomic, strong, nullable) NSString *parentName; ///< The name or ID of the media item that the ad is embedded in. +@property (nonatomic, strong, nullable) NSString *parentPod; ///< The position in the primary content the ad was played. @end @@ -470,14 +710,14 @@ FOUNDATION_EXPORT NSString *const ADBTargetParameterMboxHost; ///< The @property(readwrite) double timePlayed; ///< The total time played so far in seconds. @property(readwrite) double timePlayedSinceTrack; ///< The amount of time played since the last track event occurred in seconds. @property(readwrite) double timestamp; ///< The number of seconds since 1970 when this media state was created. -@property(readwrite, copy) NSDate *openTime; ///< The date and time of when the media item was opened. -@property(readwrite, copy) NSString *name; ///< The name or ID of the media item. -@property(readwrite, copy) NSString *playerName; ///< The name or ID of the media player. -@property(readwrite, copy) NSString *mediaEvent; ///< The name of the most recent media event. -@property(readwrite, copy) NSString *segment; ///< The name of the current segment. +@property(readwrite, copy, nullable) NSDate *openTime; ///< The date and time of when the media item was opened. +@property(readwrite, copy, nullable) NSString *name; ///< The name or ID of the media item. +@property(readwrite, copy, nullable) NSString *playerName; ///< The name or ID of the media player. +@property(readwrite, copy, nullable) NSString *mediaEvent; ///< The name of the most recent media event. +@property(readwrite, copy, nullable) NSString *segment; ///< The name of the current segment. @property(readwrite) NSUInteger milestone; ///< The most recent milestone. @property(readwrite) NSUInteger offsetMilestone; ///< The most recent offset milestone. @property(readwrite) NSUInteger segmentNum; ///< The current segment. @property(readwrite) NSUInteger eventType; ///< The current event type. -@end \ No newline at end of file +@end diff --git a/sdks/iOS/AdobeMobileLibrary/ADBMobileConfig.json b/sdks/iOS/AdobeMobileLibrary/ADBMobileConfig.json index 49f45caf..133aa886 100644 --- a/sdks/iOS/AdobeMobileLibrary/ADBMobileConfig.json +++ b/sdks/iOS/AdobeMobileLibrary/ADBMobileConfig.json @@ -10,6 +10,7 @@ "referrerTimeout" : 0, "batchLimit" : 0, "privacyDefault" : "optedin", + "backdateSessionInfo" : false, "poi" : [] }, "target" : { @@ -17,7 +18,8 @@ "timeout" : 5 }, "audienceManager" : { - "server" : "" + "server" : "", + "analyticsForwardingEnabled": false }, "acquisition" : { "server" : "", diff --git a/sdks/iOS/AdobeMobileLibrary/AdobeMobileLibrary.a b/sdks/iOS/AdobeMobileLibrary/AdobeMobileLibrary.a new file mode 100644 index 00000000..e1da43c0 Binary files /dev/null and b/sdks/iOS/AdobeMobileLibrary/AdobeMobileLibrary.a differ diff --git a/sdks/iOS/AdobeMobileLibrary/AdobeMobileLibrary_Extension.a b/sdks/iOS/AdobeMobileLibrary/AdobeMobileLibrary_Extension.a new file mode 100644 index 00000000..45cc406c Binary files /dev/null and b/sdks/iOS/AdobeMobileLibrary/AdobeMobileLibrary_Extension.a differ diff --git a/sdks/iOS/AdobeMobileLibrary/AdobeMobileLibrary_TV.a b/sdks/iOS/AdobeMobileLibrary/AdobeMobileLibrary_TV.a new file mode 100644 index 00000000..22651516 Binary files /dev/null and b/sdks/iOS/AdobeMobileLibrary/AdobeMobileLibrary_TV.a differ diff --git a/sdks/iOS/AdobeMobileLibrary/AdobeMobileLibrary_Watch.a b/sdks/iOS/AdobeMobileLibrary/AdobeMobileLibrary_Watch.a new file mode 100644 index 00000000..b9499044 Binary files /dev/null and b/sdks/iOS/AdobeMobileLibrary/AdobeMobileLibrary_Watch.a differ diff --git a/sdks/iOS/AdobeMobileLibrary/libAdobeMobileLibrary.a b/sdks/iOS/AdobeMobileLibrary/libAdobeMobileLibrary.a deleted file mode 100644 index 79d76ee1..00000000 Binary files a/sdks/iOS/AdobeMobileLibrary/libAdobeMobileLibrary.a and /dev/null differ diff --git a/sdks/iOS/AppleWatch_README.txt b/sdks/iOS/AppleWatch_README.txt new file mode 100644 index 00000000..ff520ee2 --- /dev/null +++ b/sdks/iOS/AppleWatch_README.txt @@ -0,0 +1,142 @@ + +>>>>> 4.6.0 UPDATE <<<<< + +========================================== +Apple Watch Implementation with WatchOS 2 +========================================== + +Starting with WatchOS 2, your WatchKit Extensions will run on Apple Watch device. Applications running in this environment require using the WatchConnectivity framework to share data with their containing iOS app. Beginning with AdobeMobileLibrary v4.6.0, support for WatchConnectivity is available. + +++++ Getting Started ++++ + +The following steps are to be performed in your Xcode project. This guide is written assuming your project has at least three (3) targets; one target is the containing app, one target is the WatchKit App, and the last is the WatchKit Extension. For more information on developing WatchKit Apps, please go to https://developer.apple.com/library/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/DesigningaWatchKitApp.html#//apple_ref/doc/uid/TP40014969-CH3-SW1 + + +** Configuring the Containing App ** + +1. Drag the folder named “AdobeMobileLibrary” into your project +2. Ensure that ADBMobileConfig.json is a member of the Containing App’s target +3. In the Build Phases tab of your Containing App’s target, expand the “Link Binary with Libraries” section and add the following libraries: + - AdobeMobileLibrary.a + - libsqlite3.tbd + - SystemConfiguration.framework +4. In your class that implements the UIApplicationDelegate protocol, add the WCSessionDelegate protocol + #import + @interface AppDelegate : UIResponder +5. In the implementation file of your app delegate class, import the AdobeMobileLibrary. + #import “ADBMobile.h” +6. In application:didFinishLaunchingWithOptions: of your app delegate, configure your WCSession BEFORE making any calls to the ADBMobile library + + // check for session availability + if ([WCSession isSupported]) { + WCSession *session = [WCSession defaultSession]; + session.delegate = self; + [session activateSession]; + } + +7. In your app delegate, implement the session:didReceiveMessage: and session:didReceiveUserInfo: methods. In these methods, we will call syncSettings: in the ADBMobile library, which returns a bool indicating if the dictionary was meant for consumption by the ADBMobile library. If it returns NO, the message was not initiated from the Adobe SDK. + + - (void) session:(WCSession *)session didReceiveMessage:(NSDictionary *)message { + // pass message to ADBMobile + if (![ADBMobile syncSettings:message]) { + // handle your own custom messages + } + } + + - (void) session:(WCSession *)session didReceiveUserInfo:(NSDictionary *)userInfo { + // pass userInfo to ADBMobile + if (![ADBMobile syncSettings:userInfo]) { + // handle your own custom messages + } + } + + +** Configuring the WatchKit Extension ** + +1. Ensure that ADBMobileConfig.json is a member of you WatchKit Extension’s target +2. In the Build Phases tab of your WatchKit Extension’s target, expand the “Link Binary with Libraries” section and add the following libraries: + - AdobeMobileLibrary_Watch.a + - libsqlite3.tbd +3. In your class that implements the WKExtensionDelegate protocol, import WatchConnectivity and add the WCSessionDelegate protocol + #import + @interface ExtensionDelegate : NSObject +4. In the implementation file of your extension delegate class, import the AdobeMobileLibrary. + #import “ADBMobile.h” +5. In applicationDidFinishLaunching of your extension delegate, configure your WCSession BEFORE making any calls to the ADBMobile library + + // check for session availability + if ([WCSession isSupported]) { + WCSession *session = [WCSession defaultSession]; + session.delegate = self; + [session activateSession]; + } + +6. In applicationDidFinishLaunching of your extension delegate, initialize the watch app for the SDK + + [ADBMobile initializeWatch]; + +7. In your extension delegate, implement the session:didReceiveMessage: and session:didReceiveUserInfo: methods. In these methods, we will call syncSettings: in the ADBMobile library, which returns a bool indicating if the dictionary was meant for consumption by the ADBMobile library. If it returns NO, the message was not initiated from the Adobe SDK. + + - (void) session:(WCSession *)session didReceiveMessage:(NSDictionary *)message { + // pass message to ADBMobile + if (![ADBMobile syncSettings:message]) { + // handle your own custom messages + } + } + + - (void) session:(WCSession *)session didReceiveUserInfo:(NSDictionary *)userInfo { + // pass userInfo to ADBMobile + if (![ADBMobile syncSettings:userInfo]) { + // handle your own custom messages + } + } + + + +========================================== +iOS Extensions Implementation +========================================== + +Starting in iOS SDK version 4.5.0, extension are supported. This allows you to collect usage data from your Apple Watch Apps, Today Widgets, Photo Editing widgets, and all the other iOS extension apps. + +++++ Getting Started ++++ + +The following steps are to be performed in your Xcode project. This guide is written assuming you have a project with at least two (2) targets in it; one for the containing app, and one for the extension. (Note, if you are working on a WatchKit App, you should have a third target for it) For more information on developing for Apple Watch, please go to https://developer.apple.com/library/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/index.html#//apple_ref/doc/uid/TP40014969-CH8-SW1. + +** Configuring the Containing App ** +1. Drag the folder named "AdobeMobileLibrary" into your project +2. Ensure that ADBMobileConfig.json it is a member of the Containing App's target +3. In the Build Phases tab of your Containing App's target, expand the Link Binary with Libraries section and add the following libraries: + - AdobeMobileLibrary.a + - libsqlite3.dylib + - SystemConfiguration.framework +4. Open the Capabilities tab of the Containing App's target, turn on the "App Groups" capability, and add a new App Group (e.g. - group.com.adobe.testApp) +5. In your application delegate, set the App Group in application:didFinishLaunchingWithOptions before making any other interactions with the Adobe Mobile library: + - [ADBMobile setAppGroup:@"group.com.adobe.testApp"]; +6. Confirm that your app builds without unexpected errors + + +** Configuring the Extension ** +1. Ensure that ADBMobileConfig.json it is a member of the Extension's target +2. In the Build Phases tab of your Extension’s target, expand the Link Binary with Libraries section and add the following libraries: + - AdobeMobileLibrary_Extension.a + - libsqlite3.dylib + - SystemConfiguration.framework +3. Open the Capabilities tab of the Extension's target, turn on the "App Groups" capability, and select the App Group you added in step 4 of "Configuring the Containing App" +4. In your InterfaceController, set the App Group in awakeWithContext: before making any other interactions with the Adobe Mobile library: + - [ADBMobile setAppGroup:@"group.com.adobe.testApp"]; +5. Confirm that your app builds without unexpected errors. + + +Once you have configured your targets, you can use the SDK as normal. For full documentation on how to use the iOS 4.x SDK, please visit https://marketing.adobe.com/resources/help/en_US/mobile/ios/ + + +++++ Additional Notes ++++ + +1. There is an additional context data value, "a.RunMode", added to indicate whether the data comes from your Containing App or your Extension. + - a.RunMode = Application (the hit came from the Containing App) + - a.RunMode = Extension (the hit came from the Extension) +2. If you upgrade from a old version of SDK, we will automatically migrate all the user defaults and cached files from the Containing App's folder to the App Group's shared folder when the containing app first get launched +3. Hits from the Extension will be discarded if the containing app has never been launched +4. The Version number and Build number must be the same between your Containing App and any Extension App +5. Currently, for Apple Watch apps, all of your project's targets must have "iOS Deployment Target" equal to iOS 8.2 diff --git a/sdks/iOS/ReleaseNotes.txt b/sdks/iOS/ReleaseNotes.txt index 5bcd9aa9..353ea431 100644 --- a/sdks/iOS/ReleaseNotes.txt +++ b/sdks/iOS/ReleaseNotes.txt @@ -5,6 +5,128 @@ Included are notes from the latest major revision to current. For full SDK documentation, please visit: https://marketing.adobe.com/resources/help/en_US/mobile/ios/ +4.13.0 (15 Sept, 2016) +- iOS 10 support +- New Feature - support for stand-alone extensions +- Deeplinking - added documentation showing how to track 3rd Party Deferred Deep Links + +4.12.0 (18 Aug, 2016) +- Visitor ID Service - Added new method to append visitor identity to a given URL in-order to transfer identity to a web-based implementation. +- In App Messaging - Fixed an issue that could cause a crash when setting the "target" attribute to "_blank" in an HTML tag in a custom full screen message + +4.11.1 (28 Jul, 2016) +- Lifecycle - Fixed an issue that could cause a crash when sending non-property list objects to collectLifecycleDataWithAdditionalData: +- In App Messaging - Fixed a bug that prevented fullscreen and alert messages from displaying after a local notification was triggered +- In App Messaging - Fixed an issue where fullscreen messages were not resized in split view mode (iOS 9+ iPad) + +4.11.0 (16 Jun, 2016) +- Target - New Target API for passing in requestLocation parameters +- Target - Fixed the bug where mboxHost/orderId/orderTotal were not correctly handled in legacy Target API +- Postbacks/In-App Messaging - Removed requirements on analytics for Postbacks and In-App Messaging +- Postbacks - Fixed the issue where post body was encoded when the content type is application/json +- Analytics - Fixed the issue of trackTimedAction not allowing non-string keys and values in context data + +4.10.0 (20 May, 2016) +- New Feature - New Target API +- New Feature - PII data collection +- In-App Messaging - Fixed a crash issue caused by trying to access a zombie messages array + +4.9.0 (5 May, 2016) +- New Feature - deep linking with acquisition +- New Feature - callback system allowing access to acquisition, deep link, and lifecycle information +- New Feature - message payload support for local and push messaging + +4.8.6 (9 Mar, 2016) +- In-App Messaging - fixed an issue that would cause full screen messages to not appear properly in specific environments +- Analytics - fixed an issue causing failed requests to not be retried in older operating systems +- Visitor ID Service - fixed a crash issue caused by trying to retain a zombie object +- Lifecycle - fixed an issue that would cause false crashes to be reported due to background activity +- Fixed a crash issue caused by race conditions in poor network environments + +4.8.5 (18 Feb, 2016) +- Configuration - privacy status is now respected for Target, Audience Manager, and Visitor ID Service activity +- In-App Messaging - fixed an issue that could cause a crash for alert messages on iOS 9+ +- Audience Manager - timeout for AAM requests is now configurable in the Mobile Services UI and in ADBMobileConfig.json +- Fixed an NSException crash caused by calling [NSUserDefaults resetStandardUserDefaults] when using WatchConnectivity for a WatchOS2 app + +4.8.4 (21 Jan, 2016) +- Postbacks - fixed a bug where requests were not triggered for the lifetime value amount trait +- Visitor ID Service - fixed a memory leak +- In App Messaging - fixed a memory leak +- Configuration - fixed an issue that could cause a crash due to malformed json + +4.8.3 (3 Dec, 2015) +- Configuration - fixed an issue that prevented proper migration of defaults when using app groups + +4.8.2 (30 Nov, 2015) +- Callbacks - Fixed an issue that could cause a crash when remote callbacks were overriding local callbacks. + +4.8.1 (4 Nov, 2015) +- Visitor ID Service - added support to AAM for customer IDs and authentication state +- Configuration - fixed an issue that could potentially cause a crash on app install + +4.8.0 (2 Nov, 2015) +- Visitor ID Service - added support to send in an authentication state when syncing Visitor ID Service identifiers +- Audience Manager - added support for automatic forwarding of Analytics data to Audience Manager +- Analytics - fixed an issue where backdated hits would contain current device information + +4.7.1 (23 Oct, 2015) +- Target - Added methods to retrieve PCID and SessionID for user +- Target - Fixed a bug with cookie handling + +4.7.0 (15 Oct, 2015) +- New Feature - TvOS compatibility +- In App Messaging - Fixed a bug causing a crash for alert message types when no confirm button text was provided +- Acquisition - SSL Support + +4.6.1 (17 Sept, 2015) +- Fixed an issue that broke backwards compatibility with Xcode versions older than 7 + +4.6.0 (16 Sept, 2015) +- New Feature - WatchOS2 (WatchKit) compatibility +- New Feature - support for push messaging +- New Feature - support for 3rd party callbacks +- Acquisition - enhanced functionality added for acquisition +- Analytics - fixed a bug preventing an aid from being re-generated if Visitor ID Service was enabled, then later disabled + +4.5.6 (2 Sept, 2015) +- Fixed an issue preventing proper archiving while bitcode is enabled + +4.5.5 (20 Aug, 2015) +- Added support for iOS 9 / Xcode 7 bitcode builds +- Configuration - made a small change to configuration loading to support better integration with PhoneGap +- Analytics - Fixed a issue that could cause sqlite exception. + +4.5.4 (23 June, 2015) +- In App Messaging - fixed a bug where messages were being inappropriately removed from the blacklist on launch + +4.5.3 (18 June, 2015) +- In App Messaging - fixed a bug where messages were incorrectly triggered if all messages were disabled at once +- In App Messaging - fixed clickthrough url issues for fullscreen messages +- In App Messaging - fixed a bug where messages were not being triggered after their showrule was changed +- Visitor ID Service - fixed an issue causing location hint to be set incorrectly for visitor id service on analytics calls +- Analytics - Added an optional config item to better handle backdating session info hit + +4.5.2 (6 May, 2015) +- Fixed a crashing issue for iOS versions lower than 8. + +4.5.1 (1 May, 2015) +- iOS Extension SDK - Fixed a issue that could cause out of order hits for timestamp enabled report suite. + +4.5.0 (27 Apr, 2015) +- New - Added support for iOS Extension Apps +- Check out our Apple Watch Example in GitHub: https://github.com/Adobe-Marketing-Cloud/mobile-services/releases/tag/v1.0-iOS-watch +- Check out the documentation for iOS Extension SDK : https://marketing.adobe.com/resources/help/en_US/mobile/ios/ios_ext.html + +4.4.1 (16 Apr, 2015) +- Added Locale(NSLocale) to in-app messaging traits +- Added custom data on lifecycle to in-app messaging traits +- Added ssl support for Target calls + +4.4.0 (15 Jan, 2015) +- New - Ability to add custom context data to lifecycle +- Version number is now included in the ADBMobile.h + 4.3.0 (20 Nov, 2014) - New - Adobe Marketing Cloud ID integration - Improved debug logs for clarity diff --git a/sdks/iOS/documentation.html b/sdks/iOS/documentation.html index 98e279f5..3e161128 100644 --- a/sdks/iOS/documentation.html +++ b/sdks/iOS/documentation.html @@ -2,7 +2,7 @@ - +