Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #51 from Adobe-Marketing-Cloud/apple-watch
Browse files Browse the repository at this point in the history
-initial release of ios 4.5, ios extensions support
  • Loading branch information
sbenedicadb committed Apr 27, 2015
2 parents 95bcec3 + 02bb546 commit 458a004
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sdks/iOS/AdobeMobileLibrary/ADBMobile.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// Copyright 1996-2015. Adobe, Inc. All Rights Reserved
//
// SDK Version: 4.4.1
// SDK Version: 4.5.0

#import <Foundation/Foundation.h>
@class CLLocation, CLBeacon, ADBTargetLocationRequest, ADBMediaSettings, ADBMediaState;
Expand Down Expand Up @@ -93,8 +93,6 @@ 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.
Expand All @@ -109,6 +107,12 @@ typedef NS_ENUM(NSUInteger, ADBMobilePrivacyStatus) {
*/
+ (void) overrideConfigPath: (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 prior to AppDidFinishLaunching (or Activate for Watch Extension) 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) setAppGroup: (NSString *) appGroup;
#pragma mark - Analytics

/**
Expand Down Expand Up @@ -490,4 +494,4 @@ FOUNDATION_EXPORT NSString *const ADBTargetParameterMboxHost; ///< The
@property(readwrite) NSUInteger segmentNum; ///< The current segment.
@property(readwrite) NSUInteger eventType; ///< The current event type.

@end
@end
Binary file modified sdks/iOS/AdobeMobileLibrary/AdobeMobileLibrary.a
Binary file not shown.
Binary file not shown.
52 changes: 52 additions & 0 deletions sdks/iOS/AppleWatch_README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
====================================
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
4 changes: 4 additions & 0 deletions sdks/iOS/ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ 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.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/AppleWatchExample-v1.0-iOS-watch

4.4.1 (16 Apr, 2015)
- Added Locale(NSLocale) to in-app messaging traits
- Added custom data on lifecycle to in-app messaging traits
Expand Down

0 comments on commit 458a004

Please sign in to comment.