Cordova Build Error After Removing And Add The Same Plugin

170 Views Asked by At

I am getting build error while I am removing the plugin through Cordova CLI and again add the same plugin. Anybody can help me why I am getting error?

Thanks in Advance :)

1

There are 1 best solutions below

1
Augustine P A On BEST ANSWER

Hi myself found the issue. While I am adding plugin to cordova iOS project, required frameworks also getting added to the XCode Project (Frameworks mentioned in plugin.xml). And while I am removing the plugin, the framework already added still remains in the XCode project navigator window. When again I am adding the plugin, cordova not adding the framework to this project hence getting the build error.

Solution

  • Run Cordova remove plugin through CLI
  • Manually remove the unused framework reference from the xcode project.
  • Add the plugin through Cordova CLI

I think this is either a Cordova or XCode bug. This error is inconsistent and its is happening sometimes. I got this error while developing & testing custom Cordova plugin.