Skip to content
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

[Bug]: Android manifestplaceholders are overridden by plugin #889

Closed
2 of 3 tasks
leonluc-dev opened this issue May 17, 2023 · 2 comments
Closed
2 of 3 tasks

[Bug]: Android manifestplaceholders are overridden by plugin #889

leonluc-dev opened this issue May 17, 2023 · 2 comments

Comments

@leonluc-dev
Copy link

leonluc-dev commented May 17, 2023

What happened?

Our Ionic/Capacitor Androidproject has a few manifestPlaceholder values defines in it's build.gradle like this:

android {
    defaultConfig {
         // ...
         manifestPlaceholders = [ alternativeAppName: "MyTestAppName" ]
    }
}

However, it seems our manifest placeholders are overriden by the plugin.
If the plugin is added the manifestPlaceholders array is replaced by an array containing onesignal_app_id and onesignal_google_project_number.

This causes any usage of the alternativeAppName placeholder to break:

Error: Attribute application@label at AndroidManifest.xml:7:9-35 requires a placeholder substitution but no value for <alternativeAppName> is provided

Steps to reproduce?

1. Add the manifestPlaceholders property to the android projects build.gradle and assign some placeholders.
2. Use the placeholder(s) in the Android Manifest
3. Add the plugin to the Ionic/Capacitor project (and run `npx cap sync` etc)
4. Observe that the project placeholders are overriden by the plugin placeholders and therefore the manifest parsing fails

What did you expect to happen?

The placeholders provided by the plugin to be additive rather than replacing the placeholders in the project.

OneSignal Cordova SDK version

3.3.1

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@leonluc-dev leonluc-dev changed the title [Bug]: Manifestplaceholders are overridden by plugin [Bug]: Android manifestplaceholders are overridden by plugin May 17, 2023
@emawby
Copy link
Contributor

emawby commented Nov 3, 2023

@leonluc-dev Hello I apologize for the late reply is this still an issue in the latest version?

@leonluc-dev
Copy link
Author

@emawby As of v5.0.3 this seems to no longer be an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants