Get help with your SDK implementation.
Recently active
Hey,Recently I switched my unlock check from look for entitlements in `active`, to looking in `activeInCurrentEnvironment`, in order to prevent people unlocking Pro in TestFlight and carrying it over to production.This went smoothly for them majority of users, but a couple of users have reported losing access to their Pro status, despite having active subscriptions/production lifetime purchases. I got one user to send through a recording of his error, and the purchase flow went as follows:Launches app, I call `getCustomerInfo` with a policy of `notStaleCachedOrFetched`, I then pass that to a function call `handlePurchaseInfo`, which determines the user does not have any active entitlements. They open the Pestle Pro screen, which determines they are ineligible for a trial. They hit ‘Restore Purchases’, which triggers the RevenueCat restore purchases flow, and I pass the result to the same `handlePurchaseInfo` method from before. In this case, `activeInCurrentEnvironment` is empty, so I
Hey! I’m getting rejections from Apple due to the fact that products are not loaded on the paywall during their review. In the logs I see that revenuecat sdk returns “SKProductsRequest took too long to complete” after a very long timeout. And I’m not successful in reproducing this behaviour locally or with any other test devices. I’m using React Native and what I do in the code is simply call `await Purchases.getOfferings();` and using `7.6.0` version of the library. I don’t have any additional logs or information since SDK only throws this error. Any advice on how to debug or resolve this?
I think a webhook for entitlement changes would be really useful for us.Our particular situation is the following. We are migrating the old subscriptions to RevenueCat entitlements and we use the syncPurchases method which works great and RevenueCat users get the right new entitlements. However, our backend does not get notified about these entitlement changes and doesn’t update our users in the database.Our entitlements can get activated by purchasing one of several subscription products so I believe it’s much cleaner for the backend just to listen to entitlement changes than to listen for subscription changes and have extra logic to map subscriptions to entitlements. My wish is for the backend to only know about entitlements. And the whole mapping of susbcription to entitlements to be done only in RevenueCat.Does this make sense? Am I missing something?
I keep getting this error in my react nativeCannot read property 'setupPurchases' of nulI am running react-native with expo bare workflow and running development build but i keep getting that error. This is my code below in App.tsx useEffect(() => { Purchases.setLogLevel(LOG_LEVEL.VERBOSE); let apiKey = ""; if (isIOS) { apiKey = REVENUECAT_APPLE_API_KEY; } else if (isAndroid) { apiKey = REVENUECAT_ANDROID_API_KEY; } if (!apiKey) { console.error("RevenueCat API key is not set"); return; } Purchases.configure({ apiKey:apiKey }); }, []); I am sure that the api key is being referenced properly and I have also tried upgrading and downgrading the versions of react-native-purchases but i still keep getting this error. Please let me know how to resolve this issue. I have also checked other forums for this issue but still couldn’t find a solution for this. I am currently using "react-native-purchases": "^8.1.0",
ios17.4, revenuecat 5.00, swiftui, sandboxI’m using the generated PaywallView, which works great BTW. The purchase works, but the the callbacks never get called. I put break points in and they aren’t triggered and the logging doesn’t show up.I get the “You’re all set.” from Xcode and the delegate gets called.Is there something I’m missing about how this works? thanks
Hello!For users who are elligible for a subscription introductory offer, we want to display some sort of promotion. The docs show how we can use the subscriptionOptions property to check for free trial or intro offer phases. However, as stated in the SDK reference, subscriptionOptions is null for Amazon builds. How can we check elligibility on Amazon builds? Is there an alternative way? We have customers on FireTV and it would be a shame if we can’t promote our new subscriptions to them.
I’m trying to implment RevenueCat for the first time, but I have this error on npx expo or npx expo run ios.
I keep getting this error in my react native[TypeError: Cannot read property 'setupPurchases' of null]I am running react-native with expo bare workflow and running development build but i keep getting that error. This is my code below in App.tsx useEffect(() => { Purchases.setLogLevel(LOG_LEVEL.VERBOSE); let apiKey = ""; if (isIOS) { apiKey = REVENUECAT_APPLE_API_KEY; } else if (isAndroid) { apiKey = REVENUECAT_ANDROID_API_KEY; } if (!apiKey) { console.error("RevenueCat API key is not set"); return; } Purchases.configure({ apiKey:apiKey }); }, []); I am sure that the api key is being referenced properly and I have also tried upgrading and downgrading the versions of react-native-purchases but i still keep getting this error. Please let me know how to resolve this issue. I have also checked other forums for this issue but still couldn’t find a solution for this. I am currently using "react-native-purchases": "^8.1.0",
I have issue with buying different subscriptions for different users(different user ID’s) with same apple Id.Getting error: 😿‼️ There is already another active subscriber using the same receipt. On dashboard I can see second purchase with first user id.Subscriptions are in different subscription groups.
I have added a `paywallFooter` to my SwiftUI screen and it seems to be working fine.However, I have noticed that the `restoreCompleted` and `restoreFailure` callbacks are not getting triggered. I have observed that the `restoreStarted` callback is getting triggered when the user clicks on the "Restore Purchase" button, but the other callbacks do not seem to be working..paywallFooter( fonts: CustomPaywallFontProvider(fontName: FontFamily.ZenMaruGothic.medium.name), purchaseCompleted: { customerInfo in // Triggers as expected }, restoreStarted: { // Triggers as expected }, restoreCompleted: { _ in // Doesn't work }, restoreFailure: { _ in // Doesn't work } ) I can see that the restore logic is successful based on the console log, but nothing appears on the screen upon completion, resulting in a poor experience for customers.Could you please help me?
Hello,Currently we are trying to obtain purchase receipts (or any required data to do receipt validation) in order to forward the event and keep track of IAPs on Game Analytics (it’s not an anlaytics tool you are seamlessly supporting atm).Is there any way we can obtain this receipts so we can send the IAP events to GA? We are using RevenueCat Unity SDK.Thanks!
Hello,I am trying to add Revenue cat to my IOS flutter app using this package: https://pub.dev/packages/purchases_flutterAfter i make a purchase with sandbox and the screens show done(in picture 2), I got stuck in the payment screen, even i re-enter my credentials and pay again the app keeps showing me tha payment screen over and over (i got stuck in this function: Purchases.purchaseStoreProduct it does not return any CustomerInfo even though I paid and the ios screen shows done.).I checked snadbox in revenue cat dashboard but all of my payment did not get persisted.Can someone help me, and thanks in advace.Here is my code(Picture 1):
In apps that sell consumables items (e.g. gems), from what I understand, it’s necessary to provide a server to track the gem balance for a particular user. I’m not clear on what the requirements are for the origin of that user. Is there a way to avoid creating auth flows in the mobile app and rely upon RevenueCat to coordinate the various anonymous IDs associated with the Apple ID? Can this work between app deletes and re-installs? In summary: Is there a way to track consumables (and the their balances) between app re-installs without needing to implement auth in the client. Thanks!
Hello everyone!Everything works perfectly in Development build, but nothing related to Purchases SDK works during Production build. Here’s a snippet of code which I’ll use as an exampleasync function checkPremium() { try { if (Platform.OS == "android") { Purchases.configure({ apiKey: revenuecat.google }); } else { Purchases.configure({ apiKey: revenuecat.apple }); } const customerInfo = await Purchases.getCustomerInfo(); alert("customerInfo: ", customerInfo); return typeof customerInfo.entitlements.active["premium"] !== "undefined"; } catch (err) { alert(JSON.stringify(err)) return undefined; } }After putting alerts in different places, it turned out I got an error at Purchases.configure part.Note that the apiKey works and is correctly passed as an argument.I tried to alert the error normally without JSON.stringify and it’s empty, same with JSON.stringify. I’m currently testing the production build through the following co
I am supporting a client Flutter project that uses RevenueCat for subscription processing. Earlier this summer, planning ahead for the Google billing library deprecations, we upgraded the RC dependencies. Google itself had been warning that the app needed an update. The current in-store version uses purchases_flutter v6.29.4, and Google Play Store is content that we accomplished the upgrade as required.However, the client keeps getting emails like the below from RevenueCat suggesting that there is a problem. I do not know how RevenueCat is determining what version of the library is being used. Google’s dashboard itself says that the only active users in the last 60 days have been on the latest version of the app, although there ARE supposedly 20 devices out there somewhere that still have an old version installed. (They don’t seem to be active, if the DAU metrics are accurate.) Is there some way, within RevenueCat itself, to see why it’s sending these warnings?Google is deprecating
I'm encountering a crash on Android when trying to display the RevenueCat paywall component in my React Native app. The same component works fine on iOS, but on Android, the app crashes with the following error:java.lang.NoSuchMethodError: No static method AnimatedContent(Ljava/lang/Object;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Alignment;Ljava/lang/String;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedContentKt; or its super classes Steps to Reproduce:Implement the RevenueCat paywall component in the app. import React, { useEffect, useState } from 'react';import { View, ActivityIndicator, Text } from 'react-native';import Purchases from 'react-native-purchases';import RevenueCatUI from 'react-native-purchases-ui';const PayWallScreen = ({ navigation, route, setLoading }) => { const [offerings, setOfferings] = useState(null); const [loading, setLoadingState] = useState(
I'm working on an app that offers different one-time payment products.I’ve got a product (remove_ads) tied to an "entitlement" that removes ads from the app forever. I tested it, and it’s working great with the code:try { final premiumProduct = _products?.firstWhere((element) => element.identifier == 'remove_ads'); if (premiumProduct == null) return false; final customerInfo = await Purchases.purchaseStoreProduct(premiumProduct); if (customerInfo.entitlements.all["remove_ads"]?.isActive ?? false) { _isPremium = true; return true; } else { return false; } } catch (e) { return false; }Now, I need to add new products (coins_100, coins_500, and coins_1000) that aren’t linked to any "entitlement." I just want them to be consumed immediately after purchase using Purchases.purchaseStoreProduct.Future<bool> buyProduct(StoreProduct product) async { try { final customerInfo = await Purchases.purchaseStoreProduct(produ
Hello! My app is made using flutter and purchases_flutter. About a month ago I upgraded purchases_flutter from 5.6.5 to 6.30.2. The software update has been accepted, but a few days ago I received the following message:We found an issue in the following area(s):Version code 26: Policy Declaration - Data Safety Section: Device Or Other IDs Data Type - Device Or Other IDs (some common examples may include Advertising ID, Android ID, IMEI, BSSID, MAC address)I checked my merged manifest file and there is no <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>code inside manifest. I’ve seen this article: Google Play's Data Safety and it talks only about purchase history (financial data). In my existing data security form, I declared that the application does not process any data (I have not seen the above mentioned article before).What to do? Submit a declaration on processing only financial data (Google clearly writes about Device Or Other IDs). Is it possible t
Hey guys I facing this issue trying to use the react-native-purchases-ui, when I tri to build running npx expo run:android I receiving this error. My packages:"expo": "~51.0.28","@expo/config": "~9.0.0","@babel/core": "^7.20.0","react-native": "0.74.5","react-native-purchases": "^8.0.1","react-native-purchases-ui": "^8.0.1",My build config: [ "expo-build-properties", { "ios": { "useFrameworks": "static" }, "android": { "compileSdkVersion": 34, "targetSdkVersion": 34, "buildToolsVersion": "34.0.0", "minSdkVersion": 24, "enableProguardInReleaseBuilds": true, "enableShrinkResourcesInReleaseBuilds": true, "enablePngCrunchInReleaseBuilds": true } } ]FAILURE: Build failed with an exception.* What went wrong:Could not determine the dependencies of task ':app:processDebugResources'.> Could not resolve all dependencies for configuration ':
Hi, I’m using the latest version of RevenueCat SDK on Android 5.7.1. I’ve noticed in debug logs that `AppInBackground` is always `true` even through the app is at foreground.This has caused some issues, such as cache not being updated in time. IIUC if app is in background, the SDK only updates cache once a day instead of the default 5 mins. Also, I realise that offerings are not being cached at app launch. When I start the activity with paywall, there’s always a noticeably delay of 2-3s to fetch the offerings. I’m not sure if this is related to `AppInBackground` always being `true`. Here’s a complete list of debug logs when I open the app```2023-02-14 01:15:11.298 30603-30603 [Purchases] - DEBUG com.yygg.note.app D ℹ️ Debug logging enabled2023-02-14 01:15:11.298 30603-30603 [Purchases] - DEBUG com.yygg.note.app D ℹ️ SDK Version - 5.7.12023-02-14 01:15:11.298 30603-30603 [Purchases] - DEBUG com.yygg.note.app D ℹ️ Pa
Hello,I’m using the latest Revenue Cat SDK (8.4.0) and i’m trying to do the following use case in Sandbox :Subscribe to a monthly subscription Immediately refund it from Revenue Cat dashboard Open the app and see that the premium content is no longer available for the userI’m callingPurchases.sharedInstance.getCustomerInfoWith(fetchPolicy = CacheFetchPolicy.NOT_STALE_CACHED_OR_CURRENT) { customerInfo -> checkStatus(customerInfo) }And always get this Logs : Retrieving customer info with policy: NOT_STALE_CACHED_OR_CURRENTℹ️ Checking if cache is stale AppInBackground trueℹ️ Vending CustomerInfo from cache. Something weird here, is that AppInBackground is always returning TRUE.This means that the cache will not be stale before the 25 hours delay and never within the 5 minutes delays for foreground application. Then the cache is never updatedI’m initializing my Purchases only once in the onCreate of my Application classif (BuildConfig.DEBUG) { Purchases.logLevel = L
Everything is working as expected using internal testing with the apk file. As soon as I upload the aab file as part of the same build, my in app purchases do not trigger on android. I can’t seem to troubleshoot this since it’s working locally and with the apk, but not during closed testing. Has anyone experienced this or have any advice? Thanks.
Hey folks,We have a good amount of users who sign up multiple years in a row with different email addresses and then our purchase history for them shows them incorrect offers because they don’t get linked up in the RevenueCat backend. I don’t know this for sure, but I suspect many people are also removing our app in the interim (which may be part of what makes this trickier)We’re trying to call `syncPurchases` whenever we have a successful login (so they aren’t anonymous IDs). But we still don’t get it right.If I call `restorePurchases` where we’ve called `syncPurchases`, everything works. Of course, the caveat is that the OS-level login prompt sometimes shows up. Is this a RevenueCat bug? My understanding is that `syncPurchases` should basically be a drop in replacement for `restorePurchases` with no prompts. Using React Native and code push, I’ve been able to verify the only thing I need to make my logic work is to switch `syncPurchases` with `restorePurchases`, but I’m reluctant to
Hi,I've encountered an issue while integrating RevenueCat into my Expo project, and I need some guidance to resolve it.Here's what I have done so far:I initially added my products to App Store Connect. Then, I connected my App Store Connect account to RevenueCat using the App Store Connect API. After that, I tried to create new products in RevenueCat, and I was able to list the products directly from App Store Connect. I successfully added them from there. I created my offers and linked them to the products.However, when I run const offerings = await Purchases.getOfferings(); in my Expo project, I encounter the following error: [Error: 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-empty] I am try
I deleted a package identifier in an offering I was setting up. I then tried to add the identifier back in with the same ‘name’ and description and I get the message that the package identifier already exists. However, it is no longer in the list. Does this mean that I cannot delete package identifiers and then re-add them back in if I change my mind on an offering that is not current. What happens if I delete the complete offering? Will all package identifiers I used no longer be available to re-use in a new offer? Thanks
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.