Skip to main content
Answer

iOS App - Issues getting subscription state

  • May 4, 2022
  • 2 replies
  • 77 views

Forum|alt.badge.img+2

I am working on implementing RevenueCat into my iOS App. I am able to make purchases using the sandbox environment and within the RC Sandbox Dashboard I am able to see that the Firebase Authentication id I am using is displaying properly as the RC Unique ID. 

To be clear, I am using the automatically generated Firebase Authentication Unique Identifier as the UID on RC. 

 

The issue I am having is determining the subscription state. Following along with the example project included in the swift package. I am attempting to determine state using the following code…

 

    @Published var customerInfo : CustomerInfo? {

        didSet {

            subscriptionActive = customerInfo?.entitlements[entitlementID]?.isActive == true

        }

    }
 

I have noticed that upon launch, I am unable to retrieve customerInfo however, when I logout then log back into my Firebase Auth account - it will display customerInfo? I am not sure where I am going wrong.

Best answer by hallux

It appears that this all may have been caused by my misunderstanding of how quickly Sandbox Subscriptions expire. 

This post has been closed for comments

2 replies

Forum|alt.badge.img+2
  • Author
  • Helper
  • May 4, 2022

I’m noticing that my customer info is printing out isActive=false but that’s not making much sense… what controls that exactly?


Forum|alt.badge.img+2
  • Author
  • Helper
  • Answer
  • May 4, 2022

It appears that this all may have been caused by my misunderstanding of how quickly Sandbox Subscriptions expire.