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]: Cannot subscribe in Release mode on Huawei devices #956

Closed
2 of 3 tasks
tommylung opened this issue Sep 26, 2024 · 1 comment
Closed
2 of 3 tasks

[Bug]: Cannot subscribe in Release mode on Huawei devices #956

tommylung opened this issue Sep 26, 2024 · 1 comment

Comments

@tommylung
Copy link

tommylung commented Sep 26, 2024

What happened?

I have the same code and settings on Huawei devices.
It can subscribe in Debug Mode, but it does not work in Release Mode.

Red Box is Debug Mode, and Blue Box is Release Mode.
Screenshot 2024-09-26 at 2 12 22 PM

Steps to reproduce?

1. Using SDK v5.2.5
2. Can subscribe in Debug Mode. Cannot subscribe in Release Mode.

What did you expect to happen?

I expected to subscribe to OneSignal with Debug mode and Release mode on Huawei devices.

OneSignal Flutter SDK version

Release 5.2.5

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
@tommylung
Copy link
Author

tommylung commented Nov 5, 2024

It was successful to subscribe in Release mode after updating the proguard rules in app/build.gradle.

Change

buildTypes {
    debug {
        signingConfig signingConfigs.release
    }
    release {
        signingConfig signingConfigs.release
    }
}

to

buildTypes {
    debug {
        signingConfig signingConfigs.release
    }
    release {
        shrinkResources false
        minifyEnabled false
        signingConfig signingConfigs.release
    }
}

Reference: https://stackoverflow.com/questions/65872226/missingpluginexception-in-flutter-in-release-mode-android

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

1 participant