This issue often occurs when code obfuscation and shrinking tools, like ProGuard, are enabled for your Android release builds. ProGuard can sometimes remove or rename parts of the Pushwoosh SDK's code, which prevents it from working correctly.
To fix this, you need to add specific rules to your ProGuard configuration file (proguard-rules.pro) to ensure the Pushwoosh SDK classes are kept intact.
- Locate and open the
android/app/proguard-rules.profile in your Flutter project. - Add the following rules to the file:
-keep class com.pushwoosh.** { *; } -keep class com.google.android.gms.common.** { *; } -keep class com.google.firebase.** { *; } -dontwarn com.pushwoosh.**
After adding these rules, clean and rebuild your application. This will prevent ProGuard from interfering with the Pushwoosh SDK, allowing push notifications to be delivered successfully in your release app.
Comments
0 comments
Please sign in to leave a comment.