Configure the MobilePush SDK Flutter Plugin for iOS Apps

After you install and configure the MobilePush SDK Flutter plugin, configure the plugin to enable push support for the iOS platform.

Before you configure the MobilePush SDK Flutter plugin for iOS apps, make sure that the plugin is installed and configured for your app. See Marketing Cloud Flutter Plugin.

Enable push notifications in your target’s Capabilities settings in Xcode.

Enable Push

  1. Navigate to the YOUR_APP/ios directory and open Runner.xcworkspace.

  2. To configure the SDK and enable push, update AppDelegate.

The SDK doesn’t automatically present URLs from these sources.

  • CloudPages URLs from push notifications
  • OpenDirect URLs from push notifications
  • Action URLs from in-app messages

To handle URLs from push notifications, follow these steps.

  1. Set the setURLHandlingDelegate.
  2. Implement the URLHandlingDelegate.

To set the URLHandlingDelegate, update the AppDelegate as shown in this example.

Implement the URLHandlingDelegate in AppDelegate, as shown in this example.

Also review the additional documentation on URL Handling

Rich notifications include images, videos, titles, subtitles, and mutable content. Mutable content can include personalization in the title, subtitle, or body of your message.

For implementation details, see Send Rich Notifications.

If you encounter a cycle error in your Flutter Xcode project after adding a Notification Service Extension, follow these steps to fix it.

  1. Navigate to YOUR_APP_TARGET in Xcode.
  2. With your app target selected, go to the Build Phases tab.
  3. Find Embed Foundation Extension.
  4. Drag and position it above both Thin Binary and Embed Pods Frameworks.

Reordering the build phases resolves the cycle error.