You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you save an String preference with key foo and for reasons known or unknown try to get a Boolean preference with key foo the resulting behavior is different depending on the platform.
In case of Android's SharedPreferences it'll throw ClassCastException (ref), Apple's NSUserDefaults will return NO/false (ref), JVM's PropertiesSettings will just return the default value (ref)
Since multiplatform-settings only calls the platform method and doesn't do any kind of validation/extra work this results in inconsistency
The text was updated successfully, but these errors were encountered:
This inconsistency is known and documented in the getter methods. It's not clear what the best way to work around it would be, but I'm open to suggestions.
If you save an
String
preference with keyfoo
and for reasons known or unknown try to get aBoolean
preference with keyfoo
the resulting behavior is different depending on the platform.In case of Android's
SharedPreferences
it'll throwClassCastException
(ref), Apple'sNSUserDefaults
will returnNO
/false
(ref), JVM'sPropertiesSettings
will just return the default value (ref)Since
multiplatform-settings
only calls the platform method and doesn't do any kind of validation/extra work this results in inconsistencyThe text was updated successfully, but these errors were encountered: