Edit in GitHubLog an issue

Java

  1. Add the Mobile Core and Places extensions to your project using the app's Gradle file.
Copied to your clipboard
implementation 'com.adobe.marketing.mobile:core:1.+'
implementation 'com.adobe.marketing.mobile:places:1.+'
  1. Import the Mobile Core and Places extensions in your Application class.
Copied to your clipboard
import com.adobe.marketing.mobile.MobileCore;
import com.adobe.marketing.mobile.Places;
  1. Add the Mobile Core and Places extensions to your project using CocoaPods. Add the following pods in your Podfile:
Copied to your clipboard
use_frameworks!
target 'YourTargetApp' do
pod 'ACPCore', '~> 2.0'
pod 'ACPPlaces', '~> 1.0'
end
  1. Import the Mobile Core and Places modules:

Swift

Copied to your clipboard
// AppDelegate.swift
import ACPCore
import ACPPlaces

Objective-C

Copied to your clipboard
// AppDelegate.h
#import "ACPCore.h"
#import "ACPPlaces.h"

Java

Copied to your clipboard
public class MobileApp extends Application {
@Override
public void onCreate() {
super.onCreate();
MobileCore.setApplication(this);
try {
Places.registerExtension();
// register other extensions
MobileCore.start(new AdobeCallback () {
@Override
public void call(Object o) {
MobileCore.configureWithAppID("yourAppId");
}
});
} catch (Exception e) {
//Log the exception
}
}
}

Swift

Copied to your clipboard
// AppDelegate.swift
func 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];
...
}
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.