Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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.

...

4. Add the following delegate notation (can also be added at AppDelegate.h): 

Code Block
class AppDelegate: UIResponder, UIApplicationDelegate, AppoxeeNotificationDelegate {

	/* Class code goes here */
}

 

5. Add the following implementation to the method named: application:didFinishLaunchingWithOptions:, Where, xxx.xxx represents the SDK ID. These were created for you with the Appoxee Dashboard:

title
Code Block
-func application(BOOL)application:( UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  , didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    
    Appoxee.shared()?.engageWithLaunchOptions(launchOptions, andDelegate: nil, andSDKID: "123456789.00")
       // Insert
other initialization code or other Frameworks code below.
   
   return YES;true
}
Info
AppoxeeConfiguration.plist

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:

Code Block
  func func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {        
	Appoxee.shared()?.didRegisterForRemoteNotificationsWithDeviceToken(deviceToken)
}

...

7. Add the following implementation to the method named: application:didReceiveRemoteNotification:

Code Block
 -func application(void)application:( UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
   [[Appoxee shared] receivedRemoteNotification:userInfo];, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) {
    
    Appoxee.shared()?.receivedRemoteNotification(userInfo)
}

 

8. Add the following implementation to the method named: application:didRegisterUserNotificationSettings:

Code Block
 -func application(void)application:( UIApplication, *)applicationdidRegisterUserNotificationSettings didRegisterUserNotificationSettingsnotificationSettings:( UIUserNotificationSettings *)notificationSettings {
   [[Appoxee shared] didRegisterUserNotificationSettings:notificationSettings];
    
    Appoxee.shared()?.didRegisterUserNotificationSettings(notificationSettings)
}

 

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.
}