Java
- Add the Mobile Core and Places extensions to your project using the app's Gradle file.
Copied to your clipboardimplementation 'com.adobe.marketing.mobile:core:1.+'implementation 'com.adobe.marketing.mobile:places:1.+'
- Import the Mobile Core and Places extensions in your Application class.
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCore;import com.adobe.marketing.mobile.Places;
- Add the Mobile Core and Places extensions to your project using CocoaPods. Add the following pods in your
Podfile
:
Copied to your clipboarduse_frameworks!target 'YourTargetApp' dopod 'ACPCore', '~> 2.0'pod 'ACPPlaces', '~> 1.0'end
- Import the Mobile Core and Places modules:
Swift
Copied to your clipboard// AppDelegate.swiftimport ACPCoreimport ACPPlaces
Objective-C
Copied to your clipboard// AppDelegate.h#import "ACPCore.h"#import "ACPPlaces.h"
Java
Copied to your clipboardpublic class MobileApp extends Application {@Overridepublic void onCreate() {super.onCreate();MobileCore.setApplication(this);try {Places.registerExtension();// register other extensionsMobileCore.start(new AdobeCallback () {@Overridepublic void call(Object o) {MobileCore.configureWithAppID("yourAppId");}});} catch (Exception e) {//Log the exception}}}
Swift
Copied to your clipboard// AppDelegate.swiftfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {ACPPlaces.registerExtension()ACPCore.configure(withAppId: "yourAppId")ACPCore.start()})...}
Objective-C
Copied to your clipboard// AppDelegate.m- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[ACPPlaces registerExtension];[ACPCore configureWithAppId:@"yourAppId"];[ACPCore start];...}