games_services
games_services copied to clipboard
Achievements.loadAchievements weird
Achievements.loadAchievements()
not works when in release
build, but works in debug
build.
Other methods GamesServices.signIn()
, GamesServices.getPlayerName()
, GamesServices.getPlayerScore(...)
work for both.
So no idea what's going on.
I think it's for any Android, but I tested on Android 12, flutter:3.3.3
I/flutter (13329): type 'Null' is not a subtype of type 'String'
I/flutter (13329): #0 new AchievementItemData.fromJson (package:games_services/src/models/achievement_item_data.dart:38)
I/flutter (13329): #1 Achievements.loadAchievements.
This is due to code obfuscation of our serialized model classes in the release build. As a quick temporary fix, exclude the model classes from obfuscation by adding the following line to your proguard rules:
-keep class com.abedalkareem.games_services.models.** { <fields>; }
However, this should be handled by the package. I will submit a pull request shortly to fix this.
@Abedalkareem make a new package release, please. You made a lot of useful changes in develop branch
@booooohdan
A new version released.
3.0.1