Get help with your SDK implementation.
Recently active
New iOS and RevenueCat developer here, and I’m converting a paid app to subscription. I’ve read this article, and gone through the PurchasesHelper code. To help me understand better, and so it’s easier for me to maintain later on, I prefer not to simply copy and paste code. So I’ve done my best to write this my self. Since it’s difficult to test properly in a sandbox environment (or is beyond my technical know-how) and the importance of getting this right on the first try, I was wondering if someone can take a look at my code below and let me know if this will work in production: In my app struct, I have: @mainstruct MyApp: App { init() { Purchases.logLevel = .error Purchases.configure( with: Configuration.Builder(withAPIKey: AppConstants.apiKey) .with(storeKitVersion: .storeKit2) .build() ) Purchases.shared.delegate = PurchasesDelegateHandler.shared } var body: some Scene { WindowGroup { Co
When using `presentPaywall` with React Native there seems to be no way to pass in error handlers or any other listeners. Is there a way around it?
Why on Ios I can see in_app_purchase event, but can’t see it from Android? I use flutter, and Superwall for ios (because it doesn’t work for Flutter on android). But I use RevenueCat as a main thing, superwall just in sync after RC
Hello, I have installed the necessary play store and google cloud console for my android mobile application. I did it according to revenuecat documentation and videos here.I published my application in closed test and enabled license test. Test users can subscribe successfully. (I can see this in the sandbox data section)After seeing that it was successful in closed test, I opened it to all users in the production phase and uploaded a new apk.As a result of the review, Google rejected it. They said the problem was that the subscription could not be made. The subscription options were listed successfully, but when they wanted to make the payment, the following error message appeared:The item that you were attempting to purchase could not be found.
I’m playing with a sandbox account and trying to disable premium features when the entitlement is no longer present. I have tried using the following code:Purchases.shared.getCustomerInfo { customerInfo, error in self.isActive = customerInfo?.entitlements["premium"]?.isActive == true}Setting a @State-var named isActive. It does get set to true when I make a test purchase, but when I cancel the subscription I never get false. If I kill my app and relaunch it I get an updated value saying false. How do I detect that a subscription/entitlement has expired between app launches? It seems everything is cached until I kill the app and then launch it again. I want the status to be updated at least every time the app enters the foreground. Any best practice for this?
Hi! In my flutter app, the Google Play team found an error in the subscription screen. I use a code like below to show the price: Text( widget.package.storeProduct.introductoryPrice ?.priceString ?? widget.package.storeProduct.priceString, style: TextStyle( fontSize: 18, fontWeight: FontWeight.bold, color: Colors.black, ), overflow: TextOverflow .ellipsis, // Handle overflow with ellipsis),The PLN is okay, but the Google Team from India has INR, and it shows 0. I don’t know why or how to fix or even test it. As you can see the price for the month is ok. I use here code: TextSpan( text: widget.package.storeProduct .currencyCode ?? '', ), TextSpan( text: " " + (widget.package.storeProduct.price / 12) .toStringAsFixed(2), ), TextSpan( text: "/" + context.tr("month"), ),],
I created 3 products (Monthly subscription) for Revenuecat Billing app as below: And I created 1 offering including 3 packages corresponding to the 3 products above, just like:Then I developed a subscription page based on RevenueCat Billing's web SDK. I first subscribed to the Basic plan, and after the subscription was activated, I subscribed to the Premium plan with the same account. At this point, both subscriptions became active, and the Basic plan did not automatically cancel as expected.So how can I achieve subscription switching so that only one subscription is active at a time?
Hi, I’m using the PaywallView in my app after the user creates 5 records. When the user tries to add a record greater than 5, the Paywall displays.However I don’t know how to update my logic if the user successfully purchases a subscription. The Pay wall dismisses after “you’re all set” displays. Is there a callback I can use to update the local state of the subscription? Does .sheet(isPresented:_) have an onEnded or the like where I can call Purchases.shared.customerInfo() ?I can check the in a task when the view loads… but not sure how to update the state during/after the purchase
Hello, I followed step on docs however, I can not get offering and error says: There is an issue with your configuration. Check the underlying error for more details. There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used). More information: https://rev.cat/why-are-offerings-emptyI saw there are many other developers have same issue but no solution. This was the my first time to use revenue cat but I think I will implement my own way because of this issue. Thanks,
Hi all, I have implemented RevenueCat with my expo / react native project however I am running into a reoccurring issue where ‘customerInfo’ is not returning from my Purchases call. I am testing in sandbox and only on IOS (using my iphone on a dev server through expo). Maybe 1 in 20 attempts ‘customerInfo’ is returned from my purchase function. Otherwise the purchase function runs, makes the purchase (I receive all of the typical IOS messages regarding the purchase being successful and can see it listed in my sandbox account on the phone) but the customerInfo object is never returned, and the rest of my code just hangs. I have tested the purchases by removing the async call - obviously not ideal allowing access to the user before the purchase is made, but for testing everything works. The purchase is made and the user is logged in.. so I am not sure why I am not receiving the customerInfo object. Hoping for some assistance or an idea if I am handling the config or purchase incorrectl
Hello, I am currently building my app using Kotlin Multiplatform, and users can select multiple themes within the app. However, the Paywall template I am using seems to default to the system theme.I was wondering if there is a way to programmatically set the theme of the Paywall template. I couldn’t find a way to pass theme information in the Paywall builder. I can create a custom Paywall, but I am not looking to implement that soon as it would be a bit more efforts.Thank you!
Hi, I’m currently integrating RevenueCat into my Android app and encountered some unexpected behavior when handling subscription cancellations. After clicking “Unsubscribe” in the Play Store and then opening my app: • The activeEntitlement.unsubscribeDetectedAt property is returning null.• The activeEntitlement.willRenew property is returning true. I was expecting unsubscribeDetectedAt to indicate when the unsubscription was detected and willRenew to be false since the user unsubscribed. Could you help me understand how these properties are expected to behave in this scenario? Specifically: 1. When should I expect unsubscribeDetectedAt to be populated?2. Why does willRenew remain true even after the user unsubscribes?3. Is there a recommended way to detect unsubscriptions promptly? Any clarification would be greatly appreciated. Thank you!
I know there was a question related to this same issue but I do no see any resolution to it:User pauses subscription - we receive SUBSCRIPTION_PAUSE (OK) End of billing cycle subscription enters paused state on Google Play - we should receive EXPIRATION with reason SUBSCRIPTION_PAUSE as per docs https://www.revenuecat.com/docs/integrations/webhooks/event-types-and-fields#cancellation-and-expiration-reasons but NO event is ever received. (NOT OK) When pause period ends we receive RENEW event (OK)This has been tested on sandbox where the subcription renewals and pause time periods are considerably smaller (for pause we’ve tried 5 minutes, 10 minutes and 15 minutes but no EXPIRATION event)
I am using RevenueCat to manage my Google Play Subscription billing on my Android app. I am NOT using Amazon to make my purchases at all. However, when I start the app, I get logs that points to Amazon purchases:Rejecting re-init on previously-failed class java.lang.Class<com.revenuecat.purchases.amazon.listener.ProductDataResponseListener>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/amazon/device/iap/PurchasingListener; Caused by: java.lang.ClassNotFoundException: Didn't find class "com.amazon.device.iap.PurchasingListener" on path My confusion here is that I am not using any Amazon-related purchases. In my gradle file, I just have the purchases library and that’s it. When I set the store on RevenueCat configure, I set it to Google Play Store. implementation("com.revenuecat.purchases:purchases:7.0.0")
HiI’m using latest Revenucat iOS SDK v5.7.1 & presenting full PaywallViewController screen using below codelet controller = PaywallViewController(displayCloseButton: true)controller.delegate = selfcontroller.modalPresentationStyle = .fullScreenself.present(controller, animated: true, completion: nil)On implementing above code, Paywall screen shows NavigationBar with white background color, also it shows close (X) button in black color on top right corner on white background navigation bar.Question is1. How can I change white navigation bar color to clearColor &2. How can I change close(x) button color to white color ?
I have one subscription group with four subscriptions Premium YearlyPremium MonthlyBasic YearlyBasic Monthly First when i buy a subscription ( For example: Basic Monthly) then i upgrade to another subscription (Premium Monthly), the webhook sends the event for the product change and renewal. In the webhook, i hit the developer api v2 to check the active entitlements for the user and i get Basic Monthly and Premium Monthly both as active subscriptions. The api only returns one correct entitlement after some delay .The way we have the webhook setup is that we fetch the active entitlements from the revenue cat itself and we sync the data with our own database according to how the docs recommended it but this two entitlements keeps causing issues when we are trying to sync the data. This issue only happens on iOS. Is this a known bug with revenue cat or how can we solve this?
So, this is the workflow for me - on app start I initialise Purchase sdk with anonymous user:Purchases.configure(configuration);Upon successful login, I login - Purchases.logIn(credentials.user.sub);The question is (and I couldn't find it in the docs) - on app restart, will subsequentPurchases.configure(configuration);overwrite legit user back to anonymous ?User session is long lived, so there will be no login flow on app restart, and I'm wondering will .configure(configuration) respect existing user id (considering logout wasn't called)?
I am a little lost here and could use some pointers/help. I have a Flutter application which has Ads in it. I have no concept of a “user” in my app. I would like to add the ability to remove Ads. I created all the required store setup for both Google and Android. I’ve added a button in my app to purchase the product I setup (I have only the one product) to remove Ads. This all works as expected on both Android and iOS. I need to implement the “restore” capability in my app per the Apple App Store requirements. I have questions as I can’t seem to figure out exactly how to do this.Since I use anonymous accounts wouldn’t the user, upon removal of the app and reinstallation get a new anonymous ID? If so, how does the system know they already purchased my product? How is this done typically, should I show both a Purchase and a Restore option in the app? Seems like there should be a way to ‘detect’ that the user already made a purchase and if so provide the ‘restore’ option...and if
I would like to set a custom attribute with a string I get from UserDefaults().This will NOT set the custom attribute:let cam = UserDefaults.standard.string(forKey: "cam")!Purchases.shared.attribution.setAttributes(["cam": cam])This will set the custom attribute:Purchases.shared.attribution.setAttributes(["cam": "abc"])let cam = "abc"Purchases.shared.attribution.setAttributes(["cam": cam])let cam = UserDefaults.standard.string(forKey: "cam")!Purchases.shared.attribution.setAttributes(["cam": "abc"])Purchases.shared.attribution.setAttributes(["cam": cam])UserDefaults combined with setting the attribute through a variable will not work, except if the attribute is previously set using a literal string (last example).What do I miss here?Is it a bug?Is it Swift or RC related?
Hello,I’m setting up a subscription with 7 days free trial & 1 year period on Android & iOS, using Flutter SDK. I want to show on the UI wether the subscription is:not subscribed in trial (& active) active cancelled (& active) expiredAll states work except cancelled (when the subscription is still active but won’t renew). Upon my app startup, I call this code: Purchases.invalidateCustomerInfoCache(); _customerInfo = await Purchases.getCustomerInfo(); Even though RC’s debug logs print “😻 CustomerInfo updated from network.”, I still get cached entitlements whose “willRenew” field is always true.I added an overflow menu action to execute this code whenever I want to see if calling it multiple times works (as I read here & there on the forum), it doesn’t.The only way to get an up to date information is to call Purchases.restorePurchases(), but this shall only be called upon user request.Is there a way to get up to date CustomerInfo upon app startup?
I downloaded the subscription key for an in-app purchase from Apple into a file named 'SubscriptionKey_5S5U32JN84.p8' However, when I try to upload this file I get this error: “Invalid file name, it should be SubscriptionKey_XXXXXXXXXX.p8. A file name with any other prefix could be a private key for a different Apple service. Please validate you are uploading a Subscription Key.“ I also tried renaming the file to ‘SubscriptionKey_XXXXXXXXXX.p8’ but got the same error. What am I missing?
Hello, my user flow is like this:- user purchases subscription (not logging in with Purchases.logIn() )→ Revenuecat generates an anonymous id → INITIAL_PURCHASE event is triggered- after purchase: the user logs in with Firebase auth (logging in with Purchases.logIn() after account creation) → No event triggerI’m grating users credits on INITIAL_PURCHASE. My issue is now that there is no event triggered when logging in with custom app user id. I don’t have any reference to between the anonymous id and custom user id. Is there any way to get aliases with the custom user id as a query from the backend, or am I missing something?
As part of this guide, when I try to upload the p8 file I see this error: "Invalid file name, it should be SubscriptionKey_XXXXXXXXXX.p8. A file name with any other prefix could be a private key for a different Apple service. Please validate you are uploading a Subscription Key." The file I downloaded from App Store Connect is called “AuthKey_XXXXXXX.p8”. Am I supposed to manually rename it or have I downloaded the wrong file?
So. My app is almost ready to be submitted. Everything is working as expected and I'm busy doing screenshots and stuff. But there is one question I can't find an answer to - how subscriptions are being tested when reviewed? From what I see testing from TestFlight is unreliable and is a weird mix of sandbox and prod - I never made it work (and documentation says it's completely fine as long as things work in sandbox, which they do perfectly).Now, I use auth0's passwordless authentication with one-time passwords, so I can't "prepare" a specifc user with valid subscriptions upfront for the reviewers, they will be using their temporary emails.Will they be able to test subscriptions? How that works? I also can just disable subscription checking via my backend, so it will work on reviewers side anyway, but wouldn't it be considered as a some sort of tampering with the reviewing process?
We have a Flutter web app (not mobile). Our payment provider is Stripe. Does the RevenueCat SDK support Flutter web?
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.