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
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.
Try to remove and add ios again
ionic platform remove ios
ionic platform add ios
Worked in my case
Replace ionic with cordova if appropriate.
I had the same problem. In my case cordova platform update ios
helped. The reason was in outdated version.
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 :
- In Targets > General > Signing ensure you have selected a Team
- In Targets > Build Settings > (search for "bitcode") set Enable Bitcode to "Yes"
Then I quit out of Xcode and reran cordova build ios
and it worked.
I tried a few things in this scenario.
I removed ios and installed many times. Went down the path of deleting Splash screens to no avail! Bitcode on/off so many times.
However, after selecting a iOS provisioning team, and running pod update
inside ./platforms/ios
, I am pleased to announce this resolved my problems.
Hopefully you can try the same and get some resolution?
In my case it was the app icon PNG file... I mean, it took 1 day to go from the provided error
Error code 65 for command: xcodebuild with args:
to the human-readable one:
"the PNG file icon is no good for the picky Apple Xcode"
I must add :
I had the same problem, it was coming from the fact that my teammate had a different version of cordova, and commited plugins on the repo with his version.
For all cordova plugins, I had to :
cordova plugin rm <plugin-name>
cordova plugin add <plugin-name>
And ask my teammate to update his cordova to match my version
How to do what @connor said:
iOS
- Open
platforms/ios
on XCode
- Find & Replace
io.ionic.starter
in all files for a unique identifier
- Click the project to open settings
- Signing > Select a team
- Go to your device Settings > General > DeviceManagement
ionic cordova run ios --device --livereload
1) Open code in Xcode
2) Continue with : ionic cordova build ios