{"__v":0,"_id":"57b96d6c1d08500e00bf8224","api":{"results":{"codes":[]},"settings":"","auth":"never","params":[],"url":""},"body":"**1. Download & Add the SDK**\n1.1. Sign up to our service at https://mc.elasticode.com/signUp.php \n1.2. Download our latest SDK here: https://mc.elasticode.com/SDK.php\n1.3. Drag the Elasticode.framework into your Xcode project\n\n\n**2. Add the following libraries to your project:**\n  * *AVFoundation.framework*\n  * *Security.framework*\n  * *SystemConfiguration.framework*\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"2.1 For SWiFT Users\",\n  \"body\": \"Create a bridging header: (to support Objective-C in swift project)\\n\\n1.  Create a dummy Objective-C object file (e.g., dummyFile.m) in your project.\\n2. 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) ***You can now delete dummyFile.m***\"\n}\n[/block]\n**3. importing...**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"//in AppDelegate.h\\n#import <ElastiCode/ElastiCode.h>\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"// In the bridging header file\\n#import <ElastiCode/ElastiCode.h>\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n**4. Finally, add the following code to your appDelegate (in method didFinishLaunchingWithOptions) ** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"    [ElastiCode setAPIKey::::at:::\\\"<APIKey>\\\"]; \\n \\t\\t[ElastiCode setOnLaunchCompletionBlock:^(BOOL didAppear) {}];\\n\\t  [ElastiCode ready];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"    ElastiCode.setAPIKey(\\\"<APIKey>\\\")\\n\\t\\tElastiCode.setOnLaunchCompletionBlock { (didAppear) in      }\\n    ElastiCode.ready()\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\nCheck out how it looks in your appDelegate: [AppDelegate Example](doc:appdelegate-example) \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"That's it!\"\n}\n[/block]\nYou are now good to run our <a href=\"http://helpdesk.elasticode.com/categories/1206-dynamic-onboarding\" target=\"_blank\">Dynamic onboarding</a> & <a href=\"http://helpdesk.elasticode.com/categories/1379-what-s-new\" target=\"_blank\">What's new</a>  services\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Actions & Analytics\",\n  \"body\": \"If you would like to provide more actions for buttons in your experiences or connect your experience to 3rd party analytics services, read about our [Extra setup (Optional)](doc:additional-kit)\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Interactive FAQ [Extra setup]\",\n  \"body\": \"If you plan to use our \\\"interactive FAQ\\\" as part of the Essentials Kit, \\nplease notice it requires an additional setup. For more information: [click Here](doc:dynamic-faq)\"\n}\n[/block]","category":"57b96d6b1d08500e00bf81d2","createdAt":"2014-12-09T11:59:00.145Z","excerpt":"iOS / Essentials KIt: Basic setup","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"54861bb654b3ce0b00367292","slug":"sdk-intro","sync_unique":"","title":"Basic setup","type":"basic","updates":[],"user":"54861b9f3681d914006992a4","version":"57b96d6b1d08500e00bf81d1","childrenPages":[]}

Basic setup

iOS / Essentials KIt: Basic setup

**1. Download & Add the SDK** 1.1. Sign up to our service at https://mc.elasticode.com/signUp.php 1.2. Download our latest SDK here: https://mc.elasticode.com/SDK.php 1.3. Drag the Elasticode.framework 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": "Create a bridging header: (to support Objective-C in swift project)\n\n1. Create a dummy Objective-C object file (e.g., dummyFile.m) in your project.\n2. 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) ***You can now delete dummyFile.m***" } [/block] **3. importing...** [block:code] { "codes": [ { "code": "//in AppDelegate.h\n#import <ElastiCode/ElastiCode.h>", "language": "objectivec" }, { "code": "// In the bridging header file\n#import <ElastiCode/ElastiCode.h>", "language": "swift" } ] } [/block] **4. Finally, add the following code to your appDelegate (in method didFinishLaunchingWithOptions) ** [block:code] { "codes": [ { "code": " [ElastiCode setAPIKey:@\"<APIKey>\"]; \n \t\t[ElastiCode setOnLaunchCompletionBlock:^(BOOL didAppear) {}];\n\t [ElastiCode ready];", "language": "objectivec" }, { "code": " ElastiCode.setAPIKey(\"<APIKey>\")\n\t\tElastiCode.setOnLaunchCompletionBlock { (didAppear) in }\n ElastiCode.ready()", "language": "swift" } ] } [/block] Check out how it looks in your appDelegate: [AppDelegate Example](doc:appdelegate-example) [block:api-header] { "type": "basic", "title": "That's it!" } [/block] You are now good to run our <a href="http://helpdesk.elasticode.com/categories/1206-dynamic-onboarding" target="_blank">Dynamic onboarding</a> & <a href="http://helpdesk.elasticode.com/categories/1379-what-s-new" target="_blank">What's new</a> services [block:callout] { "type": "success", "title": "Actions & Analytics", "body": "If you would like to provide more actions for buttons in your experiences or connect your experience to 3rd party analytics services, read about our [Extra setup (Optional)](doc:additional-kit)" } [/block] [block:callout] { "type": "info", "title": "Interactive FAQ [Extra setup]", "body": "If you plan to use our \"interactive FAQ\" as part of the Essentials Kit, \nplease notice it requires an additional setup. For more information: [click Here](doc:dynamic-faq)" } [/block]