Create an App on the Platform
1. Once logged in if you don't have one ready to use, add a NEW project.
If you are creating a New project you will need to enter the following details and click save to initialise your project:
- Title: Name used to identify project on the platform, something obvious to help you find it.
- Description: A short description of what the project is for.
- Timezone: The timezone used for analytics in the project. Important this will dictate the starting point for analytics like daily users. You can set this to the local timezone of platform users if this makes sense. Default is UTC, which is a good compromise if users are likely to be spread across different timezones.
- Icon: Helps to identify project on the platform, use app icon to help you find it.
2. Before you integrate if you haven't already next you will need to add the applications you want to integrate, in the Applications section of the project.
Go to: Settings (bottom left) > Applications
Then select: Add IOS APP
If you want to add an iOS App select Add iOS App and you will need to fill out some details. If you are adding a New iOS App you will need to enter some details initially just add a name and click save to initialise your Android App:
- Name: Name used to identify App on the platform, something obvious to help you find it.
- App Store Play URL/Download link: Optional - used if you are using attributions can be filled out later
- iOS Bundle ID: Optional - used if you are using attributions can be filled out later
- Push Notification Certs: Credential(s) needed to send push notifications can be filled out later. Optional if not doing Notifications.
3. After adding Apps you will see they appear listed in the Applications section. An application key that is used in the integration will appear in the table for each app and you can return to the Apps Setting page as seen above by clicking on the Settings link. From here you will be able to add/update notification credentials for example.
Upload Push Certs
Go to your project home and navigate to Applications. On the right-hand side click the Settings link for the relevant iOS application and upload your app's APNS Push Notification certs 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:
3. In case your project is provisioned in US datacenter add the following code after XPush.setAppKey:
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.