Nativescript-cli: Command xcodebuild failed with exit code 65.

Created on 7 May 2018  路  11Comments  路  Source: NativeScript/nativescript-cli

Dear friend, we, the rest of the NativeScript community really
appreciate your feedback! While we are doing all we can to take care of every
issue, sometimes we get overwhelmed. Because of that, we will consider issues
that are not constructive or problems that cannot be reproduced "dead".
Additionally, we will treat feature requests or bug reports with unanswered
questions regarding the behavior/reproduction for more than 20 days "dead". All
"dead" issues will get closed.

Please, provide the details below:

Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo?

Yes

Tell us about the problem

Please, ensure your title is less than 63 characters long and starts with a capital
letter.
Command xcodebuild failed with exit code 65.

Which platform(s) does your issue occur on?

iOS/Android/Both
iOS

Please provide the following version numbers that your issue occurs with:

  • CLI: (run tns --version to fetch it)
  • Cross-platform modules: (check the 'version' attribute in the
    node_modules/tns-core-modules/package.json file in your project)
  • Runtime(s): (look for the "tns-android" and "tns-ios" properties in the
    package.json file of your project)
  • Plugin(s): (look for the version number in the package.json file of your
    project)
    tns-version 4.0.0
    package.json

{
"description": "App Desc",
"license": "SEE LICENSE IN ",
"readme": "NativeScript Application",
"repository": "",
"nativescript": {
"id": "org.app.appname",
"tns-android": {
"version": "3.3.1"
},
"tns-ios": {
"version": "4.0.1"
}
},
"dependencies": {
"nativescript-drop-down": "^3.2.3",
"nativescript-filter-select": "^1.2.6",
"nativescript-loading-indicator": "^2.4.0",
"nativescript-pro-ui": "^3.4.1",
"nativescript-screenshot": "0.0.2",
"nativescript-theme-core": "^1.0.4",
"tns-core-modules": "^3.4.1"
},
"devDependencies": {
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"lazy": "1.0.11"
},
"author": "ZOR"
}

Please tell us how to recreate the issue in as much detail as possible.

tns run ios --provision

ends with
* BUILD FAILED *

Unable to apply changes on device: . Error is: Command xcodebuild failed with exit code 65.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

Consider using the playground to provide the code you have issues with.
Code is working Okay with the Emulator , Issue arises when i try to deploy on the device, tried sidekick too but same error there.

All 11 comments

Hi @ahtishamashraf,

It seems like your device is not included in your provision. Can you execute the followings:

  1. Connect your non working device
  2. Execute tns run ios --provision command and send us the output.

I have managed to run it on my device using the Same Provisioning Profile using Nativescript Sidekick

@ahtishamashraf,

Sorry for the late reply.
It's strange the Sidekick works with the same provision but {N} CLI fails. Actually Sidekick calls {N} CLI logic to build the application.
I'll close this issue. Feel free to write here or open an another in case you have some problems.

tns build ios --clean solved the issue for me

run tns build ios --clean --log trace first 锛宨f the log trace is related to some plugin, use whose latest version in the package.json file , run npm install, than run tns build ios --clean --log trace again.

if it not work, run tns prepare ios --release and open {app-name}/platforms/ios/{app-name}.xcworkspace file with xcode , try run it, xcode will tell you where is the problem.

(1 failure)
Command xcodebuild failed with exit code 65
Error: Command xcodebuild failed with exit code 65
at Errors.failWithOptions (/usr/local/lib/node_modules/nativescript/lib/common/errors.js:147:28)
at Errors.fail (/usr/local/lib/node_modules/nativescript/lib/common/errors.js:120:21)
at XcodebuildCommandService. (/usr/local/lib/node_modules/nativescript/lib/services/ios/xcodebuild-command-service.js:28:30)
at Generator.throw ()
at rejected (/usr/local/lib/node_modules/nativescript/lib/services/ios/xcodebuild-command-service.js:5:65)
at process._tickCallback (internal/process/next_tick.js:68:7)

I can't solve this issue

tns build ios --clean --log trace
:(

(1 failure)
Command xcodebuild failed with exit code 65
Error: Command xcodebuild failed with exit code 65
at Errors.failWithOptions (/usr/local/lib/node_modules/nativescript/lib/common/errors.js:147:28)
at Errors.fail (/usr/local/lib/node_modules/nativescript/lib/common/errors.js:120:21)
at XcodebuildCommandService. (/usr/local/lib/node_modules/nativescript/lib/services/ios/xcodebuild-command-service.js:28:30)
at Generator.throw ()
at rejected (/usr/local/lib/node_modules/nativescript/lib/services/ios/xcodebuild-command-service.js:5:65)
at process._tickCallback (internal/process/next_tick.js:68:7)

* BUILD FAILED *

Command xcodebuild failed with exit code 65
Error: Command xcodebuild failed with exit code 65
at Errors.failWithOptions (/Users/macbook/Development/point/node_modules/nativescript/lib/common/errors.js:147:28)
at Errors.fail (/Users/macbook/Development/point/node_modules/nativescript/lib/common/errors.js:120:21)
at XcodebuildCommandService. (/Users/macbook/Development/point/node_modules/nativescript/lib/services/ios/xcodebuild-command-service.js:28:30)
at Generator.throw ()
at rejected (/Users/macbook/Development/point/node_modules/nativescript/lib/services/ios/xcodebuild-command-service.js:5:65)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
npm ERR! code ELIFECYCLE

* BUILD FAILED *

Command xcodebuild failed with exit code 65
Error: Command xcodebuild failed with exit code 65
at Errors.failWithOptions (/Users/macbook/Development/point/node_modules/nativescript/lib/common/errors.js:147:28)
at Errors.fail (/Users/macbook/Development/point/node_modules/nativescript/lib/common/errors.js:120:21)
at XcodebuildCommandService. (/Users/macbook/Development/point/node_modules/nativescript/lib/services/ios/xcodebuild-command-service.js:28:30)
at Generator.throw ()
at rejected (/Users/macbook/Development/point/node_modules/nativescript/lib/services/ios/xcodebuild-command-service.js:5:65)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
npm ERR! code ELIFECYCLE

I get the same error. Do you guys have any solution? "Applications" folder is already created.

Hi @vidhyasgr , that is a pretty generic error, the interesing part of the output is probably _above_ the * BUILD FAILED *

Also, some information about the project would be handy: Versions of XCode and NativeScript, libraries, etc.

HI, all! Please read https://nativescript.org/blog/nativescript-6-7-xcode-compatibility/ and then after you verify XCode and NS CLI versions, let us know if you are still having issues and what versions of BOTH you are using?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kefahB picture kefahB  路  3Comments

jerbob92 picture jerbob92  路  3Comments

PeterStaev picture PeterStaev  路  3Comments

NickIliev picture NickIliev  路  3Comments

bradmartin picture bradmartin  路  3Comments