nativescript-cli icon indicating copy to clipboard operation
nativescript-cli copied to clipboard

Command xcodebuild failed with exit code 65.

Open ahtishamashraf opened this issue 8 years ago • 12 comments

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.

ahtishamashraf avatar May 07 '18 08:05 ahtishamashraf

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.

Fatme avatar May 08 '18 06:05 Fatme

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

ahtishamashraf avatar May 08 '18 06:05 ahtishamashraf

@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.

Fatme avatar Jul 20 '18 13:07 Fatme

tns build ios --clean solved the issue for me

snq avatar Nov 05 '18 13:11 snq

run tns build ios --clean --log trace first ,if 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.

kai-up avatar Sep 14 '19 11:09 kai-up

(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)

orl123124 avatar Nov 25 '19 03:11 orl123124

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)

orl123124 avatar Nov 25 '19 03:11 orl123124

** 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

JavierAcevedoC avatar Apr 21 '20 17:04 JavierAcevedoC

** 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.

vidhyasgr avatar Oct 09 '20 09:10 vidhyasgr

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.

madmas avatar Oct 13 '20 08:10 madmas

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?

NathanaelA avatar Oct 13 '20 19:10 NathanaelA

HI !

Here is what helped me

  • XCODE 13.3.1
  • NativeScript 8.0.2 cli
  • Platform IOS "6.5.2"

STEP 1 (build.xcconfig)

// xcode 13
EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8
EXCLUDED_ARCHS=$(inherited)
$(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))

IPHONEOS_DEPLOYMENT_TARGET = 12.0

STEP 2 (Podfile)

pod 'CocoaAsyncSocket'

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
      config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
      config.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] ='NO'
      config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
    end
  end
end

IPHONEOS_DEPLOYMENT_TARGET = 12.0

give me a star thanks

adideas avatar Apr 11 '22 20:04 adideas