How to fix Failed to fetch platform cordova-ios@~4.4.0
I have resolved this, it appears to be an NPM issue and not a Cordova one. I just updated NPM within Terminal and after the update "cordova platform add ios" worked fine. Happy days - 1 !
npm update -g
Delete the folder
cordova-ios
, located innode_modules/cordova-ios
.Type the following command
ionic cordova build ios
Sometimes a previously added Platform is not removed Properly, so this type of issue occurs. Remove the platform by command and add it again..
Follow this steps:
Run the command
ionic cordova platform remove ios
Run the command:
ionic cordova platform add ios --save
If you are still getting the issue, try running again:
ionic cordova platform remove ios --save
NOTE: By running again the command ionic cordova platform remove ios --save
fetches newer version of ios platform.
For example:
- First time:
cordova-fetch for cordova-ios@~4.5.1
- Second time:
cordova-fetch for cordova-ios@~4.5.4