This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. | |
Purchases.shared.setEmail(emailField.text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 2. | |
Purchases.shared.setAttributes(["favorite_workout" : "cycling"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"attributes" : { | |
"cancel_survey_sent" : { | |
"value" : {{zap_meta_timestamp}} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Purchases.shared.getPurchaserInfo { info, error in | |
// info.entitlements[“beta”]?.isActive == true | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// An example call to getOfferings from a Flutter app (see diagram step a) | |
try { | |
Offerings offerings = await Purchases.getOfferings(); | |
// Display packages for sale | |
} on PlatformException catch (e) { | |
// optional error handling | |
} |