-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove ./backup/platform/* on platform remove/update #42
Comments
I'm beginning to think that this auto-backup/restore feature is more hassle than it's worth. It's a feature someone asked for in the very early stages of the plugin, but I think at the very least I will turn it off default (as opposed to current default of on). Then also, as you suggest, wipe any backups between platform removal/updates. |
I would agree - turn it off by default. I personally don't understand what benefit it offers. If it's removed when the platform is updated, what good was that backup for anyway? I think a backup/restore would be better implemented manually by someone with their own custom hooks. They obviously have some kind of special scenario going on. |
The idea of the backup/restore was to allow "removable" custom config. Let's say you add a preference or config block that has an undesirable effect or you no longer want to apply it. But the plugin has already injected the relevant config into the platform-specific files (e.g. AndroidManifest.xml). Without the backup/restore mechanism, the only way to remove it (without removing/re-adding the platform) is to manually edit the platform configs. The conversion of custom config in the config.xml into the platform-specific translation is not always obvious to plugin users, so manual removal can be tricky for them. Of course, one option is to remove/re-add the platform. I myself never manually touch anything under But, agreed, it should be switched off by default, which I'll do in the next release. |
Got it. That makes sense. I use to fall into that bucket of making manual changes, but as things have matured (and with plugins like this), it should no longer be necessary anymore. Thanks for the quick reply. |
I recently upgraded my Cordova project from Android 4.1.1 to Android 5.1.1.
I performed a "cordova platform remove android" and shortly after, I added back the platform with the new android version.
Upon building the project I noticed my AndroidManfiest.xml was still pointing to the old targetSDK. I couldn't figure out why. As it turns out, this plugin had a backup of the old Android Manifest. I'm not sure how you are maintaining this backup, but it should be removed anytime the platform is removed. (and probably updated as well?)
I did see the preference, cordova-custom-config-autorestore, which I will implement, but I wanted to at least report this.
The text was updated successfully, but these errors were encountered: