{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"Supporting Deeplinks","type":"basic","slug":"supporting-deep-links","excerpt":"","body":"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. \n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"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.\",\n  \"title\": \"Deeplinks must be unique\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Add / Edit / Delete Deeplinks in Pulsate CMS\"\n}\n[/block]\nThe first step is adding the Deeplinks in the Pulsate CMS to later allow using them in campaigns (https://control.pulsatehq.com).\n\nFrom the CMS dashboard select your application and click Settings/App Settings.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/332732e-Screenshot_2020-02-28_at_14.23.34.png\",\n        \"Screenshot 2020-02-28 at 14.23.34.png\",\n        2348,\n        502,\n        \"#f4f4f4\"\n      ]\n    }\n  ]\n}\n[/block]\nIn the App Settings you will find the \"Add Deeplink\" and \"Manage Deeplinks\" sections.\nTo add a Deeplink just specify it's name and it's value and click \"Save\".\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/f2105fa-Screenshot_2020-02-28_at_14.31.37.png\",\n        \"Screenshot 2020-02-28 at 14.31.37.png\",\n        2232,\n        926,\n        \"#e9e9ea\"\n      ]\n    }\n  ]\n}\n[/block]\nThe Deeplink should now be added to your account. You can now use them when building campaigns.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/002c85e-Screenshot_2020-02-28_at_14.38.37.png\",\n        \"Screenshot 2020-02-28 at 14.38.37.png\",\n        2274,\n        1022,\n        \"#eaeaea\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Create Deeplink to call Phone Number\",\n  \"body\": \"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.\"\n}\n[/block]\nAlready existing Deeplinks can be edited or deleted by using the \"Edit\" and \"Delete\" buttons next to the Deeplink.\n\nAlternatively deeplinks can be added using our [CMS API](https://pulsate.readme.io/v2.2/docs/deeplinks-create-one).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Adding Deeplinks to your App\"\n}\n[/block]\nIn order to support deep linking you have to specify the URL scheme in your XCode Project and implement an *AppDelegate* method.\n\nSelect your project in XCode and select the *Info* tab.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/CyuVT2vpQAW8KzqycviH_Screen%20Shot%202015-09-15%20at%2011.12.44.png\",\n        \"Screen Shot 2015-09-15 at 11.12.44.png\",\n        \"685\",\n        \"88\",\n        \"#842f11\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nExpand the *URL Types* menu. Enter your *Bundle Id* in the *Identifier* field and the URL Scheme you wish to use.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/gBH8yk3sTiaVTusckITq_Screen%20Shot%202015-09-15%20at%2011.17.01.png\",\n        \"Screen Shot 2015-09-15 at 11.17.01.png\",\n        \"933\",\n        \"176\",\n        \"#335289\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nYou can test it by entering *myapp://* into your iOS web browser.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Handling the Deeplinks\"\n}\n[/block]\nWhen 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:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {\\n\\t\\tif ([[url absoluteString] isEqualToString::::at:::\\\"myapp://clothes\\\"]) {\\n        [self openClothesViewController];\\n    }\\n}\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {\\n    if (url.absoluteString() == \\\"myapp://clothes\\\") {\\n        self.openClothesViewController()\\n    }\\n}\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]","updates":[],"order":12,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5e5013741b3b2000653294a9","__v":7,"createdAt":"2015-09-15T09:16:43.081Z","category":{"sync":{"isSync":false,"url":""},"pages":["5e5013741b3b20006532949e","5e5013741b3b20006532949f","55781fe45129590d003ff519","5e5013741b3b2000653294a0","5e5013741b3b2000653294a1","5e5013741b3b2000653294a2","5e5013741b3b2000653294a3","5e5013741b3b2000653294a4","55781fe45129590d003ff51f","55781fe45129590d003ff520","55781fe45129590d003ff521","5e5013741b3b2000653294a5","5e5013741b3b2000653294a6","5e5013741b3b2000653294a8","5e5013741b3b2000653294a9","5e5013741b3b2000653294ad","5e5013741b3b2000653294ae","5e5013741b3b2000653294af","5e5013741b3b2000653294b1","5e5013741b3b2000653294bc","5e5013741b3b2000653294be","5e5013741b3b2000653294c2"],"title":"iOS SDK","slug":"ios-sdk","order":1,"from_sync":false,"reference":false,"_id":"5e5013741b3b200065329487","version":"5e5013741b3b20006532951d","__v":11,"createdAt":"2015-01-05T12:43:51.897Z","project":"54aa7f773b56130b0056c86e"},"githubsync":"","parentDoc":null,"project":"54aa7f773b56130b0056c86e","user":"54aa7f3f9bb00c0b00cb899b","version":{"version":"2.7","version_clean":"2.7.0","codename":"iOS SDK","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5e5013741b3b200065329486","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","5e5013741b3b200065329487","5e5013741b3b200065329488","5e5013741b3b200065329489","5e5013741b3b20006532948a","5e5013741b3b20006532948b","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","5e5013741b3b20006532948c","5e5013741b3b20006532948d","5c73dd27e8fdc000572a206a","5e5013741b3b20006532948e","5e53d9a2f75c0b0020de8935"],"_id":"5e5013741b3b20006532951d","project":"54aa7f773b56130b0056c86e","forked_from":"5e4fbbbda8fb41028f1861fe","__v":1,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z"}}

Supporting Deeplinks


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. [block:callout] { "type": "danger", "body": "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.", "title": "Deeplinks must be unique" } [/block] [block:api-header] { "title": "Add / Edit / Delete Deeplinks in Pulsate CMS" } [/block] 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. [block:image] { "images": [ { "image": [ "https://files.readme.io/332732e-Screenshot_2020-02-28_at_14.23.34.png", "Screenshot 2020-02-28 at 14.23.34.png", 2348, 502, "#f4f4f4" ] } ] } [/block] 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". [block:image] { "images": [ { "image": [ "https://files.readme.io/f2105fa-Screenshot_2020-02-28_at_14.31.37.png", "Screenshot 2020-02-28 at 14.31.37.png", 2232, 926, "#e9e9ea" ] } ] } [/block] The Deeplink should now be added to your account. You can now use them when building campaigns. [block:image] { "images": [ { "image": [ "https://files.readme.io/002c85e-Screenshot_2020-02-28_at_14.38.37.png", "Screenshot 2020-02-28 at 14.38.37.png", 2274, 1022, "#eaeaea" ] } ] } [/block] [block:callout] { "type": "info", "title": "Create Deeplink to call Phone Number", "body": "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." } [/block] Already existing Deeplinks can be edited or deleted by using the "Edit" and "Delete" buttons next to the Deeplink. Alternatively deeplinks can be added using our [CMS API](https://pulsate.readme.io/v2.2/docs/deeplinks-create-one). [block:api-header] { "type": "basic", "title": "Adding Deeplinks to your App" } [/block] 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. [block:image] { "images": [ { "image": [ "https://files.readme.io/CyuVT2vpQAW8KzqycviH_Screen%20Shot%202015-09-15%20at%2011.12.44.png", "Screen Shot 2015-09-15 at 11.12.44.png", "685", "88", "#842f11", "" ] } ] } [/block] Expand the *URL Types* menu. Enter your *Bundle Id* in the *Identifier* field and the URL Scheme you wish to use. [block:image] { "images": [ { "image": [ "https://files.readme.io/gBH8yk3sTiaVTusckITq_Screen%20Shot%202015-09-15%20at%2011.17.01.png", "Screen Shot 2015-09-15 at 11.17.01.png", "933", "176", "#335289", "" ] } ] } [/block] You can test it by entering *myapp://* into your iOS web browser. [block:api-header] { "type": "basic", "title": "Handling the Deeplinks" } [/block] 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: [block:code] { "codes": [ { "code": "-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {\n\t\tif ([[url absoluteString] isEqualToString:@\"myapp://clothes\"]) {\n [self openClothesViewController];\n }\n}", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {\n if (url.absoluteString() == \"myapp://clothes\") {\n self.openClothesViewController()\n }\n}", "language": "swift" } ] } [/block]