Skip to main content
Question

periodType in IOS production doesn't detect free trial

  • Jul 1, 2022 8:19 PM UTC
  • 4 replies
  • 555 views

Forum|alt.badge.img+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.

This post has been closed for comments

4 replies

  • Jul 4, 2022 1:09 PM UTC

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

 


Forum|alt.badge.img+2
  • Author
  • New Member
  • Jul 4, 2022 11:56 PM UTC

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


  • Jul 12, 2022 7:16 AM UTC

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. 


Forum|alt.badge.img+5
  • New Member
  • Jun 30, 2023 11:45 AM UTC

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?