Goal
This topic covers an automatic integration (basic) where you just need to add one method to your project & plist configuration file.
...
<? xml version = "1.0" encoding = "UTF-8" ?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> < plist version = "1.0" > < dict > < key >sdk</ key > < dict > < key >sdk_key</ key > < string ></ string > < key >is_eu</ key > <!-- Optional, indicate if account is EU / US --> < false /> < key >open_landing_page_inside_app</ key > <!-- Optional, indicate if landing page should open inside the app or via Safari --> < false /> </ dict > </ dict > </ plist > |
3. For an automatic integration (basic), add the following implementation to the method named: application:didFinishLaunchingWithOptions:
Objective-C
Code Block | ||
---|---|---|
| ||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Method takes into consideration a valid AppoxeeConfig.plist file in your application. [[Appoxee shared] engageAndAutoIntegrateWithLaunchOptions:launchOptions andDelegate:nil]; return YES; } |
Swift
Code Block |
---|
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Method takes into consideration a valid AppoxeeConfig.plist file in your application. Appoxee.shared()?.engageAndAutoIntegrateWithLaunchOptions(launchOptions, andDelegate: nil) return true } |
Push Token
Please note that the "Request Push notification permission" dialog will be called on first app lunch. In order to show the dialog based on your own logic refer to : Request Notification at Best Time