...
- Xcode application with a base SDK of iOS 9 10 and above.
- Xcode application with a deployment target of iOS 7 8 and above.
- An account on the Appoxee dashboard with a configured application.
...
Code Block | ||
---|---|---|
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { Appoxee.shared()?.engageWithLaunchOptions(launchOptions, andDelegate: nil, andSDKID: "123456789.00") return true } | ||
Info | ||
| ||
Attention! you will still need to define AppoxeeConfiguration.plist file, if you need to configure your applications environment |
6. Add the following implementation to the method named: application:didRegisterForRemoteNotificationsWithDeviceToken:
...
9. OPTIONAL STEP - To implement iOS8 'Push Actions', add the following implementation to the method named: application:handleActionWithIdentifier:forRemoteNotification:completionHandler:
Code Block |
---|
-func application(void)application:( UIApplication, *)applicationhandleActionWithIdentifier handleActionWithIdentifieridentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo String?, forRemoteNotification userInfo: [NSObject : AnyObject], completionHandler:(void (^)())completionHandler { ) -> Void) { // Must be implemented in order to enable 'Push Actions'. BOOLlet didHandlehandled = [[Appoxee shared] handleActionWithIdentifier:identifier.shared()?.handleActionWithIdentifier(identifier, forRemoteNotification: userInfo, completionHandler:completionHandler]; completionHandler) if (!didHandle) { handled == false { completionHandler(); } // Handle the action in case it is not handled by Appoxee. When done - completionHandler() must be called. } } |
10. OPTIONAL STEP – Silent push
Please review the documentation provided with the SDK for the below methods :
Code Block |
---|
- handleActionWithIdentifierapplication:handleActionWithIdentifier:forRemoteNotification:responseInfo:completionHandler: - didReceiveRemoteNotificationapplication:didReceiveRemoteNotification:fetchCompletionHandler:andNotifyCompletionWithBlock: |
11. OPTIONAL STEP - Appoxee delegate:
Code Block |
---|
#pragma mark - AppoxeeDelegate -func appoxee(void)Appoxeeappoxee:( Appoxee, *)appoxeehandledRemoteNotification handledRemoteNotificationpushNotification:( APXPushNotification, *)pushNotificationandIdentifer andIdentiferactionIdentifier:(NSString *String)actionIdentifier { // a push notification was recieved. } |