0

I installed a custom plugin for my app and want to make a change to it, but it doesn´t seem to take any effect. I can even remove functions or write wrong syntax, but it just remains in the old state.

I tried deleting the local data from the phonegapp developer app in case they are caching these things.

In the config.xml:

<feature name="SocialSharing" >
  <param name="android-package" value="nl.xservices.plugins.SocialSharing"/>
</feature>

I am editing the SocialSharing.java file within platforms\android\src\nl\xservices\plugins. There is no other SocialSharing.java file within the project.

Michael
  • 499
  • 4
  • 16
  • 1
    You should *never* edit files in the `platforms` folder. To modify a plugin do it in the `plugins\` folder, remove the platform and readd the platform. – David Oct 28 '17 at 11:54

1 Answers1

1

As David said, you should edit the files in the plugin folder, not in the platform folder wich content is replaced each time you build.

To use modified version of a plugin, I would suggest that instead of modifying it in your project and have to do it again in another project, you just fork the project and then install the plugin from your forked repo.

Or if you don't want to upload the modified version, you can just click download the plugin from git and then install it in your project by specifying the path in your file system in the cordova plugin add command.

QuickFix
  • 11,661
  • 2
  • 38
  • 50