Ionic build ios plugin errors (exit code 65)

I deleted the plugin/ios folder and did “sudo ionic platform ios”, added the plugins again (not sure if it does anything) and it worked.

ionic platform rm ios
ionic platform add ios
ionic emulate ios

9 Likes

I have the same issue removing platforms folder and removing ios.json doesnt help in my case. I even removed all plugins but still build doesnt pass

I fixed it with removing platform then editing the config.xml ( I changed the app name ) and then adding ios platform again.

removing the platform and adding it back worked for me.

ionic platform remove ios
ionic platform add ios
2 Likes

can you try this

1 Like

Yup, this was a permissions issue - $sudo ionic build ios - worked for me.
Thanks for the help guys.

1 Like

I got same error when try to emulate ios,

$ ionic platform add ios
$ ionic build ios
$ ionic emulate ios  -> i got error

2014-11-14 14:52:48.002 ios-sim[8769:142383] stderrPath: /Library/WebServer/Documents/angular/ionic/myApp/platforms/ios/cordova/console.log
2014-11-14 14:52:48.002 ios-sim[8769:142383] stdoutPath: /Library/WebServer/Documents/angular/ionic/myApp/platforms/ios/cordova/console.log
Usage of ‘–family’ is deprecated in 3.x. Use --devicetypeid instead.
Usage of ‘–retina’ is deprecated in 3.x. Use --devicetypeid instead.

I got the same build error, this worked for me:

ionic platform remove ios
ionic platform add ios
6 Likes

worked for me too, thx.

my problem doesn’t happen when i run ionic emulate ios it happens when i run ionic run ios. this is after uninstalling cordova and ionic then reinstalling. removing/adding plugins. then running ionic build. suggestions?

edit: after reading other posts, i tried creating a new project to see if i get this error. unlike my real project which fails on ‘ionic run ios’ but runs fine when running ‘ios emulate ios’, this new project now requires me to run sudo and it fails on emulate.

You saved me, thanks!

I am not sure what was the actual problem, I tried to remove iOS platform and then re added it to make it work.

I tried everything above but it just didn’t seem to work. My permissions must have been way off. This ended up working for me:

sudo npm update -g cordova
sudo npm update -g ionic
rm -rf plugins/
rm -rf platforms/
ionic platform add ios
ionic run ios

Letting cordova remake the folders must have done it.

8 Likes

Thanks this worked for me as well!

Adding CordovaLib to “Target Dependencies” worked for me. Although, I can’t figure out that how it got removed.

1 Like

Generally, by logging things and looking at output package we’ve found that plugin installation is not always reliable. In some cases a couple of plugins might fail to install properly (and thus we see “not defined” messages in our logs). Usually removing and (re)adding the failing plugin has fixed this issue. Presumably this is why removing and (re)adding platforms often helps. Another thing to try is cleaning the project before doing a build - both iOS and Android have a cleanup script available in either ./platforms/ios/cordova/clean and ./platforms/android/cordova/clean respectively which can help sometimes when run between builds.

3 Likes

THANK YOU!!
I spent a good 3hrs google searching for a solutions, and this worked. Lesson learn: When all else fails remove the plugins and platforms!

1 Like

Thank you so much, you saved my day! :clap:

Thanks!!!
Works great for me!!!