Skip to main content
Solved

if (purchaserInfo.entitlements[XXXXXXXXX]?.isActive == true) {} Not working


Forum|alt.badge.img+6

I have found testing that the line below sometimes returns false when a subscription is active. 

purchaserInfo.entitlements[XXXXXXXXX]?.isActive

How can this be?

Also I notice that in your quick start guide you no longer have the line purchaserInfo.entitlements[XXXXXXXXX]?.isActive

regards

Peter

 

Best answer by sundeep

Hi @Peter Rule,

It looks like you asked this question in a separate thread, so I answered you there: 

 

View original
Did this post help you find an answer to your question?

3 replies

Forum|alt.badge.img+6
  • Author
  • Dedicated Member
  • 19 replies
  • March 14, 2022

I have done more testing and it appears that 

Purchases.sharedInstance.getPurchaserInfoWith

is unreliable.

During an active subscription the entitlement status returned changes.

purchaserInfo.entitlements[RC_ENTITLEMENT_NO_ADS]?.isActive is true sometimes but at other times it is false.

I am testing a monthly subscription on a phone with Android 9.

Please advise


Forum|alt.badge.img+6
  • Author
  • Dedicated Member
  • 19 replies
  • March 14, 2022

I can answer my own question.

I should have looked the customer history. The testers seem to always have their subscription cancelled due to a billing error.  It didn’t occur to me that this could happen with a tester account.

Why are are billing issues happening with a tester account? Android always seem to fail and the one iOS sandbox tester had a billing issue but auto re tried and succeeded.

Can someone explain?


sundeep
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 138 replies
  • Answer
  • March 22, 2022

Hi @Peter Rule,

It looks like you asked this question in a separate thread, so I answered you there: 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings