Monday, October 30, 2017

Cordova project can't remove plugin after update my project

Leave a Comment

I am trying to upgrade my Cordova Ionic project ios platform from 3.0.1 to the newest 4.5.2 using xcode 9. I remove the ios platform and re-add it again under CLI 7.1.0. Then I restore all the .xcodeproject settings by copy the old .xcodeproject into the new ios platform and reset all the path necessary in the workspace. Luckily my project build successfully and runs fine in the debug mode.

However when I am trying to upgrade some out of date plugins in the new project, I found that I can only "add" plugin, which everything just goes fine. But when I am trying to remove any plugin (whether they have been added in the new workspace or not), the CLI always show red font message: Error: Could not find *-Info.plist file, or config.xml file.

This message will also show up if I tried to run ionic prepare ios command. Interestingly enough, if I use the .xcodeproject file cordova originally generated, then all the things will just work fine.

Any idea on what specific settings is wrong between the old and new .xcodeproject file?

2 Answers

Answers 1

Cordova creates the files automatically, I believe copying a file generated from an old version and pasting a new one will break your project.

What happens if you remove the platform, add again but without reusing the .xcodeproject? The normal thing is that you got to work normally.

Another option would be to upgrade Cordova or a downgrade, using nvm you can have several versions of Nodejs and Cordova.

Answers 2

You didn't mentioned in your question how you are removing the ios platform , try to do them as follows:

cordova platform remove ios 

cordova platform list here you can verify that ios platform deleted

cordova platform add ios --save 

I don't know what version you are using but cordova 6.5.0 should solve the ios-build issues. you can install using like below:

sudo npm i -g cordova@6.5.0 
If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment