{"__v":29,"_id":"562014118a05d7230006ffb6","category":{"__v":18,"_id":"562014108a05d7230006ffad","pages":["562014118a05d7230006ffb6","562014118a05d7230006ffb7","562014118a05d7230006ffb8","562014118a05d7230006ffb9","562014118a05d7230006ffba","562014118a05d7230006ffbb","562014118a05d7230006ffbc","562014118a05d7230006ffbd","562014118a05d7230006ffbe","562014118a05d7230006ffbf","562014118a05d7230006ffc0","5620146f8a05d72300070013","565ed96ff76b8d0d0055422b","565f1bb623fd5f0d00a12a51","565f2996413e06170093de98","565f29db0dc99e1900f24ba8","565f2b23649b951900c89724","565f2b5d413e06170093de9e","5666d8b46819320d000c2e10","5666dd1866debc1700503e38","5666e3da5d00370d00ede577","5666ef36f672550d000851aa","5666f1116819320d000c2e3e","5666f7bf6819320d000c2e53","5672d7fe3cab740d00d15a48","56e961cef3c3031900041af4","56ebc03943304e2900e2116f","56f116a0ab5e790e00fb3950"],"project":"54861bb654b3ce0b00367292","version":"5620140f8a05d7230006ffac","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-12-08T21:55:25.679Z","from_sync":false,"order":0,"slug":"1-setup","title":"Onboarding/Moment integration"},"parentDoc":null,"project":"54861bb654b3ce0b00367292","user":"54861b9f3681d914006992a4","version":{"__v":3,"_id":"5620140f8a05d7230006ffac","project":"54861bb654b3ce0b00367292","createdAt":"2015-10-15T21:01:03.908Z","releaseDate":"2015-10-15T21:01:03.908Z","categories":["562014108a05d7230006ffad","562014108a05d7230006ffae","562014108a05d7230006ffaf","562014108a05d7230006ffb0","562014108a05d7230006ffb1","562014108a05d7230006ffb2","562014108a05d7230006ffb3","562014108a05d7230006ffb4","562014108a05d7230006ffb5","5666f7f5d784a70d00397bff","56967935b6d61f0d00acfb0b"],"is_deprecated":true,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"Moments","version_clean":"2.0.0","version":"2.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-12-09T11:59:00.145Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"never","params":[],"url":""},"isReference":false,"order":0,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Adding the Elasticode framework in 3 simple steps\"\n}\n[/block]\n**1. Drag the Elasticode.framework and bundle into your Xcode project**\n\n**2. Add the following libraries to your project:**\n  * *AVFoundation.framework*\n  * *Security.framework*\n  * *SystemConfiguration.framework*\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"2.1 For SWiFT Users\",\n  \"body\": \"1. Create a Bridging Header: (to support Objective-C in swift project)\\n\\n2.  Create a dummy Objective-C object file (e.g., dummyFile.m) in your project.\\n\\n3. Xcode will ask you whether you want to create a bridging header, click \\\"Yes\\\".\\n(There have been settings changes in the project file, as well, to get Swift to look to this new header for information)\\n\\n( You can now delete dummyFile.m)\"\n}\n[/block]\n \n\n**3. Add the following import code in AppDelegate.h**\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#import <ElastiCode/ElastiCode.h>\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"#import <ElastiCode/ElastiCode.h>\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"On iOS 9\",\n  \"body\": \"On iOS 9, add App Transport Security Settings exceptions to application's plist.\\nYou can see an example for that here as well: [Facebook SDK Install](https://developers.facebook.com/docs/ios/ios9)\"\n}\n[/block]\nWhitelist our domains:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<key>NSAppTransportSecurity</key>\\n<dict>\\n\\t<key>NSExceptionDomains</key>\\n  <dict>\\n  \\t<key>appove-api.com</key>\\n    <dict>\\n    \\t<key>NSIncludesSubdomains</key>\\n      <true/>\\n      <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>\\n      <true/>\\n    </dict>\\n  </dict>\\n</dict>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/S4DSvbHBQv6DmVT2v0yj_addHTTP2_4_2.gif\",\n        \"addHTTP2_4_2.gif\",\n        \"877\",\n        \"751\",\n        \"#3a7dc7\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n**4. last part... Just add the following code to your appDelegate.m** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\\n   // Override point for customization after application launch.\\n    #ifdef DEBUG\\n        [ElastiCode devModeWithLogging:elastiCodeLogLevelErrors];\\n    #endif\\n        [ElastiCode startSession::::at:::\\\"your-api-key\\\" onBoardingVersion:@\\\"1.0\\\"];    \\n  return YES;\\n}\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"class AppDelegate: UIResponder, UIApplicationDelegate {\\nvar window: UIWindow?\\n\\nfunc application(application: UIApplication, didFinishLaunchingWithOptions\\n       launchOptions: [NSObject: AnyObject]?) -> Bool {\\n   // Override point for customization after application launch.\\n    #if DEBUG\\n        ElastiCode .devModeWithLogging(elastiCodeLogLevelErrors)\\n    #endif\\n        ElastiCode .startSession(\\\"your-api-key\\\", onBoardingVersion: \\\"1.0\\\")    \\n        return true\\n}\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"That's it!!!\"\n}\n[/block]\nOnce you will refresh the dashboard you could add your onboarding​ and walkthroughs","excerpt":"Let's get this SDK up and running","slug":"sdk-intro","type":"basic","title":"Onboarding Setup"}

Onboarding Setup

Let's get this SDK up and running

[block:api-header] { "type": "basic", "title": "Adding the Elasticode framework in 3 simple steps" } [/block] **1. Drag the Elasticode.framework and bundle into your Xcode project** **2. Add the following libraries to your project:** * *AVFoundation.framework* * *Security.framework* * *SystemConfiguration.framework* [block:callout] { "type": "info", "title": "2.1 For SWiFT Users", "body": "1. Create a Bridging Header: (to support Objective-C in swift project)\n\n2. Create a dummy Objective-C object file (e.g., dummyFile.m) in your project.\n\n3. Xcode will ask you whether you want to create a bridging header, click \"Yes\".\n(There have been settings changes in the project file, as well, to get Swift to look to this new header for information)\n\n( You can now delete dummyFile.m)" } [/block] **3. Add the following import code in AppDelegate.h** [block:code] { "codes": [ { "code": "#import <ElastiCode/ElastiCode.h>", "language": "objectivec" }, { "code": "#import <ElastiCode/ElastiCode.h>", "language": "swift" } ] } [/block] [block:callout] { "type": "warning", "title": "On iOS 9", "body": "On iOS 9, add App Transport Security Settings exceptions to application's plist.\nYou can see an example for that here as well: [Facebook SDK Install](https://developers.facebook.com/docs/ios/ios9)" } [/block] Whitelist our domains: [block:code] { "codes": [ { "code": "<key>NSAppTransportSecurity</key>\n<dict>\n\t<key>NSExceptionDomains</key>\n <dict>\n \t<key>appove-api.com</key>\n <dict>\n \t<key>NSIncludesSubdomains</key>\n <true/>\n <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>\n <true/>\n </dict>\n </dict>\n</dict>", "language": "xml" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/S4DSvbHBQv6DmVT2v0yj_addHTTP2_4_2.gif", "addHTTP2_4_2.gif", "877", "751", "#3a7dc7", "" ] } ] } [/block] **4. last part... Just add the following code to your appDelegate.m** [block:code] { "codes": [ { "code": "- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n // Override point for customization after application launch.\n #ifdef DEBUG\n [ElastiCode devModeWithLogging:elastiCodeLogLevelErrors];\n #endif\n [ElastiCode startSession:@\"your-api-key\" onBoardingVersion:@\"1.0\"]; \n return YES;\n}", "language": "objectivec" }, { "code": "class AppDelegate: UIResponder, UIApplicationDelegate {\nvar window: UIWindow?\n\nfunc application(application: UIApplication, didFinishLaunchingWithOptions\n launchOptions: [NSObject: AnyObject]?) -> Bool {\n // Override point for customization after application launch.\n #if DEBUG\n ElastiCode .devModeWithLogging(elastiCodeLogLevelErrors)\n #endif\n ElastiCode .startSession(\"your-api-key\", onBoardingVersion: \"1.0\") \n return true\n}", "language": "swift" } ] } [/block] [block:api-header] { "type": "basic", "title": "That's it!!!" } [/block] Once you will refresh the dashboard you could add your onboarding​ and walkthroughs