ApplicationPreferences
The ApplicationPreferences class provides static methods to read and write application-scoped preferences (SharedPreferences on Android, NSUserDefaults on iOS). This allows reading and managing IAB TCF v2, GPP, and UMP consent strings (such as IABTCF_PurposeConsents, IABGPP_HDR_GppString) as well as Google-specific flags (such as gad_has_consent_for_cookies).
Static Methods
set_int / SetInt
Stores an integer preference value for the specified key.
get_int / GetInt
Retrieves an integer preference value for the specified key. Returns default_value if the key does not exist.
set_string / SetString
Stores a string preference value for the specified key.
get_string / GetString
Retrieves a string preference value for the specified key. Returns default_value if the key does not exist. Useful for inspecting IAB TCF strings (e.g., IABTCF_PurposeConsents).
Usage:
set_boolean / SetBoolean
Stores a boolean preference value for the specified key.
get_boolean / GetBoolean
Retrieves a boolean preference value for the specified key. Returns default_value if the key does not exist.
Usage: