{"id":3468,"date":"2019-09-18T15:06:07","date_gmt":"2019-09-18T07:06:07","guid":{"rendered":"https:\/\/www.ookangzheng.com\/?p=3468"},"modified":"2020-05-24T15:58:10","modified_gmt":"2020-05-24T07:58:10","slug":"cordova-build-ios-error","status":"publish","type":"post","link":"https:\/\/www.ookangzheng.com\/cordova-build-ios-error\/","title":{"rendered":"Cordova build ios error"},"content":{"rendered":"\n

As using Cordova to build an app for Ios, after adding ios platform into your current project cordova platform add ios<\/code> and you got this error <\/p>\n\n\n\n

\/\/ Run Ios emulator\ncordova run ios --device\n\nCordovaError: Promise rejected with non-error: \"xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '\/Library\/Developer\/CommandLineTools' is a command line tools instance\\n\"\n    at \/usr\/local\/lib\/node_modules\/cordova\/bin\/cordova:29:15\n    at processTicksAndRejections (internal\/process\/task_queues.js:93:5)<\/code><\/pre>\n\n\n\n

Here are my solution<\/p>\n\n\n\n

  1. brew install gcc<\/code><\/li>
  2. xcode-select --install<\/code><\/li>
  3. xcode-select --switch \/Applications\/Xcode.app<\/code><\/li><\/ol>\n\n\n\n

    If you got <\/p>\n\n\n\n

    cordova run ios --device                          \nCordovaError: Promise rejected with non-error: \"ios-deploy was not found. Please download, build and install version 1.9.2 or greater from https:\/\/github.com\/ios-control\/ios-deploy into your path, or do 'npm install -g ios-deploy'\"\n    at \/usr\/local\/lib\/node_modules\/cordova\/bin\/cordova:29:15\n    at processTicksAndRejections (internal\/process\/task_queues.js:93:5)<\/code><\/pre>\n\n\n\n

    Solution<\/p>\n\n\n\n

    sudo npm install -g ios-deploy --unsafe-perm=true<\/code><\/p>\n\n\n\n

    References:<\/p>\n\n\n\n

    1. https:\/\/stackoverflow.com\/questions\/39524148\/xcode-error-code-signing-is-required-for-product-type-application-in-sdk-ios<\/a><\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"

      Cordova build Ios error<\/p>\n","protected":false},"author":1,"featured_media":3470,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[88,43,39],"tags":[],"class_list":["post-3468","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apps","category-dev","category-mac"],"_links":{"self":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts\/3468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/comments?post=3468"}],"version-history":[{"count":0,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts\/3468\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/media\/3470"}],"wp:attachment":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/media?parent=3468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/categories?post=3468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/tags?post=3468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}