Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you modify a PhoneGap / Cordova plugin and rebuild for iOS with the modification?

I am using the Cordova Splash Screen plugin (http://plugins.cordova.io/#/package/org.apache.cordova.splashscreen) and there is a bug with the current plugin that is causing the app to constantly crash. It appears the bug is documented here (https://issues.apache.org/jira/browse/CB-7497) but has not yet been fixed in an update, although a workaround is provided.

How do I incorporate the workaround in my project as I am unfamiliar with how to create or modify Cordova plugins. I edited the code to include the workaround mentioned, but how do I get the plugin to recompile for the actual Cordova or iOS project with the changes to the code that were made? I am a beginning to this, so if someone can provide easy to understand instructions on how I would go about incorporate this modified plugin back into my project I would appreciate it.

like image 345
user3324565 Avatar asked Jan 05 '15 21:01

user3324565


1 Answers

If you are debugging or want to modify the plugin code for any reason (including the plugin.xml file), you should remove and add the platform again. All the plugin code will be deployed to the corresponding platform according to the xml file:

cordova platform remove ios
cordova platform add ios
like image 63
Kilian Perdomo Curbelo Avatar answered Oct 16 '22 21:10

Kilian Perdomo Curbelo