Deep-Linking

Deep-linking - is a type of action of when the user open the push notification. It provide the ability to open a specific page within the app.

  • Make sure that the developer understand that they need to define a URL scheme

Appoxee SDK will trigger deep linking in the same manner the iOS will trigger deep linking (Using URL Schemes to Communicate with Apps).

 

Deep linking can be sent using the following:

  • apx_dpl is supplied as an extra field key, with a valid URL scheme value
  • Sending a push action with a deep link action.

 

See example below:

Objective-C

#pragma mark - Schemes

 
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
    [self handleScheme:url];
    return YES;
}

- (BOOL)application:(UIApplication *)application openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<NSString *,id> *)options
{
    [self handleScheme:url];
    return YES;
}

- (void)handleScheme:(NSURL *)scheme
{
	// Your implementation of a url scheme.
	// When the app is in the foreground and a notification arrives, the SDK does not display the notification 
	// Make sure you set the behaviour to handle cases when app is in the foreground/background
}

 

Swift

#pragma mark - Schemes

 
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
    
    handleScheme(url)
    
    return true
}


func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
    
    handleScheme(url)
    
    return true
}

func handleScheme(scheme: NSURL) {
    
    // Your implementation of a url scheme.
    // When the app is in the foreground and a notification arrives, the SDK does not display the notification
    // Make sure you set the behaviour to handle cases when app is in the foreground/background
}