{"_id":"5509811add77250d00736a1f","user":"55093bd84510200d00adf3c7","category":{"_id":"55093ef52ee8bf2b00491916","project":"55093b151c38c50d00611894","version":"55093b161c38c50d00611897","__v":9,"pages":["55094202961f17170070abbe","5509437a368a5617004146da","550963c0dd77250d007369c1","55096a172dd6a11900e6e774","5509811add77250d00736a1f","5509815f4ba6432d00bb7875","5509913ca2b4750d00a2341e","5509916add77250d00736a55","551923b0337285170047f861"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-03-18T09:01:41.604Z","from_sync":false,"order":3,"slug":"code-examples","title":"Code Examples"},"project":"55093b151c38c50d00611894","version":{"_id":"55093b161c38c50d00611897","project":"55093b151c38c50d00611894","__v":4,"createdAt":"2015-03-18T08:45:10.369Z","releaseDate":"2015-03-18T08:45:10.368Z","categories":["55093b161c38c50d00611898","55093ee2961f17170070abb9","55093ee9961f17170070abba","55093ef52ee8bf2b00491916"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":5,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-03-18T13:43:54.096Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"# Setting up your project #\n\nWelcome to _the first tutorial_ !\n\nThis example teaches you how to set up your Xcode project to link to the ISKN API.\n\nBefore you start, be sure you have your development environment set up (Xcode _ latest version).\n \n## 1. Create a new project\n\n+ To create a new project which uses the __ISKN API__ ,open Xcode from the /Applications directory.\n The Xcode welcome window appears. \n \n Click __Create a new Xcode project__ \n (or choose __File__ > __New__ > __Project__ if a project window appears instead of the welcome window).\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Bx9kKausTzyuFveytzXh_Xcode_Welcome_Window.png\",\n        \"Xcode_Welcome_Window.png\",\n        \"1360\",\n        \"826\",\n        \"#3c8ccc\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n Xcode opens a new window and displays a dialog box in which you choose a template.\n \n+ In the __iOS__ section at the left of the dialog box, select __Application__.\n[block:image]\n{\n  \"images\": [\n    {}\n  ]\n}\n[/block]\n+ In the main area of the dialog box, click __Single View Application__ and then click __Next__.\n\n+ In the dialog box that appears, name your app MyFirstTest and choose additional options for your project then click __Next__ .\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/klcYZ2jTF672nfJ0MewR_Xcode_New_project_options.png\",\n        \"Xcode_New_project_options.png\",\n        \"735\",\n        \"433\",\n        \"#395f95\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n+ In the dialog box that appears, choose a location to save your project and click __Create__.\nXcode opens your new project in a window (called the workspace window):\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/VymkoY6XSFC49Rr0bpxb_Xcode_Workspace_Window.png\",\n        \"Xcode_Workspace_Window.png\",\n        \"1017\",\n        \"541\",\n        \"#2c4578\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nYou might notice a warning message that says “No signing identity found.”\nThis warning means you haven’t set up Xcode for iOS development yet, but you can complete the tutorial without doing it.\n\n## 2.Link the DLL to the project \n\n+ In the project navigator, select the target MyFirstTest to which you want to add a library.\n\n+ Click Build Phases at the top of the project editor.\n\n+ Open the Link Binary With Libraries section.\n\n+ Click the Add button (+) to add the library.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/FNOIr6tQCCptyd3piIjA_Xcode_BuildPhases.png\",\n        \"Xcode_BuildPhases.png\",\n        \"1207\",\n        \"356\",\n        \"#1b58ae\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nExternal libraries and frameworks are those not provided by the active SDK.\nThey don't appear in the list you see when you click the Add button (+),\nbut you can navigate to an external item by clicking the __Add Other...__ button below the list.\n\n+ Click __Add Other...__ and choose the __ISKN_API__ library.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ihjFCz86R86SIZpcqJSI_Xcode_BuildPhases2.png\",\n        \"Xcode_BuildPhases2.png\",\n        \"1205\",\n        \"465\",\n        \"#8c460c\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/mB7SWAt3SbS4MHCiRlhb_Xcode_BuildPhases3.png\",\n        \"Xcode_BuildPhases3.png\",\n        \"684\",\n        \"744\",\n        \"#52afce\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nYou should see the ISKN_API.a file nested under the main project in the main project's project navigator.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Ftliv9TdS7upr9EkLmch_Xcode_libraryAdded.png\",\n        \"Xcode_libraryAdded.png\",\n        \"1213\",\n        \"542\",\n        \"#2c5ea5\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n## 3. Add a Header Search Path for the headers of the library\n\n+ In the project navigator, select the target MyFirstTest to which you want to add the Header Search Path.\n\n+ Click __Build Settings__ at the top of the project editor.\n\n+ Select __All__ in __Build Settings__ to show all the parameters, including \"Header Search Paths\".\n\n+ Select __Header Search Paths__ under __Search Paths__ and add the header directory.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/1BI5t6TRQgKCz9jkFpXZ_Xcode_HeaderSearchPath.png\",\n        \"Xcode_HeaderSearchPath.png\",\n        \"1211\",\n        \"467\",\n        \"#2b3f68\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n \n## 4.Test the project\n\n+ Now that everything is set up, go to your __storyboard__, drag a label object from the object library to your scene.\n\n+ Put 'Hello World !' as a text for the label. \n\nYou can now run the project. Your storyboard should look similar to this:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/HR35E84uQCylfEoGOMYA_Xcode_storyboard.png\",\n        \"Xcode_storyboard.png\",\n        \"606\",\n        \"636\",\n        \"#f28e46\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n## You're now ready to use the ISKN API!\n\n[Next example](magicbeep-example-on-ios)","excerpt":"","slug":"getting-started-with-iskn-api-on-ios","type":"basic","title":"Getting started with ISKN API on iOS"}

Getting started with ISKN API on iOS


# Setting up your project # Welcome to _the first tutorial_ ! This example teaches you how to set up your Xcode project to link to the ISKN API. Before you start, be sure you have your development environment set up (Xcode _ latest version). ## 1. Create a new project + To create a new project which uses the __ISKN API__ ,open Xcode from the /Applications directory. The Xcode welcome window appears. Click __Create a new Xcode project__ (or choose __File__ > __New__ > __Project__ if a project window appears instead of the welcome window). [block:image] { "images": [ { "image": [ "https://files.readme.io/Bx9kKausTzyuFveytzXh_Xcode_Welcome_Window.png", "Xcode_Welcome_Window.png", "1360", "826", "#3c8ccc", "" ] } ] } [/block] Xcode opens a new window and displays a dialog box in which you choose a template. + In the __iOS__ section at the left of the dialog box, select __Application__. [block:image] { "images": [ {} ] } [/block] + In the main area of the dialog box, click __Single View Application__ and then click __Next__. + In the dialog box that appears, name your app MyFirstTest and choose additional options for your project then click __Next__ . [block:image] { "images": [ { "image": [ "https://files.readme.io/klcYZ2jTF672nfJ0MewR_Xcode_New_project_options.png", "Xcode_New_project_options.png", "735", "433", "#395f95", "" ] } ] } [/block] + In the dialog box that appears, choose a location to save your project and click __Create__. Xcode opens your new project in a window (called the workspace window): [block:image] { "images": [ { "image": [ "https://files.readme.io/VymkoY6XSFC49Rr0bpxb_Xcode_Workspace_Window.png", "Xcode_Workspace_Window.png", "1017", "541", "#2c4578", "" ] } ] } [/block] You might notice a warning message that says “No signing identity found.” This warning means you haven’t set up Xcode for iOS development yet, but you can complete the tutorial without doing it. ## 2.Link the DLL to the project + In the project navigator, select the target MyFirstTest to which you want to add a library. + Click Build Phases at the top of the project editor. + Open the Link Binary With Libraries section. + Click the Add button (+) to add the library. [block:image] { "images": [ { "image": [ "https://files.readme.io/FNOIr6tQCCptyd3piIjA_Xcode_BuildPhases.png", "Xcode_BuildPhases.png", "1207", "356", "#1b58ae", "" ] } ] } [/block] External libraries and frameworks are those not provided by the active SDK. They don't appear in the list you see when you click the Add button (+), but you can navigate to an external item by clicking the __Add Other...__ button below the list. + Click __Add Other...__ and choose the __ISKN_API__ library. [block:image] { "images": [ { "image": [ "https://files.readme.io/ihjFCz86R86SIZpcqJSI_Xcode_BuildPhases2.png", "Xcode_BuildPhases2.png", "1205", "465", "#8c460c", "" ] } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/mB7SWAt3SbS4MHCiRlhb_Xcode_BuildPhases3.png", "Xcode_BuildPhases3.png", "684", "744", "#52afce", "" ] } ] } [/block] You should see the ISKN_API.a file nested under the main project in the main project's project navigator. [block:image] { "images": [ { "image": [ "https://files.readme.io/Ftliv9TdS7upr9EkLmch_Xcode_libraryAdded.png", "Xcode_libraryAdded.png", "1213", "542", "#2c5ea5", "" ] } ] } [/block] ## 3. Add a Header Search Path for the headers of the library + In the project navigator, select the target MyFirstTest to which you want to add the Header Search Path. + Click __Build Settings__ at the top of the project editor. + Select __All__ in __Build Settings__ to show all the parameters, including "Header Search Paths". + Select __Header Search Paths__ under __Search Paths__ and add the header directory. [block:image] { "images": [ { "image": [ "https://files.readme.io/1BI5t6TRQgKCz9jkFpXZ_Xcode_HeaderSearchPath.png", "Xcode_HeaderSearchPath.png", "1211", "467", "#2b3f68", "" ] } ] } [/block] ## 4.Test the project + Now that everything is set up, go to your __storyboard__, drag a label object from the object library to your scene. + Put 'Hello World !' as a text for the label. You can now run the project. Your storyboard should look similar to this: [block:image] { "images": [ { "image": [ "https://files.readme.io/HR35E84uQCylfEoGOMYA_Xcode_storyboard.png", "Xcode_storyboard.png", "606", "636", "#f28e46", "" ] } ] } [/block] ## You're now ready to use the ISKN API! [Next example](magicbeep-example-on-ios)