Deeplinks can be used to link from Pulsate to your App, other Apps or Call Phone numbers. The Pulsate Panel allows you to create buttons in your marketing campaigns that will lead to deep links in your application.
Deeplinks must be unique
When creating Deeplinks that target your App please remember to pick a scheme / name that will be unique. If many Apps on the device have the same Deeplink schemes / names, upon clicking the Deeplink the phone will ask with which App should it open the Deeplink instead of instantly opening your App.
Add / Edit / Delete Deeplinks in Pulsate CMS
The first step is adding the Deeplinks in the Pulsate CMS to later allow using them in campaigns (https://control.pulsatehq.com).
From the CMS dashboard select your application and click Settings/App Settings.
In the App Settings you will find the "Add Deeplink" and "Manage Deeplinks" sections.
To add a Deeplink just specify it's name and it's value and click "Save".
The Deeplink should now be added to your account. You can now use them when building campaigns.
Create Deeplink to call Phone Number
To create a Deeplink that opens the Phone App and enters a phone number just create a Deeplink with an url formated like this "tel:+123456789". This will automatically open the Phone App on both Android and iOS and set "+123456789" as the number to call.
Already existing Deeplinks can be edited or deleted by using the "Edit" and "Delete" buttons next to the Deeplink.
Adding Deeplinks to your App
In order to support deep linking you have to specify the URL scheme in your XCode Project and implement an AppDelegate method.
Select your project in XCode and select the Info tab.
Expand the URL Types menu. Enter your Bundle Id in the Identifier field and the URL Scheme you wish to use.
You can test it by entering myapp:// into your iOS web browser.
Handling the Deeplinks
When a deeplink with your URL scheme is recognised by the system, it'll call the AppDelegate "openURL" method, in that method you should check the Deeplink and handle it:
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
if ([[url absoluteString] isEqualToString:@"myapp://clothes"]) {
[self openClothesViewController];
}
}
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
if (url.absoluteString() == "myapp://clothes") {
self.openClothesViewController()
}
}