Get help with your SDK implementation.
Recently active
Hello! How can I consume a purchase via sdk on Android? Thank you
I can't get a consumable product in the list of products, although information about subscriptions comes without problems - in Google playThe product is active, but it is not in the resulting list :(
Hello,I tried to search for a similar case - couldn’t find anything.My macOS app got rejected for the following reason, as if Revenue cat doesn’t check for the existence of a purchase receipt.We noticed that your app does not check for the existence of a purchase receipt, which can prevent in-app purchases from being correctly processed. Next StepsWe recommend implementing receipt validation to resolve this issue. At a minimum, the app will need to check for the existence of an App Store receipt and exit at launch with a status of 173 if it does not exist. See Validating Mac App Store Receipts for more information. I assume syncing purchases might solve the problem but the documentation says to use this API only for migration - https://docs.revenuecat.com/docs/migrating-existing-subscriptions. I don’t want to sync it for every install. Actually I’m not even certain it is going to check for the receipt if i call that.Best Regards,Konstantin
Hello guys, I’m currently building a landing page and in my backend I want to render a page that lists my current offering’s packages prices. But I can’t seem to get that data or find an endpoint that returns it.What am I missing? Thanks in advance!
HiI want to implement a Free 3 day Trial period before purchasing.I would like to use “FirstSeen” from purchaserInfo. Documentation means that:“ In the event that the user deletes and reinstalls the app, a new random App User ID will be generated.”But when testing and uninstalling/reinstalling… i always got the same AppUserID and the FirstSeen doesnt change - that would be fine… but the docu says other things. How is it actually? ThanksWalter
Hello we have tried both options but Trail priod is not working doPurchase = async () =>{try {await Purchases.purchaseProduct("gold_299_pf", null, Purchases.PURCHASE_TYPE.SUBS);}catch (error) {console.log(error)return}}=================doPurchase = async () =>{ console.log("testng"); try {const offerings = await Purchases.getOfferings();if (offerings.current.monthly !== null) {const currentOffering = offerings.current.monthly; const { purchaserInfo, productIdentifier } = await Purchases.purchasePackage(currentOffering); if (typeof purchaserInfo.entitlements.active[ENTITLEMENT_ID] !== 'undefined') {console.log("Purchase Success"); }}} catch (e) { if (!e.userCancelled) {Alert.alert('acquisto annullato', e.message); log output========== {"identifier": "$rc_monthly", "offeringIdentifier": "Defult", "packageType": "MONTHLY", "product": {"currency_code": "INR", "description": "Abbonamento Mensile €2,99 con rinnovo automatico", "discounts": null, "identifier": "gold_299_pf", "introPric
I noticed that when a user bought an IAP (no-consumable) on a macOS device, and then switched to a different Apple account, the new account still had access to pro features. I tried restarting the app and clicking the restore purchases button (which called `Purchases.shared.restoreTransactions`) but they didn’t help. I think the cause is Apple doesn’t refresh receipts for apps when a new account is signed in. I’m wondering if that is expected and what is the best practices to deal with that (ex should we just ignore those cases or there is a method to refresh receipt explicitly (and if that’s the case, should we invoke that method on every launch?)).
Configured an iOS app for observer mode to run alongside our existing iOS storekit implementation. After two subscription tests in Sandbox, no data appears in RC. I seem to be missing something, but have followed the docs I find regarding observer mode. I can see through device settings>app store>sandbox that the subscription test is active and my app behaves as such, so I know the sandbox transactions exist. Thanks.
So I'm using the @ionic-native/purchases plugin for setting up in-app subscriptions. The only plugin-related code I have is this.purchases.setDebugLogsEnabled(true); this.purchases.setup(environment.purchasesAPIKey, appUserID);on the app's initializing.And then in another component: this.purchases.getPurchaserInfo().then((purchaserInfo) => { console.log('purchaserInfo:', JSON.stringify(purchaserInfo)); }); this.purchases.getOfferings().then((offerings) => { console.log('offerings:', JSON.stringify(offerings)); }); this.purchases.getProducts(['product1_test']).then((products) => { console.log('products:', JSON.stringify(products)); }); console.log('appUserID:', this.purchases.getAppUserID()); All the methods return empty lists / objects, e.g.:offerings: {"all":{},"current":null} Even though the underlying request that I found in Android Studio's Profiler gives back proper offerings data:{ "current_offering_id": "default", "offerings":
Hi there.Can I edit user's “Aliases"?
Hi there,I’ve been searching for a few days how to implement promoted in-app purchases in my app with RevenueCat. My environment:RevenueCat SDK version is 3.12.2 iOS platform iOS 14 Xcode 12.5.1ResearchI’ve found this question in Github. I’ve also read the SDK reference.QuestionNow, SwiftUI apps launch using a custom struct that conforms to the App protocol, so there is no AppDelegate file anymore. My App struct is something like that:@mainstruct SimoleonApp: App { init() { Purchases.configure(withAPIKey: "KEY") } var body: some Scene { WindowGroup { ContentView() } }}My question is, where do I have to place the following function to support promoted in-app purchases?func purchases(_ purchases: Purchases, shouldPurchasePromoProduct product: SKProduct, defermentBlock makeDeferredPurchase: @escaping RCDeferredPromotionalPurchaseBlock) { makeDeferredPurchase { (transaction, info, error, cancelled) in if let purchaserInfo = info {
Note that developers (you) cannot change a customer's subscription directly. The app stores do not allow developers to upgrade or downgrade a subscription on behalf of a customer. Only a customer can change their subscription.iOSThere are no code changes required to support upgrades, downgrades, and crossgrades for iOS subscriptions in your app. A customer can upgrade, downgrade, or crossgrade between subscriptions as often as they like.According to Apple, when a customer changes their subscription level, access to the new product can vary depending on the new product:Upgrade. A user purchases a subscription that offers a higher level of service than their current subscription. They are immediately upgraded and receive a refund of the prorated amount of their original subscription. If you’d like users to immediately access more content or features, rank the subscription higher to make it an upgrade.Downgrade. A user selects a subscription that offers a lower level of service than thei
Hi!Has anyone a code snipplet for SwiftUI receiving the period of a purchasable Package?My Code:1: @Published var PurchaseablePackages: [Purchases.Package] = []2: ForEach(PurchaseablePackages.indices, id:\.self) { index in makePurchase(ProductID: PurchaseablePackages[index].product.productIdentifier) }, label: { Text("\(PurchaseablePackages[index].product.localizedTitle) for \(PurchaseablePackages[index].localizedPriceString) “) } } How can i add “per month” or “once in a LifeTime”? ThanksWalter
Hey there! I’m gonna to restore user’s purchasesand using this method “Purchases.shared.restoreTransactions { (purchaserInfo, error) in { }” BUT! I’d like check the purchases by Identifier in which indicated in Products, when I address to “purchaserInfo”. How can I implement this?
When I try to fetch PurchaserInfo in flutter application. getting below response. Empty details. No able to find clear documentation or video to understand this. Please help.Details are belowapp type - Flutter - iOS version. Getting this error while running on iOS simulator. Try to run below code in initS method in a screen.Future<void> initPlatformState() async { Purchases.setDebugLogsEnabled(true); await Purchases.setup(<apikey>); PurchaserInfo purchaserInfo; try { await Purchases.getOfferings().then( (value) => print(value.all), ); purchaserInfo = await Purchases.getPurchaserInfo(); print(purchaserInfo.toString()); if (purchaserInfo.entitlements.all['pro'] != null) { appData.isPro = purchaserInfo.entitlements.all['pro'].isActive; } else { appData.isPro = false; } } on PlatformException catch (e) { print(e); } print('#### is user pro? ${appData.isPro}'); } PurchaserInfo{entitlements: Ent
As the title suggests, I am having trouble purchasing a non-renewable product on my app.Here is an overview of my current setup:Flutter app (with products that can be purchased via app store or play store) Web app (with the same products that can be purchased via Stripe) Server (acts as the backend, is used for authenticating users on login)The non-renewable product is specific to each user. In other words, if user A logs on to the app and purchases the product, then any privileges associated with that non-renewable product will be granted to user A. Then, if user A logs out of their account and user B logs on to the app using their own account on the same device, user B should not have access to those privileges. In order to test the scenario mentioned above on my Flutter app, these are the steps I took:Log on to app using account A Purchase non-renewable product Verify that privileges are granted Log out of app Log on to app using account B Purchase non-renewable product Verify that
We’re trying to display the duration of a subscription using Swift and the IOS SDK but the locale isn’t honored and the duration is always return in english, e.g. “1 Year” instead of “1 Jahr” for german with “de” locale. Does anyone have the same issue?We’re trying to access the localized duration like so:package.product.subscriptionPeriod?.durationTitle.localizedLowercaseAny tipps?
A common issue in my app has been that 1: The customer got charged2: The purchase does not reach RevenueCat3: The customer reaches out to support.4: I ask them to restore purchases and everything is synced correctly. I did read the article here: But it doesn’t contain much details on how to detect the error. I also reached out to support about this issue and got a pretty unhelpful response from support (and did not get any comment on my follow up emails).“Restoring transactions is our recommendation here. Unfortunately Apple and Google's in-app purchase process makes this a necessity. Beyond that, we don't have any general recommendations.…... Are users are complaining about not getting an entitlement after purchasing? Maybe an action item here is to show UI recommending the user to restore purchases if no entitlements are detected after a purchase. You can get creative here but outside of restoring purchases there's not much else to do..”Is there a way to detect if the user purchased,
What is best practice for using Revenuecat Public API keys in Xcode? Are they 'public enough' to just use in source files?
Hi, I’m new to RevenueCat and I’m in the process of refactoring a piece of code using the ‘allowSharingAppStoreAccount’ function. The documentation says:allowSharingAppStoreAccountDEPRECATEDConfigure behavior through the RevenueCat dashboard instead. I’ve looked everywhere in the dashboard, but can’t find any setting that would seem to relate to this?Also, I’m unsure exactly what this function does: is it for instance in case someone creates several accounts in the app with, say, different email addresses, but has a single App Store account? Thanks to anyone who takes the time to help!
I’m following the supplied examples and was able to list packages and buy one product. Although the process do not reach the end because of a raised error, but the error is very general, and not clear at all. Also it does not have any error code as it was supposed to according to the docs here (https://docs.revenuecat.com/docs/errors#android-errors).My Code:try { const offerings = await Purchases.getOfferings(); if (offerings.current.lifetime !== null) { const currentOffering = offerings.current.lifetime; const { purchaserInfo, productIdentifier } = await Purchases.purchasePackage(currentOffering); if (typeof purchaserInfo.entitlements.active[ENTITLEMENT_ID] !== 'undefined') { console.log("Purchase Success"); } }} catch (e) { if (!e.userCancelled) { console.log(e); }}Let me be clear that the native android purchase popup is correctly shown int the device (real device, not simulator), and the process is succeed by Google.The error object returned is simply this:[Error: There is a
Hey,I’m using react-native-purchases library and found some issue in Xcode logs. Every time initialise my app is initialised I send identifiers using:useEffect(() => { Purchases.collectDeviceIdentifiers()}, [])RevenueCat is returning error and complaining that IDFV cannot be modified. Am I doing something incorrectly? Below I’m also attaching log. Thank you
Using RevenueCat for Unity, I am receiving json return values from RC in response to GetOfferings, RestorePurchases, etc. They usually come in the form of a PurchaserInfo object. I can’t find any documentation anywhere on the exact details of what is in this object.Specifically the date values look like this:"originalPurchaseDate":1626733276,"latestPurchaseDate":1626733275EDIT: Ohhh, these Ints are just the values shown by the XCode debugger, in C# the object contains dates in DateTime type. I was looking at the raw json data and wondering what those date numbers stood for. Still trying to find in-depth docs for the C# Type PurchaserInfo, what all is in it and how it behaves.What are these integers and how does one make them into a date? Does any documentation exist detailing the return values from RC calls?Thanks!
Background: In my flutter app it is possible for a user to sign out and another user to sign in without restarting the app. To support this feature the app calls Purchases.init whenever a user logs in. If the transition is non-sub to sub this works as expected IE the latter user sees their subscription. But this does not work if transition is sub to non-sub. In this case RC fails to update to non-sub and the non-sub user appears to have a subscription until they restart the app and the sub is gone.Fix: reset all data when Purchase.init is called.
NSInvalidArgumentException *** -[__NSCFConstantString stringByAppendingString:]: nil argument This class of crashes occurs when the Purchases SDK is unable to find certain keys in NSUserDefaults, usually due to clearing NSUserDefaults. The Purchases SDK uses NSUserDefaults to store information. By default, standardUserDefaults are used, but you can configure a different instance of NSUserDefaults. To do this, set the userDefaults parameter in configure:guard let revenueCatUserDefaults = UserDefaults.init(suiteName: "com.myapp.revenuecat") else { fatalError("can't create user defaults for RevenueCat domain")}Purchases.configure(withAPIKey: <your-api-key-here>, appUserID: <the-app-user-ID>, observerMode: <observer-mode>, userDefaults: revenueCatUserDefaults) NSInternalInconsistencyException after clearing NSUserDefaults The Purchases SDK uses NSUserDefaults to store information. By default, standardUserDefaults
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.