Solved

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

  • 13 March 2022
  • 3 replies
  • 796 views

Userlevel 1
Badge +5

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

 

icon

Best answer by sundeep 22 March 2022, 01:25

View original

3 replies

Userlevel 1
Badge +5

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

Userlevel 1
Badge +5

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?

Userlevel 3
Badge +8

Hi @Peter Rule,

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

 

Reply