Question

periodType in IOS production doesn't detect free trial

  • 1 July 2022
  • 4 replies
  • 156 views

Badge +2

Hello. I check this property using (customerInfo.entitlements.active.value.periodType == .intro) which works fine in sandbox, however in production it doesn’t detect the free trial period correctly.  Any thoughts?  

Thanks.  

 

Kareem.


4 replies

Badge +5

I think there might be a bug here… I think the reason Kareem needs to check both ".trial" as well as ".intro" in production, is because in Sandbox only “.intro” is ever returned, incorrectly.  

For example, testing with the below configuration will return .into, and not .trial within that 1 week free trial period. When checking purchaserInfo?.entitlements[OfferingIdentifiers.fullAccess.rawValue].periodType

Is this correct? 

 

Thank you for letting us know, in case there is anything else we can help with, please feel free to reach out to support@revenuecat.com for a quicker answer. 

Badge +2

Hello Anna.  I was trying to determine if user was within the one month free trial period.  I needed to check against ".trial" as well as ".intro" in production code.  Everything works fine now.  Thanks.  Kareem

Hello Kareem, 

Could you please help us better understand the issue by providing what is being returned to periodType? 

If periodType doesn’t return a value, it would be because the underlying entitlement that you are checking is null. 

Thank you in advance, 

Anna

 

Reply