Hello!
I'm using iOS SDK and I need to send my event reporting metric depending on the purchase or start of a trial period. Can you please tell me if there is a property based on which I can implement the functionality I need? If someone has some developments in the form of Swift code I will be very happy to help.
Solved
How to recognize a trial or purchase
Best answer by joan-cardona
Hi
You can check `PeriodType` in the entitlement info to know if the user has an active entitlement due to a trial or a paid subscription.
PeriodType
is an enum that has 3 possible options:
- 0 normal
- 1 intro
- 2 trial
The entitlement can be found in the CustomerInfo object so you can see the value at any moment.
Best,
This post has been closed for comments
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.