-
Notifications
You must be signed in to change notification settings - Fork 17
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
Replace an element defined within the config-file #11
Comments
Hi, can you provide me a simple cordova project that produce this issue ? I'm not able to reproduce it. |
@mircoc I'm running into the same issue. I'm trying to add an activity-alias to my AndroidManifest.xml file and the parent it set to "/manifest/application" but when I try to build the project, I get an error in my output stating
It looks like it still might add the entry, but I'm not sure why the error is being thrown. Here's the logic in my config.xml file.
If I change the config-file parent to "manifest/application", it doesn't insert into the proper location. It looks like it needs to have the slash in front of it. |
I might have found a workaround, at least for my case in need to manipulate the application tags inside the AndroidManifest.xml. In looking at the updatePlatformConfig.js code for the plugin, I noticed when preferenceMappingData is defined (around line 98) that there's an entry to change the application name and the parent is set to "application" instead of "/manifest/application". When I changed my code to just have the parent of "application" it works. I think this is a workaround and still should support the other format of "/manifest/application" though. |
Hi,
If I want to replace an element defined within the config-file how can I do that. Below one is not working for android. It's get appended to the same element
<config-file target="AndroidManifest.xml" parent="application"> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/fb_app_id"/> </config-file>
The text was updated successfully, but these errors were encountered: