{"_id":"55f7e1fbe32e9b0d00a2d4d0","__v":7,"category":{"_id":"55781fe35129590d003ff4fb","version":"55781fe25129590d003ff4f7","__v":11,"pages":["55781fe45129590d003ff517","55781fe45129590d003ff518","55781fe45129590d003ff519","55781fe45129590d003ff51a","55781fe45129590d003ff51b","55781fe45129590d003ff51c","55781fe45129590d003ff51d","55781fe45129590d003ff51e","55781fe45129590d003ff51f","55781fe45129590d003ff520","55781fe45129590d003ff521","55781fe45129590d003ff522","5579ab5fc7fb3f2100096fad","55f7de1660cc850d008a7a22","55f7e1fbe32e9b0d00a2d4d0","561f72bacec1a50d00979598","561f764f61c0521700acc428","563337539c607719001b85dd","564318f1f49bfa0d002f5566","564f03454f000617007bd670","565ee80a23fd5f0d00a129f9","56793cd73473bc0d008e141b"],"project":"54aa7f773b56130b0056c86e","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-01-05T12:43:51.897Z","from_sync":false,"order":3,"slug":"ios-sdk","title":"iOS SDK"},"githubsync":"","parentDoc":null,"project":"54aa7f773b56130b0056c86e","user":"54aa7f3f9bb00c0b00cb899b","version":{"_id":"55781fe25129590d003ff4f7","project":"54aa7f773b56130b0056c86e","forked_from":"54aa7f773b56130b0056c871","__v":6,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z","categories":["55781fe35129590d003ff4f8","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","55781fe35129590d003ff4fb","55781fe35129590d003ff4fc","55781fe35129590d003ff4fd","55781fe35129590d003ff4fe","564bbc7e8841060d00abb2ee","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","582318b23b961a0f009516a1","594a848c9f4771001a43c959"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Developers","version_clean":"2.0.0","version":"2.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-15T09:16:43.081Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":12,"body":"The Pulsate Panel allows you to create buttons in your marketing campaigns that will lead to deep links in your application.\n\nIn order to support deep linking you have to specify the URL scheme in your XCode Project and implement an *AppDelegate* method.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Setting the URL Scheme\"\n}\n[/block]\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 Deep Links\"\n}\n[/block]\nWhen a deep link with your URL scheme is recognised by the system, it'll call the *AppDelegate* method: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options\\n{\\n\\t\\tif ( [[url absoluteString] isEqualToString::::at:::\\\"myapp://clothes\\\"] )\\n    {\\n      //Use the closeAutomaticallyOpenedFeed method on the manager if you need to close feed that might've been opened automatically by a push campaign\\n     //\\t[pulsateManager closeAutomaticallyOpenedFeed];\\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      //Use the closeAutomaticallyOpenedFeed method on the manager if you need to close feed that might've been opened automatically by a push campaign\\n     //\\tpulsateManager.closeAutomaticallyOpenedFeed()\\n        self.openClothesViewController()\\n    }\\n}\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\nWhen you have specified these deeplinks, please send them to your Pulsate Customer Success representative and we will add them to your account so that you can select them when building a campaign.","excerpt":"","slug":"supporting-deep-links","type":"basic","title":"Supporting Deep links"}

Supporting Deep links


The Pulsate Panel allows you to create buttons in your marketing campaigns that will lead to deep links in your application. In order to support deep linking you have to specify the URL scheme in your XCode Project and implement an *AppDelegate* method. [block:api-header] { "type": "basic", "title": "Setting the URL Scheme" } [/block] 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 Deep Links" } [/block] When a deep link with your URL scheme is recognised by the system, it'll call the *AppDelegate* method: [block:code] { "codes": [ { "code": "-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options\n{\n\t\tif ( [[url absoluteString] isEqualToString:@\"myapp://clothes\"] )\n {\n //Use the closeAutomaticallyOpenedFeed method on the manager if you need to close feed that might've been opened automatically by a push campaign\n //\t[pulsateManager closeAutomaticallyOpenedFeed];\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 //Use the closeAutomaticallyOpenedFeed method on the manager if you need to close feed that might've been opened automatically by a push campaign\n //\tpulsateManager.closeAutomaticallyOpenedFeed()\n self.openClothesViewController()\n }\n}", "language": "swift" } ] } [/block] When you have specified these deeplinks, please send them to your Pulsate Customer Success representative and we will add them to your account so that you can select them when building a campaign.