Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cordova run with ios error .. Error code 65 for command: xcodebuild with args:

This error occur only when I try to cordova run ios --device

Even after cordova build ios command executed, non error is reported.

Whats I do wrong? And how to debug cordova projects on my iPhone (need this because need to test a Camera feature)

WITH CONFIGURATION Debug ===

Check dependencies
Code Sign error: No provisioning profiles found: No non–expired provisioning profiles were found.

** BUILD FAILED **


The following build commands failed:
        Check dependencies
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/Users/ridermansb/Projects/jdapp/platforms/ios/cordova/build-debug.xcconfig,-project,CorrijaMe.xcodeproj,ARCHS=armv7 armv7s arm64,-target,CorrijaMe,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 armv7s arm64,CONFIGURATION_BUILD_DIR=/Users/ridermansb/Projects/jdapp/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/ridermansb/Projects/jdapp/platforms/ios/build/sharedpch
ERROR running one or more of the platforms: Error: /Users/ridermansb/Projects/jdapp/platforms/ios/cordova/run: Command failed with exit code 2
You may not have the required environment or OS to run this project
like image 951
ridermansb Avatar asked Dec 08 '15 21:12

ridermansb


4 Answers

You need a development provisioning profile on your build machine. Apps can run on the simulator without a profile, but they are required to run on an actual device.

If you open the project in Xcode, it may automatically set up provisioning for you. Otherwise you will have to create go to the iOS Dev Center and create a profile.

like image 56
Connor Avatar answered Nov 14 '22 19:11

Connor


Try to remove and add ios again

ionic cordova platform remove ios

ionic cordova platform add ios

Worked in my case

like image 50
Shashank Saxena Avatar answered Nov 14 '22 19:11

Shashank Saxena


I had the same problem. In my case cordova platform update ios helped. The reason was in outdated version.

like image 25
Khrystyna Skvarok Avatar answered Nov 14 '22 20:11

Khrystyna Skvarok


I was getting the same error when I tried to do :

cordova build ios

except mine said ** ARCHIVE FAILED ** rather than ** BUILD FAILED **.

I fixed it by opening the projectName.xcodeproj file in Xcode and then adjusting these 2 settings :

  1. In Targets > General > Signing ensure you have selected a Team

enter image description here

  1. In Targets > Build Settings > (search for "bitcode") set Enable Bitcode to "Yes"

enter image description here

Then I quit out of Xcode and reran cordova build ios and it worked.

like image 25
kris Avatar answered Nov 14 '22 19:11

kris