cordova-ios icon indicating copy to clipboard operation
cordova-ios copied to clipboard

xcodebuild: command failed with exit code 65

Open shanlin2dltk opened this issue 4 years ago • 13 comments

Bug Report

My app was built successfully with Cordova-ios version 5.1.1. After changing iOS engine in config.xml from 5.1.1 to 6.1.0, 'cordova build ios' gives error: xcodebuild: Command failed with exit code 65 Error: xcodebuild: Command failed with exit code 65 at ChildProcess.whenDone (/Users/shanlin/build/extjs_cp_time/cordova/node_modules/cordova-common/src/superspawn.js:136:25) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:962:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)

Any idea about what might be the problem?

Command or Code

cordova build ios

Version information

cordova cli version 9.0.0 and 10.0.0 both have the issues. cordova-ios version 6.1.0 generates the error. Mac OS 10.14.6 Xcode 11.3.1

shanlin2dltk avatar Aug 11 '20 19:08 shanlin2dltk

I had the error with exit code 65, but upgraded Xcode to 11.6, and it's working for me now.

probityrules avatar Aug 14 '20 00:08 probityrules

Just upgraded to Xcode 11.6, I am still getting the same error. Specifically xcodebuild: Command failed with exit code 65 at ChildProcess.whenDone (/Users/shanlin/build/extjs_cp_time/cordova/node_modules/cordova-common/src/superspawn.js:136:25)

shanlin2dltk avatar Aug 19 '20 17:08 shanlin2dltk

The newest version [email protected] still has the same error.

shanlin2dltk avatar Sep 15 '20 16:09 shanlin2dltk

when using socket plugins, removing and adding them agin helped here to get rid of error 65

lasrbugs avatar Sep 18 '20 10:09 lasrbugs

when using socket plugins, removing and adding them agin helped here to get rid of error 65

there's no socket plugins in my plugins, still got error 65 when building

indrapalijama avatar Oct 01 '20 08:10 indrapalijama

For some background context, error 65 from xcodebuild is a generic error that simply describes that xcodebuild couldn't do a build, which of course... pretty much anything could cause: invalid configuration, unmaintained plugins, out-dated software, etc. Without digging into more of xcodebuild output, you're trying to find a needle in a haystack.

You may have to scan through the tons of input that xcodebuild produces or open up the XCode project located at ./platforms/ios/<App Name>.xcworkspace and try to build from XCode GUI to get a more meaningful error.

breautek avatar Oct 01 '20 11:10 breautek

For some background context, error 65 from xcodebuild is a generic error that simply describes that xcodebuild couldn't do a build, which of course... pretty much anything could cause: invalid configuration, unmaintained plugins, out-dated software, etc. Without digging into more of xcodebuild, you're trying to find a needle in a haystack.

You may have to scan through the tons of input that xcodebuild produces or open up the XCode project located at ./paltforms/andriod/ios/<App Name>.xcworkspace and try to build from XCode GUI to get a more meaningful error.

did it somehow related to xcode version?

indrapalijama avatar Oct 02 '20 02:10 indrapalijama

did it somehow related to xcode version?

No. Xcode uses error code 65 for as long as i started developing. Using an unsupported XCode version could be a cause, but as long as you're using >= 11 that should be sufficient.

breautek avatar Oct 02 '20 02:10 breautek

did it somehow related to xcode version?

No. Xcode uses error code 65 for as long as i started developing. Using an unsupported XCode version could be a cause, but as long as you're using >= 11 that should be sufficient.

Thanks, i finally did find the root cause using your answer above. it seems that the cordova-file-transfer is causing the error and i found the fix using this git. sorry for the out of topic question, i want to know how can i add this plugin?

indrapalijama avatar Oct 02 '20 03:10 indrapalijama

I have the same problem when I'm building for ios with "prod" tag.

I have:

  • MacOS catalina 10.5.4
  • Xcode version 12.2
  • cordova-ios 6.0.0

For me the solution that worked was first sign the app on xcode after the first build issue (open platform/ios with xcode and sign the app). Then I build with the commands that people suggest here, but I have to add the "--device" tag also. After that work good :)

ionic cordova run ios --prod --release --buildFlag="-UseModernBuildSystem=0"  --device

ZumelzuR avatar Dec 16 '20 14:12 ZumelzuR

So @ZumelzuR the useModernBuildSystem part is clearly the difference, is that not something that can be hardcoded in the tsconfig or something?

gbrits avatar Jan 12 '21 11:01 gbrits

You can add the command to prod build in you package.json as "scripts" prroperty or you can create a build.json (you can find in internet some examples) with all the specifications.

Ex.

{ "ios":{ "release" : { "buildFlag": [ "--UseModernBuildSystem=0" ] } }

ZumelzuR avatar Jan 12 '21 12:01 ZumelzuR

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

adideas avatar Apr 11 '22 21:04 adideas

Error code 65 is the result whenever Xcode encounters a build error. This does not provide any detail about what the error was or how to address it. It could be anything from a bad plugin to bad code signing, but without more details and the actual error message from Xcode, we can't provide any help diagnosing it.

Closing this bug due to lack of actionable information. If you run into error code 65, look for the actual error message from Xcode and then open a new bug with that detail.

dpogue avatar Mar 09 '24 06:03 dpogue