{"category":{"version":"588861fa165af631008ee1b8","project":"54861bb654b3ce0b00367292","_id":"588861fa165af631008ee1bb","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-09-08T09:16:28.198Z","from_sync":false,"order":2,"slug":"ios-support-links","title":"iOS / Support links"},"parentDoc":null,"project":"54861bb654b3ce0b00367292","user":"54861b9f3681d914006992a4","version":{"__v":1,"_id":"588861fa165af631008ee1b8","project":"54861bb654b3ce0b00367292","createdAt":"2017-01-25T08:29:46.061Z","releaseDate":"2017-01-25T08:29:46.061Z","categories":["588861fa165af631008ee1b9","588861fa165af631008ee1ba","588861fa165af631008ee1bb","588861fa165af631008ee1bc","588861fa165af631008ee1bd","588861fa165af631008ee1be","588861fa165af631008ee1bf","588861fa165af631008ee1c0","588861fa165af631008ee1c1","588861fa165af631008ee1c2","588861fa165af631008ee1c3","588861fa165af631008ee1c4","588861fa165af631008ee1c5","588861fa165af631008ee1c6","588861fa165af631008ee1c7","588861fa165af631008ee1c8","588861fa165af631008ee1c9"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"5.0.0","version":"5.0"},"_id":"588861fc165af631008ee237","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-08T09:16:50.214Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":31,"body":"3 steps\n\nGet you unique code from https://mc.elasticode.com/SDK.php\nAdd the following in your info plist file:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<key>CFBundleURLTypes</key>\\n<array>\\n  <dict>\\n    <key>CFBundleURLSchemes</key>\\n    <array>\\n      <string>[uniqueKey]</string>\\n    </array>\\n  </dict>\\n</array>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\nPass to elasticode the support links data in 2 places in your app delegate:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// In your application:didFinishLaunchingWithOptions: method\\n[ElastiCode setLaunchingOptions:launchOptions];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"// In your application(application:didFinishLaunchingWithOptions:)\\nElastiCode .setLaunchingOptions(launchOptions)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"-(BOOL)application:(UIApplication *)application openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<NSString *,id> *)options\\n{\\n    return [ElastiCode openURL:url completion:^(BOOL didAppear) {\\n        \\n    }];\\n}\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {\\n        return ElastiCode.openURL(url, completion: { (didAppear) in\\n            \\n        })\\n    }\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"sl-setup","type":"basic","title":"Setup"}
3 steps Get you unique code from https://mc.elasticode.com/SDK.php Add the following in your info plist file: [block:code] { "codes": [ { "code": "<key>CFBundleURLTypes</key>\n<array>\n <dict>\n <key>CFBundleURLSchemes</key>\n <array>\n <string>[uniqueKey]</string>\n </array>\n </dict>\n</array>", "language": "xml" } ] } [/block] Pass to elasticode the support links data in 2 places in your app delegate: [block:code] { "codes": [ { "code": "// In your application:didFinishLaunchingWithOptions: method\n[ElastiCode setLaunchingOptions:launchOptions];", "language": "objectivec" }, { "code": "// In your application(application:didFinishLaunchingWithOptions:)\nElastiCode .setLaunchingOptions(launchOptions)", "language": "swift" } ] } [/block] [block:code] { "codes": [ { "code": "-(BOOL)application:(UIApplication *)application openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<NSString *,id> *)options\n{\n return [ElastiCode openURL:url completion:^(BOOL didAppear) {\n \n }];\n}", "language": "objectivec" }, { "code": "func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {\n return ElastiCode.openURL(url, completion: { (didAppear) in\n \n })\n }", "language": "swift" } ] } [/block]