Recently we improved significantly the iOS SDK integration process. Although the new method of integration is much simpler, if you currently are using an older version and are wishing to update, there are a few changes that you will have to make.
Import the new iOS SDK (which can be found here). The SDK is now distributed as a .framework instead of a static library.
The changes you should make to your project are:
- Remove the older XPush.h and XPush.a files from your project
- Extract the XPush.framework from the zip file.
- Drag and drop the XPush framework into your project.
- Make sure XPush.framework appears on the frameworks section of your target
If your app is a swift app, please remove the #import "XPush.h" line from your bridging header.
You can now import XPush like any other Swift module.
In newer versions we tried to do as much notification set up work as possible on your behalf, so you can concentrate on your app. We implemented UNUserNotificationCenter's delegate so you are free to delete any UserNotification framework related code and we strongly recommend doing so. If you absolutely must keep it, make sure you are forwarding the UNNotificationCenter calls to XPush.
Universal Notification Options
NotificationTypes have been improved to work with a universal notification type (XPNotificationType) rather than different types for different versions.
Delegate Function Changes
A change has been made from using didRecieveRemoteNotification. You must change this function to the following.
Custom Message Handling
In previous versions custom message handling was possible with regards to notifications, but now allows for all message types.
To changeover to the new functionality you should first remove any custom logic you added to the didReceiveRemoteNotification app.delegate function.
Now register the new callback like the following:
More details on this new callback can be found here.
Additional New Features:
FOREGROUND NOTIFICATION HANDLING:
Additional control options have been implemented to allow for more customised behaviour when a push notification is received.
More information on this feature can be found here.
Xtremepush customers now have the option of adding multiple buttons to interactive notifications.
To set up your interactive notification campaign on the platform see here.
To see how you can handle the individual button clicks, see here.