Skip to main content
Solved

iOS App - Issues getting subscription state


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. 

View original
Did this post help you find an answer to your question?
This post has been closed for comments

2 replies

Forum|alt.badge.img+2
  • Author
  • Helper
  • 2 replies
  • 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
  • 2 replies
  • Answer
  • May 4, 2022

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


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