{"_id":"5509913ca2b4750d00a2341e","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"},"__v":8,"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"},"project":"55093b151c38c50d00611894","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-03-18T14:52:44.163Z","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/taLsXG1XS62A2S6EuRy5_Xcode_Welcome_Window.png\",\n        \"Xcode_Welcome_Window.png\",\n        \"1360\",\n        \"826\",\n        \"#3c8ccc\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n Xcode opens a new window and displays a dialog box in which you choose a template.\n \n+ In the __OS X__ section at the left of the dialog box, select __Application__.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/6yrTOHZSqGo2lc3zZLcg_Xcode_Cocoa_Template.png\",\n        \"Xcode_Cocoa_Template.png\",\n        \"735\",\n        \"432\",\n        \"#1f5193\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n+ In the main area of the dialog box, click __Cocoa 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/lIuo1fLjT6yTREEkeICE_Xcode_Cocoa_New_project_options.png\",\n        \"Xcode_Cocoa_New_project_options.png\",\n        \"735\",\n        \"432\",\n        \"#2a4c85\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\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/MHd57kpyQgexgZbY8KWN_Xcode_Cocoa_Workspace_Window.png\",\n        \"Xcode_Cocoa_Workspace_Window.png\",\n        \"1145\",\n        \"444\",\n        \"#225fb8\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\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/9WHE3ntFQDSdOLkvr8RW_Xcode_Cocoa_BuildPhases.png\",\n        \"Xcode_Cocoa_BuildPhases.png\",\n        \"1037\",\n        \"362\",\n        \"#8d4e2b\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\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/mEeJpYdGSzS6vqLeGEUr_Xcode_Cocoa_BuildPhases2.png\",\n        \"Xcode_Cocoa_BuildPhases2.png\",\n        \"1143\",\n        \"467\",\n        \"#caa236\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/DofDt7ezTmaOYb77Ze9U_Xcode_Cocoa_BuildPhases3.png\",\n        \"Xcode_Cocoa_BuildPhases3.png\",\n        \"718\",\n        \"766\",\n        \"#2d5b98\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n\nYou should see the libISKN_API.dylib 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/ERGcdF6JSRiIkpsOPyIz_Xcode_Cocoa_libraryAdded.png\",\n        \"Xcode_Cocoa_libraryAdded.png\",\n        \"260\",\n        \"265\",\n        \"#2161ba\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\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/UXZj8lhqR92VGXsIamYh_Xcode_Cocoa_HeaderSearchPath.png\",\n        \"Xcode_Cocoa_HeaderSearchPath.png\",\n        \"1144\",\n        \"681\",\n        \"#1f4884\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\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/K2HBtYElRL2D5XTfQtgv_Xcode_Cocoa_storyboard.png\",\n        \"Xcode_Cocoa_storyboard.png\",\n        \"761\",\n        \"369\",\n        \"#235f99\",\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-os-x)","excerpt":"","slug":"getting-started-with-iskn-api-on-os-x","type":"basic","title":"Getting started with ISKN API on OS X"}

Getting started with ISKN API on OS X


# 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/taLsXG1XS62A2S6EuRy5_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 __OS X__ section at the left of the dialog box, select __Application__. [block:image] { "images": [ { "image": [ "https://files.readme.io/6yrTOHZSqGo2lc3zZLcg_Xcode_Cocoa_Template.png", "Xcode_Cocoa_Template.png", "735", "432", "#1f5193", "" ] } ] } [/block] + In the main area of the dialog box, click __Cocoa 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/lIuo1fLjT6yTREEkeICE_Xcode_Cocoa_New_project_options.png", "Xcode_Cocoa_New_project_options.png", "735", "432", "#2a4c85", "" ] } ] } [/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/MHd57kpyQgexgZbY8KWN_Xcode_Cocoa_Workspace_Window.png", "Xcode_Cocoa_Workspace_Window.png", "1145", "444", "#225fb8", "" ] } ] } [/block] ## 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/9WHE3ntFQDSdOLkvr8RW_Xcode_Cocoa_BuildPhases.png", "Xcode_Cocoa_BuildPhases.png", "1037", "362", "#8d4e2b", "" ] } ] } [/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/mEeJpYdGSzS6vqLeGEUr_Xcode_Cocoa_BuildPhases2.png", "Xcode_Cocoa_BuildPhases2.png", "1143", "467", "#caa236", "" ] } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/DofDt7ezTmaOYb77Ze9U_Xcode_Cocoa_BuildPhases3.png", "Xcode_Cocoa_BuildPhases3.png", "718", "766", "#2d5b98", "" ] } ] } [/block] You should see the libISKN_API.dylib file nested under the main project in the main project's project navigator. [block:image] { "images": [ { "image": [ "https://files.readme.io/ERGcdF6JSRiIkpsOPyIz_Xcode_Cocoa_libraryAdded.png", "Xcode_Cocoa_libraryAdded.png", "260", "265", "#2161ba", "" ] } ] } [/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/UXZj8lhqR92VGXsIamYh_Xcode_Cocoa_HeaderSearchPath.png", "Xcode_Cocoa_HeaderSearchPath.png", "1144", "681", "#1f4884", "" ] } ] } [/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/K2HBtYElRL2D5XTfQtgv_Xcode_Cocoa_storyboard.png", "Xcode_Cocoa_storyboard.png", "761", "369", "#235f99", "" ] } ] } [/block] ## You're now ready to use the ISKN API! [Next example](magicbeep-example-on-os-x)