Handle Messages with a URL
The SDK doesn’t automatically present URLs from these sources.
- CloudPage URLs from push notifications
- OpenDirect URLs from push notifications
- CloudPage URLs from inbox messages using the built-in
To handle URLs from these sources, follow these instructions.
- Implement the
MarketingCloudSDKURLHandlingDelegateprotocol in your app.
- Use the
sfmc_setURLHandlingDelegate:method to set a delegate for this protocol.
If you implement the
sfmc_handleURL:type:protocol method and set
MarketingCloudSDKURLHandlingDelegate, the SDK calls the
sfmc_setURLHandlingDelegate:method. The SDK passes to your implementation of
sfmc_handleURL:type:an NSURL value. This value contains the data of the push notification or inbox message, including the URL. A type value also reflects the source of the URL, either
MarketingCloudSDK+URLHandling.hfor more information.