MobilePush iOS SDK version 9.0.0 expands your iOS push messaging capabilities with the introduction of Carousel push notifications, Push Delivery events, and Inbox 2.0 support. Upgrading to this version enables you to create more engaging interactive push notifications, gain valuable delivery insights, and enhance your in-app messaging with richer content and flexible call-to-action options.
This article outlines the steps to upgrade from MobilePush iOS SDK version 8.x to version 9.0.0 and all subsequent 9.x releases. The upgrade steps include integrating the new MobilePush SDK Extension for iOS, updating PushInterface method signatures, and migrating iOS Service Extension code.
Integrate the MobilePush SDK Extension for iOS
For your iOS app to support Push Delivery events and engaging Carousel templates, which require Service and Content Extensions, you must integrate the MobilePush iOS Extension SDK. For detailed instructions, see Integrate the MobilePush SDK Extension for iOS.
Update PushInterface Method Signatures
MobilePush iOS SDK version 9.0.0 introduces changes to the PushInterface method signatures to support Carousel push notifications and Inbox 2.0 features. These updates involve modifications to the UNUserNotificationCenterDelegate implementation and the removal of custom inbox message handling methods.
Update your existing UNUserNotificationCenterDelegate implementation as shown in this example.
1// MobilePush SDK: REQUIRED IMPLEMENTATION2// The method will be called on the delegate when the user responded to the notification by opening the application,3// dismissing the notification or choosing a UNNotificationAction.4// The delegate must be set before the application returns from applicationDidFinishLaunching:.5@available(iOS 10.0, *)6func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping() ->Void){7 // Required: tell the MarketingCloudSDK about the notification. This will collect mobile app analytics8 // and process the notification on behalf of your application.9 SFMCSdk.requestPushSdk{ mp in10 mp.setNotificationResponse(response)11}12 completionHandler()13}
Inbox Message Handling Changes
In version 9.0.0 and later, the MobilePush SDK for iOS doesn’t support custom data sources and delegates for the inbox table view. These methods have been removed:
The MobilePush iOS Extension SDK now provides built-in methods for handling common Service Extension tasks, such as customizing notification content and managing push notification delivery. If your app uses custom code in its Service Extension, use the provided customization methods of the MobilePush iOS Extension SDK.
For a complete implementation example, see the iOS LearningApp.