{"_id":"590a04f7ed80861900cbc7a4","__v":0,"parentDoc":null,"version":{"_id":"590a04f2ed80861900cbc737","project":"55b2d5baa74a380d00e290c4","__v":4,"createdAt":"2017-05-03T16:27:30.085Z","releaseDate":"2017-05-03T16:27:30.085Z","categories":["590a04f3ed80861900cbc738","590a04f3ed80861900cbc739","590a04f3ed80861900cbc73a","590a04f3ed80861900cbc73b","590a04f3ed80861900cbc73c","590a04f3ed80861900cbc73d","590a04f3ed80861900cbc73e","590a04f3ed80861900cbc73f","590a04f3ed80861900cbc740","590a04f3ed80861900cbc741","590a04f3ed80861900cbc742","590a04f3ed80861900cbc743","590a04f3ed80861900cbc744","590a04f3ed80861900cbc745","590a04f3ed80861900cbc746","590a04f3ed80861900cbc747","590a04f3ed80861900cbc748","590a04f3ed80861900cbc749","590a04f3ed80861900cbc74a","590a04f3ed80861900cbc74b","590a04f3ed80861900cbc74c","590a04f3ed80861900cbc74d","59124949de13f61900336a7a","5914b04e7c2c552d008b7104","5914b47242c6a22300b9dc20"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"7.0.0","version":"7"},"category":{"_id":"590a04f3ed80861900cbc747","version":"590a04f2ed80861900cbc737","project":"55b2d5baa74a380d00e290c4","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-30T19:17:27.257Z","from_sync":false,"order":17,"slug":"buddybuild-sdk","title":"Buddybuild SDK"},"project":"55b2d5baa74a380d00e290c4","user":"55b2d5626862a10d00887af9","updates":["57ea36b33cb4871700c43078"],"next":{"pages":[],"description":""},"createdAt":"2015-09-30T19:23:21.157Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"We highly recommend using the **automatic** buddybuild SDK integration right from the buddybuild dashboard. \n\nHowever, if you wish to install the buddybuild SDK **manually**, follow the steps on this page.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Use CocoaPods?\",\n  \"body\": \"Include the [BuddyBuildSDK](https://cocoapods.org/pods/BuddyBuildSDK) pod in your Podfile and move on to [Step 4](http://docs.buddybuild.com/v7/docs/sdk-integration#section-step-4-swift-only-include-the-sdk-in-your-bridging-header)\"\n}\n[/block]\n##Step 1: Getting Started\nNavigate to your repository root directory.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"cd myAwesomeApp\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n##Step 2: Download the buddybuild SDK\nEnsure that you remove previous versions of the buddybuild SDK before you start.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"rm -rf BuddyBuildSDK.framework*\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nDownload and unzip the `BuddyBuildSDK.framework.zip` file into your project root directory.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"wget https://s3-us-west-2.amazonaws.com/buddybuild-sdk-builds/master/BuddyBuildSDK.framework.zip\\nunzip BuddyBuildSDK.framework.zip\\nrm -f BuddyBuildSDK.framework.zip\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n##Step 3: Add iOS frameworks\n\n* Open your project in Xcode.\n* Highlight your project in the 'Project Navigator'.\n* Select your target.\n* Select the 'Build Phases' tab.\n* Open 'Link Binaries With Libraries' expander.\n* Repeat for each of the ​**AssetsLibrary**, ​**BuddyBuildSDK**, **CoreTelephony**​, **CoreText**, **CoreMedia**, **AVFoundation**, **CoreVideo**, **QuartzCore** and **SystemConfiguration**​​ frameworks:\n  * Click the + button.\n  * Select the required framework name\n  * Click 'Add'\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/d1beaa3-1.png\",\n        \"1.png\",\n        1500,\n        861,\n        \"#e2e2e0\"\n      ]\n    }\n  ]\n}\n[/block]\n##Step 4 (Swift only): Include the SDK in your Bridging Header \n\nMake sure you have a bridging header in your **Build Settings** in Xcode.\n\nIf you don't have a bridging header, the fastest way to create one is to temporarily add a new .m file to your project. Xcode will then prompt you to create a bridging header. After it's created you can delete that .m file.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/3a64a47-2.png\",\n        \"2.png\",\n        1500,\n        745,\n        \"#f1f1f0\"\n      ],\n      \"sizing\": \"80\"\n    }\n  ]\n}\n[/block]\n**Include the SDK by adding the line below to your bridging header**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#import <BuddyBuildSDK/BuddyBuildSDK.h>\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n##Step 5 (Swift only): Initialize the buddybuild SDK\nFind the class that implements the UIApplicationDelegate. The class implementation should look something like this.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"class AppDelegate: UIResponder, UIApplicationDelegate {\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\nInitialize the **BuddyBuildSDK** in the class, by adding the following line to the **didFinishLaunchingWithOptions** method.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"BuddyBuildSDK.setup()\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n##Step 6 (Objective-C only): Initialize the buddybuild SDK\nFind the class that implements the **UIApplicationDelegate**. The class header file should look something like this.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \":::at:::interface AppDelegate : UIResponder <UIApplicationDelegate>\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\nWe're interested in associated the class implementation file. Add this import to the class implementation file.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#import <BuddyBuildSDK/BuddyBuildSDK.h>\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\nInitialize the **BuddyBuildSDK** in the class, by adding the following line to the **didFinishLaunchingWithOptions** method.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[BuddyBuildSDK setup];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n \n##Step 7: Build\nRun your application in Xcode.\n\n##Step 8: Verify\nIn the Xcode output pane you should see the following log line, which indicates that the buddybuild SDK has been successfully integrated.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"2015-10-05 15:34:48.693 myAwesomeApp[25126:526527] BuddybuildSDK : Successfully integrated. Feedback tool, crash reporting and other features are disabled for local builds. Please build with https://dashboard.buddybuild.com to enable.\",\n      \"language\": \"text\",\n      \"name\": \"When running on a physical device\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"2015-10-05 15:33:24.562 myAwesomeApp[25126:526527] BuddybuildSDK : Disabled in the simulator\",\n      \"language\": \"text\",\n      \"name\": \"When running in a simulator\"\n    }\n  ]\n}\n[/block]\n##Step 9: Push\nCommit the change and push to your repo.\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"git add --all\\ngit commit -m 'Adding buddybuild SDK'\\ngit push\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nThat's it! Your code push will be picked up by buddybuild. Subsequent builds of your App will now have the SDK integrated!","excerpt":"","slug":"sdk-integration","type":"basic","title":"SDK Manual Installation (iOS)"}

SDK Manual Installation (iOS)


We highly recommend using the **automatic** buddybuild SDK integration right from the buddybuild dashboard. However, if you wish to install the buddybuild SDK **manually**, follow the steps on this page. [block:callout] { "type": "info", "title": "Use CocoaPods?", "body": "Include the [BuddyBuildSDK](https://cocoapods.org/pods/BuddyBuildSDK) pod in your Podfile and move on to [Step 4](http://docs.buddybuild.com/v7/docs/sdk-integration#section-step-4-swift-only-include-the-sdk-in-your-bridging-header)" } [/block] ##Step 1: Getting Started Navigate to your repository root directory. [block:code] { "codes": [ { "code": "cd myAwesomeApp", "language": "shell" } ] } [/block] ##Step 2: Download the buddybuild SDK Ensure that you remove previous versions of the buddybuild SDK before you start. [block:code] { "codes": [ { "code": "rm -rf BuddyBuildSDK.framework*", "language": "shell" } ] } [/block] Download and unzip the `BuddyBuildSDK.framework.zip` file into your project root directory. [block:code] { "codes": [ { "code": "wget https://s3-us-west-2.amazonaws.com/buddybuild-sdk-builds/master/BuddyBuildSDK.framework.zip\nunzip BuddyBuildSDK.framework.zip\nrm -f BuddyBuildSDK.framework.zip", "language": "shell" } ] } [/block] ##Step 3: Add iOS frameworks * Open your project in Xcode. * Highlight your project in the 'Project Navigator'. * Select your target. * Select the 'Build Phases' tab. * Open 'Link Binaries With Libraries' expander. * Repeat for each of the ​**AssetsLibrary**, ​**BuddyBuildSDK**, **CoreTelephony**​, **CoreText**, **CoreMedia**, **AVFoundation**, **CoreVideo**, **QuartzCore** and **SystemConfiguration**​​ frameworks: * Click the + button. * Select the required framework name * Click 'Add' [block:image] { "images": [ { "image": [ "https://files.readme.io/d1beaa3-1.png", "1.png", 1500, 861, "#e2e2e0" ] } ] } [/block] ##Step 4 (Swift only): Include the SDK in your Bridging Header Make sure you have a bridging header in your **Build Settings** in Xcode. If you don't have a bridging header, the fastest way to create one is to temporarily add a new .m file to your project. Xcode will then prompt you to create a bridging header. After it's created you can delete that .m file. [block:image] { "images": [ { "image": [ "https://files.readme.io/3a64a47-2.png", "2.png", 1500, 745, "#f1f1f0" ], "sizing": "80" } ] } [/block] **Include the SDK by adding the line below to your bridging header** [block:code] { "codes": [ { "code": "#import <BuddyBuildSDK/BuddyBuildSDK.h>", "language": "objectivec" } ] } [/block] ##Step 5 (Swift only): Initialize the buddybuild SDK Find the class that implements the UIApplicationDelegate. The class implementation should look something like this. [block:code] { "codes": [ { "code": "class AppDelegate: UIResponder, UIApplicationDelegate {", "language": "swift" } ] } [/block] Initialize the **BuddyBuildSDK** in the class, by adding the following line to the **didFinishLaunchingWithOptions** method. [block:code] { "codes": [ { "code": "BuddyBuildSDK.setup()", "language": "swift" } ] } [/block] ##Step 6 (Objective-C only): Initialize the buddybuild SDK Find the class that implements the **UIApplicationDelegate**. The class header file should look something like this. [block:code] { "codes": [ { "code": "@interface AppDelegate : UIResponder <UIApplicationDelegate>", "language": "objectivec" } ] } [/block] We're interested in associated the class implementation file. Add this import to the class implementation file. [block:code] { "codes": [ { "code": "#import <BuddyBuildSDK/BuddyBuildSDK.h>", "language": "objectivec" } ] } [/block] Initialize the **BuddyBuildSDK** in the class, by adding the following line to the **didFinishLaunchingWithOptions** method. [block:code] { "codes": [ { "code": "[BuddyBuildSDK setup];", "language": "objectivec" } ] } [/block] ##Step 7: Build Run your application in Xcode. ##Step 8: Verify In the Xcode output pane you should see the following log line, which indicates that the buddybuild SDK has been successfully integrated. [block:code] { "codes": [ { "code": "2015-10-05 15:34:48.693 myAwesomeApp[25126:526527] BuddybuildSDK : Successfully integrated. Feedback tool, crash reporting and other features are disabled for local builds. Please build with https://dashboard.buddybuild.com to enable.", "language": "text", "name": "When running on a physical device" } ] } [/block] [block:code] { "codes": [ { "code": "2015-10-05 15:33:24.562 myAwesomeApp[25126:526527] BuddybuildSDK : Disabled in the simulator", "language": "text", "name": "When running in a simulator" } ] } [/block] ##Step 9: Push Commit the change and push to your repo. [block:code] { "codes": [ { "code": "git add --all\ngit commit -m 'Adding buddybuild SDK'\ngit push", "language": "shell" } ] } [/block] That's it! Your code push will be picked up by buddybuild. Subsequent builds of your App will now have the SDK integrated!