Enable Push
Implement Push
Before starting, make sure you have provisioned your app for push notifications outlined in Provision for Push document.
-
Enable push notifications in your target’s Capabilities settings.
-
Set your
AppDelegate
class to adhere to theUIApplicationDelegate
andUNUserNotificationCenterDelegate
protocol. -
Extend the SDK configuration code outlined in Configure the SDK to add support for push registration.
> Note: for information on handling URLs in MobilePush messages, see [Handling URLs](/MarketingCloudSDK-iOS/sdk-implementation/implementation-urlhandling.html).
- Add the required
UIApplicationDelegate
protocol methods (to support push registration) to your AppDelegate class.
- Add the required
UNUserNotificationCenterDelegate
protocol methods (to support push notifications) to your AppDelegate class.
> These methods use MarketingCloud SDK methods to enable the framework’s functionality to manage push notifications, which includes MobilePush contact registration and push analytics tracking.
> If you implement the methods without using the MarketingCloud SDK methods as shown, MobilePush functionality does not work as expected. If you **do not** implement the methods, MobilePush functionality **does not** work.
Continue Push Setup with Rich Notifications
See Rich Notifications for more information on handling rich notifications (iOS mutable-content
) in MobilePush.