{"__v":0,"_id":"57d12c8265042a1700668386","category":{"project":"54861bb654b3ce0b00367292","version":"57b96d6b1d08500e00bf81d1","_id":"57d12c6c1227b40e0044908a","__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":7,"_id":"57b96d6b1d08500e00bf81d1","project":"54861bb654b3ce0b00367292","createdAt":"2016-08-21T08:59:23.326Z","releaseDate":"2016-08-21T08:59:23.326Z","categories":["57b96d6b1d08500e00bf81d2","57b96d6b1d08500e00bf81d3","57b96d6b1d08500e00bf81d4","57b96d6b1d08500e00bf81d5","57b96d6b1d08500e00bf81d6","57b96d6b1d08500e00bf81d7","57b96d6b1d08500e00bf81d8","57b96d6b1d08500e00bf81d9","57b96d6b1d08500e00bf81da","57b96d6b1d08500e00bf81db","57b96d6b1d08500e00bf81dc","57b97748306b9b0e001dd53f","57d12c6c1227b40e0044908a","57d51ad68191880e008bb51b","57d52b5cf350090e00fe073e","57d5468a17b492170053a3f0","57df9df05927cb0e002bce1e"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"","version_clean":"4.0.0","version":"4.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":0,"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]