{"_id":"590a04f7ed80861900cbc79d","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"},"parentDoc":null,"__v":0,"project":"55b2d5baa74a380d00e290c4","category":{"_id":"590a04f3ed80861900cbc742","project":"55b2d5baa74a380d00e290c4","version":"590a04f2ed80861900cbc737","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-30T01:17:42.531Z","from_sync":false,"order":12,"slug":"certificates-and-provisioning-profiles","title":"iOS Certificates and Provisioning"},"user":"55b2d5626862a10d00887af9","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-11T19:54:13.865Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"Sometimes you might need to regenerate your code signing identity : for example if someone hits fix it in xcode (don't do this!), or a code signing identity expires. These steps will show you how to quickly do that.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Create a certificate signing request\"\n}\n[/block]\nFirst prepare a certificate signing request that you will later upload to Apple's Developer Portal\n\nOpen 'Keychain Access' then select Keychain Access -> Certificate Assistant -> Request a Certificate from a Certificate Authority.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Z6QOw9tiSU6f1gtfB4Ve_Screen%20Shot%202015-12-11%20at%2011.32.36%20AM.png\",\n        \"Screen Shot 2015-12-11 at 11.32.36 AM.png\",\n        \"619\",\n        \"440\",\n        \"#324363\",\n        \"\"\n      ],\n      \"sizing\": \"80\"\n    }\n  ]\n}\n[/block]\nSave the certificate signing request to somewhere like your Desktop.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Generate the new certificate\"\n}\n[/block]\nGo to https://developer.apple.com and log into the team you want the certificate to belong to. Navigate to certificates on the left hand menu\n\nYou will see something like this. Hit the add button to get started adding a new one\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Ngq47lgBT2uyuCd2drBk_Screen%20Shot%202015-12-11%20at%2011.34.10%20AM.png\",\n        \"Screen Shot 2015-12-11 at 11.34.10 AM.png\",\n        \"1366\",\n        \"324\",\n        \"#595959\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nThere are two types of certificates relevant to Code Signing\n- iOS App Development\n- App Store and Ad Hoc\n\nIf you're just doing local development and want to be able to debug then 'iOS App Development' is the right type for you. For the App Store, Test Flight and Buddybuild, 'App Store and Adhoc is the best choice'.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Fv6suUMSDOREtwzbjHdR_Screen%20Shot%202015-12-11%20at%2011.34.36%20AM.png\",\n        \"Screen Shot 2015-12-11 at 11.34.36 AM.png\",\n        \"809\",\n        \"610\",\n        \"#4c9cc8\",\n        \"\"\n      ],\n      \"sizing\": \"80\"\n    }\n  ]\n}\n[/block]\nOnce you've selected, you can upload the certificate signing request we created earlier\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/BLwbF1HoR8WNHPtIpFvz_Screen%20Shot%202015-12-11%20at%2011.35.14%20AM.png\",\n        \"Screen Shot 2015-12-11 at 11.35.14 AM.png\",\n        \"810\",\n        \"619\",\n        \"#a99161\",\n        \"\"\n      ],\n      \"sizing\": \"80\"\n    }\n  ]\n}\n[/block]\nWhen this is completed, download it, and then double-click on the file which will import it into your keychain. You're all set up to code sign locally now, but there's one more step to share that with buddybuild.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Add the new code signing identity to buddybuild\"\n}\n[/block]\nOpen Keychain and look for the certificate you just created (it will have today's date to make it easier to find). \n\nAlso, make sure you have the Certificates category selected to make it easier to find\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/N1UOAJBPQbeFXcOHEJCT_Screen%20Shot%202015-12-11%20at%2011.51.41%20AM.png\",\n        \"Screen Shot 2015-12-11 at 11.51.41 AM.png\",\n        \"147\",\n        \"164\",\n        \"#334262\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nThen right click on it and chose export and save the .p12 file somewhere.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Do52iGkOQP2z9LsgYFAj_Screen%20Shot%202015-12-11%20at%2011.36.55%20AM.png\",\n        \"Screen Shot 2015-12-11 at 11.36.55 AM.png\",\n        \"1152\",\n        \"190\",\n        \"#3c537e\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nNow go over to the buddybuild dashboard and click on **App Settings**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/f41e404-Builds_-_Settings.png\",\n        \"Builds - Settings.png\",\n        1500,\n        483,\n        \"#ecf1f2\"\n      ]\n    }\n  ]\n}\n[/block]\nIn the left navigation, click on Build settings, then **Code signing**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/553d7a4-Settings_-_Code_Signing_-_menu.png\",\n        \"Settings - Code Signing - menu.png\",\n        1500,\n        760,\n        \"#d9dfe2\"\n      ]\n    }\n  ]\n}\n[/block]\nNext, click on **Upload new certificates**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/402259e-Settings_-_Code_Signing.png\",\n        \"Settings - Code Signing.png\",\n        1500,\n        317,\n        \"#dde1e3\"\n      ]\n    }\n  ]\n}\n[/block]\nSelect **the Manual Way** tab, and upload your code signing identity.\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4a5d3be-Settings_-_Code_Signing_-_Manual.png\",\n        \"Settings - Code Signing - Manual.png\",\n        1500,\n        800,\n        \"#dbe2e4\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nYou should be all set with your new code signing identity. You may have to generate new provisioning profiles too. The easiest way to do this is to [connect buddybuild to your Apple Developer account](doc:itunes-connect) and buddybuild will manage the provisioning profiles for you.","excerpt":"","slug":"creating-a-code-signing-identity","type":"basic","title":"Creating a Code Signing Identity"}

Creating a Code Signing Identity


Sometimes you might need to regenerate your code signing identity : for example if someone hits fix it in xcode (don't do this!), or a code signing identity expires. These steps will show you how to quickly do that. [block:api-header] { "type": "basic", "title": "Create a certificate signing request" } [/block] First prepare a certificate signing request that you will later upload to Apple's Developer Portal Open 'Keychain Access' then select Keychain Access -> Certificate Assistant -> Request a Certificate from a Certificate Authority. [block:image] { "images": [ { "image": [ "https://files.readme.io/Z6QOw9tiSU6f1gtfB4Ve_Screen%20Shot%202015-12-11%20at%2011.32.36%20AM.png", "Screen Shot 2015-12-11 at 11.32.36 AM.png", "619", "440", "#324363", "" ], "sizing": "80" } ] } [/block] Save the certificate signing request to somewhere like your Desktop. [block:api-header] { "type": "basic", "title": "Generate the new certificate" } [/block] Go to https://developer.apple.com and log into the team you want the certificate to belong to. Navigate to certificates on the left hand menu You will see something like this. Hit the add button to get started adding a new one [block:image] { "images": [ { "image": [ "https://files.readme.io/Ngq47lgBT2uyuCd2drBk_Screen%20Shot%202015-12-11%20at%2011.34.10%20AM.png", "Screen Shot 2015-12-11 at 11.34.10 AM.png", "1366", "324", "#595959", "" ], "sizing": "full" } ] } [/block] There are two types of certificates relevant to Code Signing - iOS App Development - App Store and Ad Hoc If you're just doing local development and want to be able to debug then 'iOS App Development' is the right type for you. For the App Store, Test Flight and Buddybuild, 'App Store and Adhoc is the best choice'. [block:image] { "images": [ { "image": [ "https://files.readme.io/Fv6suUMSDOREtwzbjHdR_Screen%20Shot%202015-12-11%20at%2011.34.36%20AM.png", "Screen Shot 2015-12-11 at 11.34.36 AM.png", "809", "610", "#4c9cc8", "" ], "sizing": "80" } ] } [/block] Once you've selected, you can upload the certificate signing request we created earlier [block:image] { "images": [ { "image": [ "https://files.readme.io/BLwbF1HoR8WNHPtIpFvz_Screen%20Shot%202015-12-11%20at%2011.35.14%20AM.png", "Screen Shot 2015-12-11 at 11.35.14 AM.png", "810", "619", "#a99161", "" ], "sizing": "80" } ] } [/block] When this is completed, download it, and then double-click on the file which will import it into your keychain. You're all set up to code sign locally now, but there's one more step to share that with buddybuild. [block:api-header] { "type": "basic", "title": "Add the new code signing identity to buddybuild" } [/block] Open Keychain and look for the certificate you just created (it will have today's date to make it easier to find). Also, make sure you have the Certificates category selected to make it easier to find [block:image] { "images": [ { "image": [ "https://files.readme.io/N1UOAJBPQbeFXcOHEJCT_Screen%20Shot%202015-12-11%20at%2011.51.41%20AM.png", "Screen Shot 2015-12-11 at 11.51.41 AM.png", "147", "164", "#334262", "" ] } ] } [/block] Then right click on it and chose export and save the .p12 file somewhere. [block:image] { "images": [ { "image": [ "https://files.readme.io/Do52iGkOQP2z9LsgYFAj_Screen%20Shot%202015-12-11%20at%2011.36.55%20AM.png", "Screen Shot 2015-12-11 at 11.36.55 AM.png", "1152", "190", "#3c537e", "" ], "sizing": "full" } ] } [/block] Now go over to the buddybuild dashboard and click on **App Settings**. [block:image] { "images": [ { "image": [ "https://files.readme.io/f41e404-Builds_-_Settings.png", "Builds - Settings.png", 1500, 483, "#ecf1f2" ] } ] } [/block] In the left navigation, click on Build settings, then **Code signing**. [block:image] { "images": [ { "image": [ "https://files.readme.io/553d7a4-Settings_-_Code_Signing_-_menu.png", "Settings - Code Signing - menu.png", 1500, 760, "#d9dfe2" ] } ] } [/block] Next, click on **Upload new certificates**. [block:image] { "images": [ { "image": [ "https://files.readme.io/402259e-Settings_-_Code_Signing.png", "Settings - Code Signing.png", 1500, 317, "#dde1e3" ] } ] } [/block] Select **the Manual Way** tab, and upload your code signing identity. [block:image] { "images": [ { "image": [ "https://files.readme.io/4a5d3be-Settings_-_Code_Signing_-_Manual.png", "Settings - Code Signing - Manual.png", 1500, 800, "#dbe2e4" ], "sizing": "full" } ] } [/block] You should be all set with your new code signing identity. You may have to generate new provisioning profiles too. The easiest way to do this is to [connect buddybuild to your Apple Developer account](doc:itunes-connect) and buddybuild will manage the provisioning profiles for you.