Cordova Error: Your ios platform does not have Api.js

I'm trying to build a cordova ios app but not having much luck and getting strange errors.

Using this version of Cordova with older version of cordova-ios is deprecated. Upgrade to cordova-ios@4.0.0 or newer.

Error: Your ios platform does not have Api.js

The first warning says my cordov-ios version is old, which is strange as this is my output:

$ cordova --version
7.0.1



$ cordova platform version ios

Installed platforms:
  ios 4.4.0
Available platforms: 
  android ~6.2.2
  blackberry10 ~3.8.0 (deprecated)
  browser ~4.1.0
  osx ~4.0.1
  webos ~3.7.0

So I clearly have the latest versions necessary.

And then the Api.js error. What is causing this?

Error: Your ios platform does not have Api.js

Any ideas?


I'm guessing that attempting to use deprecated code is the reason for seeing the error message.

It appears that one should be using the latest version of node. I also performed all my software updates for Xcode. I also connected my iPhone to my computer. Even after that (and before I updated node) I was still seeing this:

cordova platform add ios

Warning: using node version v0.12.0 which has been deprecated. Please upgrade to the latest node version available (v6.x is recommended).
Using cordova-fetch for cordova-ios@^4.4.0
Adding ios project...
Error: Your ios platform does not have Api.js

Then I decided to resolve the warning by updating node. And finally success:

sudo n latest
node --version
=> v8.0.0

cordova platform rm ios
cordova platform add ios

Using cordova-fetch for cordova-ios@~4.4.0
Adding ios project...
Creating Cordova project for the iOS platform:
    Path: platforms/ios
    Package: com.example.hello
    Name: HelloWorld
iOS project created with cordova-ios@4.4.0
Installing "cordova-plugin-whitelist" for ios
--save flag or autosave detected
Saving ios@~4.4.0 into config.xml file ...

The platform "ios" does not appear to be a valid cordova platform , I constantly get the below error when installing any cordova plugin. It is missing API.js. ios not supported. What platform would you like to build (android, ios): ios [WARN] Detected @ionic/cli-plugin-cordova in your  $ ionic cordova platform add ios [WARN] Detected locally installed Ionic CLI, but it's too old--using global CLI. > cordova platform add ios --save Using cordova-fetch for cordova-ios@4.4.0 Adding ios project


I was having exactly this problem but managed to solve it by simply removing and then adding the IOS platform within my project:

cordova platform rm ios
cordova platform add ios

This seemed to fix whatever had somehow got broken when updating Cordova...

Ionic: Your ios platform does not have Api.js - ionic-v1, Running command - failed! [ERROR] Exception: Using cordova-fetch for ios Adding ios project Error: Your ios platform does not have Api.js. Using this version of Cordova with older version of cordova-android is deprecated. Upgrade to cordova-android@5.0.0 or newer. Error: Your android platform does not have Api.js. Below is the output with --verbose option:


Has same issue with latest version of cordova (7.0.1)

Faced error while adding iOS platform and managed to resolve it by upgrading nodeJS to latest version (6.11.1)

Solved: Your android platform does not have Api.js, Interestingly, it caused my iOS build to generate the same API.js error as the Android build. That was not the case with phonegap-plugin-push set to 1.10.0. <​  blind shutter window Interior shutters aluminum security window. 480 cheap security shutters products are offered for sale by suppliers on Alibaba.com, of which doors accounts for 63%, shutters accounts for 20%, and windows accounts for 6%.


use cordova@6.0 solved the problem

Cryptic error, I am trying to build an app and I am getting this error message. I am not seeing what is Cryptic error - Your ios platform does not have Api.js. Avatar <​preference name="phonegap-version" value="cli-5.2.0" />. <preference  [testcordova]$ cordova platform add ios Using cordova-fetch for cordova-ios@^4.5.5 Failed to fetch platform cordova-ios@^4.5.5 Probably this is either a connection problem, or platform spec is incorrect. Check your connection and platform name/version/URL. Failed to get absolute path to installed module [testcordova]$ cordova platform add ios


For those of you that have tried updating your NodeJs and that didn't work.

Go check in your platforms/android or platforms/ios folder. Mine was empty. Delete the folder, and run ionic cordova add android/ios again.

Can't install plugin. Your android platform does not have Api.js, Upgrade to cordova-ios@4.0.0 or newer. Error: Your ios platform does not have Api.js. The first warning says my cordov-ios version is old, which is strange as  Apache Cordova; CB-13544; Can't install plugin. Your android platform does not have Api.js


updating node.js to latest version, I'm trying to create an Android/iOS plugin but while trying Cordova is throwing an error. Here are the steps I follow:  Our Android and iOS builds have been failing through Phonegap Build for the last few weeks. We currently have plans to upgrade our version of the Phonegap CLI, but we are not sure why our builds are currently failing since the support for the older versions of Phonegap shouldn't be discontinued unti


phonegap Your android platform does not have Api.js, i have my app which is published to apple store already , ios Failed to install '​cordova-plugin-contacts': Error: Your ios platform does not have Api.js at Object. Error: Failed to fetch platform cordova-ios@4.5.3 Probably this is either a connection problem, or platform spec is incorrect. Check your connection and platform name/version/URL. Error: npm: Comma


phonegap Your android platform does not have Api.js Error - Plugin error (you probably need to remove plugin files from your app): ios: if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen --> I am not seeing what is possibly happening - I have an old version that I'm using (I'll - 9220780 Adobe Support Community All community This category This board Knowledge base Users cancel