"ionic state reset" break iOS environment

Hello everyone,
after a successful “ionic state reset” command execution, with the following output:

Removed platforms and plugins
Attempting to restore your Ionic application from package.json

Restoring Platforms

cordova platform add android@4.1.0
cordova platform add ios@3.9.0

Restore platforms is complete

Restoring Plugins

cordova plugin add cordova-plugin-inappbrowser
cordova plugin add cordova-plugin-network-information
cordova plugin add cordova-plugin-statusbar
cordova plugin add cordova-plugin-device
cordova plugin add https://github.com/phonegap-build/PushPlugin.git
cordova plugin add https://github.com/driftyco/ionic-plugin-keyboard.git
cordova plugin add https://github.com/whiteoctober/cordova-plugin-app-version.git
cordova plugin add https://github.com/apache/cordova-plugin-whitelist.git
Restore plugins is complete

Ionic state restore completed

Ionic reset state complete

when I try to run “ionic run ios --device”, I get the following error :

ERROR running one or more of the platforms: CordovaError: The provided path “/Users/myuser/htdocs/myapp/platforms/ios” is not a Cordova iOS project.
You may not have the required environment or OS to run this project

The funny thing is that with android (ionic run android --device) everything works flawlessly.

I’m using the following lib versions:

  • ionic 1.1.0
  • cordova 5.2.0
  • cordova ios 3.9.0
  • cordova android 4.1.0

Any suggestion would be extremely appreciated.
Thanks for your time.

1 Like

Having the same issue… after doing the reset as well. Did you figure this out?

Okay I finally fixed it. I replaced the plugins folder with a previous version and then dropped/re-added the platforms

Facing the same issue again. Is this a bug in the ionic state reset method?

What is the right fix for this? (Apart from manually restoring the plugins folder)