{"id":85,"date":"2011-12-02T01:39:35","date_gmt":"2011-12-02T09:39:35","guid":{"rendered":"http:\/\/michael.lavaveshkul.com\/blog\/?p=85"},"modified":"2019-02-03T00:02:37","modified_gmt":"2019-02-03T08:02:37","slug":"xcodebuild-exit-code-65","status":"publish","type":"post","link":"https:\/\/michael.lavaveshkul.com\/blog\/2011\/12\/xcodebuild-exit-code-65\/","title":{"rendered":"xcodebuild: exit code 65"},"content":{"rendered":"\n<p><strong>Note: This is from a long time ago and I haven&#8217;t really touched this stuff since around the time I wrote this. The information may be out of date. That said, if this does or doesn&#8217;t work for you, let me know and I&#8217;ll update this with the relevant info.<\/strong><\/p>\n\n\n\n<p>This is something I ran into a while back. If you&#8217;re not an iOS developer, but get tasked with building iOS apps, you may run into this. This particular exit code is fun because xcodebuild doesn&#8217;t tell you what the problem is.<\/p>\n\n\n\n<p>Aside from building your app using the Xcode IDE, you also have the command line utility <a href=\"http:\/\/developer.apple.com\/library\/mac\/#documentation\/Darwin\/Reference\/ManPages\/man1\/xcode3build.1.html\" target=\"xcodebuild\">xcodebuild<\/a> available to you. Assuming the code itself compiles just fine, this tool will tell you, for example, if you&#8217;re missing a provisioning profile or something.<\/p>\n\n\n\n<p>When getting code 65, the build would fail with no explanation in the log. Rather, at the end it would say something like<br><code>&lt;com.apple.tools.product-pkg-utility&gt; \"\/Users\/[me]\/Library\/MobileDevice\/Provisioning Profiles\/12345678-ABCD-1234-ABCD-1234567890AB.mobileprovision\" -o \"\/[my_project_build_location]\/embedded.mobileprovision\"<br>\n*** BUILD FAILED ***<\/code><\/p>\n\n\n\n<!--more-->\n\n\n\n<p>In my case, it turned out xcodebuild didn&#8217;t have access to the certificate I was using.<br>So&#8230; here&#8217;s some things to check for:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Make sure you&#8217;ve installed an up to date certificate in your Keychain<\/li><li>Remove expired certificates<\/li><li>Grant access to xcode to use your certificate (or allow all programs to use the certificate)<\/li><li>Make sure you&#8217;ve installed an up to date provisioning profile<\/li><li>Remove expired provisioning profiles<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Note: This is from a long time ago and I haven&#8217;t really touched this stuff since around the time I wrote this. The information may be out of date. That said, if this does or doesn&#8217;t work for you, let me know and I&#8217;ll update this with the relevant info. This is something I ran &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/michael.lavaveshkul.com\/blog\/2011\/12\/xcodebuild-exit-code-65\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;xcodebuild: exit code 65&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-85","post","type-post","status-publish","format-standard","hentry","category-project"],"_links":{"self":[{"href":"https:\/\/michael.lavaveshkul.com\/blog\/wp-json\/wp\/v2\/posts\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michael.lavaveshkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michael.lavaveshkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michael.lavaveshkul.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michael.lavaveshkul.com\/blog\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":16,"href":"https:\/\/michael.lavaveshkul.com\/blog\/wp-json\/wp\/v2\/posts\/85\/revisions"}],"predecessor-version":[{"id":795,"href":"https:\/\/michael.lavaveshkul.com\/blog\/wp-json\/wp\/v2\/posts\/85\/revisions\/795"}],"wp:attachment":[{"href":"https:\/\/michael.lavaveshkul.com\/blog\/wp-json\/wp\/v2\/media?parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michael.lavaveshkul.com\/blog\/wp-json\/wp\/v2\/categories?post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michael.lavaveshkul.com\/blog\/wp-json\/wp\/v2\/tags?post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}