Cannot build project for iOS from cordova cli Cannot build project for iOS from cordova cli xcode xcode

Cannot build project for iOS from cordova cli


Just remove the platforms and then add them again.

cordova platform rm ioscordova platform rm androidcordova platform add ioscordova platform add android


EDIT: Try this other solution first! It works for most issues: https://stackoverflow.com/a/28300528/1250444

I struggled with this as well. Finally found a solution by trial and error. D:

What happened for me was renaming the project name to have capitals. This caused all sorts of confusion for Cordova.

The first thing I did was rename the problematic plist and pch files to match the correct capitalization. So, in your case, if it was myPKS, but now is MyPKS, you'd need to rename the files to be MyPKS-Info.plist and MyPKS-Prefix.pch.

I then had to rename the .xcodproj to match capitalization.

After that, another issue happened:xcodebuild: error: The project 'NewName.xcodeproj' does not contain a target named 'NewName'.

To solve this, I had to rename the target to have the proper capitalization as well. Since I'm new to iOS dev, I have not idea how to describe how to get there. I just finally stumbled upon it, made the change, and it worked!

Best of luck!


What solved my problem was by doing the following

  1. Removing the ios platform; ionic platform remove ios
  2. Removing the android platform; ionic platform remove android
  3. Adding the Ios platform back; ionic platform add ios
  4. Adding the android platform back; ionic platform add android
  5. Rebuild; ionic build

Hope this helps anyone else.