Oracle Help Center | Oracle Responsys Mobile App Platform Cloud Service title

Intercepting Open URL Notifications

This topic provides steps for intercepting Open URLs sent from the Responsys Message Designer. Open URLs, or "deep links" are push notification actions configured from the Responsys Campaign Designer as shown below.

"`open url` linker switch added"

 

Open URL Interception

Open URLs are sent from the Responsys Server are opened using the SDK with the iOS API: openURL.

With the Responsys SDK version 20D/6.47 or later, you can intercept these URLs and deep links. Follow below steps to intercept the URLs.

 

[1] Implement the delegate

Deep link intercepting is available with SDK versions 20D/6.47 SDK or later. To intercept Open URLs and deep links sent from the Responsys server, implement PIODeepLinkDelegate delegate and set your delegate on PushIOManager as shown below.

[[PushIOManager sharedInstance] setDeeplinkDelegate:self]; //Do it in Application launch or after configuring SDK

@interface AppDelegate ()<PIODeepLinkDelegate> //Implement Delegate
@end

@implementation AppDelegate

//Implement delegate method
- (BOOL)handleOpenURL:(NSURL *)url {
    NSLog(@"Deep Link URL: %@",[url absoluteString]);
    return YES; //Return `YES` if you want to handle URL else `NO` for SDK default behaviour.
}
//Implement delegate        
class AppDelegate: UIResponder, UIApplicationDelegate, , PIODeepLinkDelegate {

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        //Set the deep link delegate.
        PushIOManager.sharedInstance().deeplinkDelegate = self  //Do it in Application launch or after configuring SDK


        ...

        return true
    }

    //Implement delegate method
    func handleOpen(_ url: URL!) -> Bool {
        print(url.absoluteString)

        return true //Return `true` if you want to handle URL, else return `false` for SDK default behaviour.
    }

}
        

Return YES from handleOpenURL method if you want to handle the URL, else return NO for SDK defuault behaviour.