Create an App on the Platform
1. Add your App on the platform by clicking *"+ NEW APP"* on your XtremePush Dashboard at dashboard.xtremepush.com
2. Enter the App Name, upload the App icon, and give a short description of the app. An App key and token have been automatically generated. The App key is used in your iOS project to connect the app and platform. The app token will only be used if you use the external API. Save your settings and copy the app key. Your saved settings should be similar to the following.
Upload Push Certs
Go to your app home and navigate to Settings > Application Keys. On the left hand side select the iOS App radio button and upload your app's iOS push notification certificates for development and production, and click save. If you certificates are password protected be sure to add the correct passwords when uploading them.
If you have not set up push notification certificates before this is covered in our article on APNs Certificates
Initialise the SDK in your App delegate
To initialise XtremePush you must modify your Application Delegate. Inside application didFinishLaunchingWithOptions add the following code to set up XtremePush:
1. In your Application Delegate, import XPush:
2. Inside applicationDidFinishLaunching:withOptions: add the following code to set up XtremePush:
Adding Push Messaging Functionality
NOTE: Xtremepush does not require you to set Delegate of UNUserNotificationCenter as it will conflict with our library.
To add the Xtremepush notifications, you must add the XPush register function call to your didFinishLaunchingWithOptions method in your Application Delegate:
If you test using development builds then you should turn on Sandbox Mode as Apple uses a different gateway for builds compiled with a development mobile provisioning profile. if you only do enterprise builds you won't need this. Set sandbox mode in a statement that will only run for development builds as it should not be turned on in production.
Inside applicationDidFinishLaunching:withOptions: add the following code to set up XtremePush:
Add the the following iOS remote notifications handling methods in Application delegate, and place the corresponding XtremePush method call in each of these as shown.
Add Interactive Notifications Support
If using interactive notifications you must also add these functions to you Application Delegate file.