Get help with your SDK implementation.
Recently active
I read this doc which seems to suggest it is a requirement:https://www.revenuecat.com/v2.3/docs/macosiOS and macOS (including Catalyst) use different bundle Ids, meaning any purchase on either platform completely separate from each other. To share a subscription across both platforms a consistent user identifier needs to be set in the Purchases SDK.But, I also saw this other Q&A that seemed to indicate that a restore purchases button will allow the user to access their subscription between devices if they are logged in to the same Apple ID. So wanted to clear up for myself - can an iOS app, macOS app, a watchOS app, and an iPad app that only use anonymous IDs but logged into the same Apple ID share a subscription regardless of on what device the purchase was made?
I have a SwiftUI app that has iOS and macOS versions. They share the same code except for the the initial OS specific app view as well as user settings view.All 5 of my in-app purchases are consumables There are no subscription items.The iOS version of my apps works fine and I have been able to successfully make sandbox purchases. It populates the various purchases on the “purchase screen” and everything works as expected.The problem is the Mac app. It will not load and populate any purchases. This has me stumped because the code is the exact same code as used in the iOS version. When I run the iOS version of the app, I see no errors at all in the debug window. But when I run the Mac version, I get the following error every few seconds.2023-07-03 15:10:42.801947-0700 TurboAI[81346:6961607] [Purchases] - ERROR: 🍎‼️ Store products request failed! Error: Error Domain=SKErrorDomain Code=0 "An unknown error occurred" UserInfo={NSLocalizedDescription=An unknown error occurred, NSUnderlyingE
During calling Purchases.logIn(userUid);I very often get an error : PlatformException (PlatformException(10, Error performing request., {code: 10, message: Error performing request., readableErrorCode: NetworkError, readable_error_code: NetworkError, underlyingErrorMessage: thread interrupted}, null)) I do not have any network connection problems and after restarting the app problem is gone. Does anyone face such problem too?
I have an Annual Subscription with one base plan and offer 7 days of free trial. According to migration note, I changed :product.getFreeTrialPeriod()toproduct.getSubscriptionOptions().getFreeTrial()Now the free trial is not shown in my app. Both the base plan & the offer are backward compatible.
Dear all,I am trying to implement promoted IAPs feature by using PurchasesDelegate. I have the latest iOS SDK installed. Whenever I use the test link as described here: https://developer.apple.com/documentation/storekit/in-app_purchase/testing_promoted_in-app_purchases, nothing happens in the delegate method, and all I receive from the console is this:[Daemon] [SKPaymentQueue]: Tried to send purchase intent: pretty.ios.avatarai.monthly to delegate, delegate does not respond to method paymentQueue:shouldAddStorePayment:forProductDelegate method being used is:func purchases(_ purchases: Purchases, readyForPromotedProduct product: StoreProduct, purchase startPurchase: @escaping StartPurchaseBlock) { startPurchase { (transaction, info, cancelled, error) in } }Can anyone give me a hint what I am doing wrong? Implementation with previous versions of SDK were working, with old delegate methods.Aleksandar
Yesterday I have published my first app on the Appstore and all my clients faced the same problem. When they made a subscription for trial or even purchase - the operation ended up with success. They received the receipt from Apple about it or money were taken from their account (in case of in-app purchase) but then they fall into this error: "Purchase succeeded but program is not active". From my code this means that entitlement is not active. here is the code: Purchases.shared.purchase(package: package) { (transaction, customerInfo, error, userCancelled) in if let error = error { completion(.failure(error)) print("error - failed to complete the purchase") } else { if customerInfo?.entitlements[program]?.isActive == true { completion(.success(true)) } else { print ("Purchase succeeded but program is not active") let error = NSError(domain: "com.ex
Offerings offerings = await Purchases.getOfferings(); Offering? offering = offerings.current;List<StoreProduct> prds = await Purchases.getProducts(['identifier']);print("products " + jsonEncode(prds));print("packages " + jsonEncode(offering?.availablePackages));have added benefits to the subscription in play store dev console in the flutter app when fetching packages or products like above, i am missing description and benefits is there a different SDK API that i need to look into ?
Hey, I have a problem with auto-renewable subscriptions. When I click on purchase it trigger the Apple bottom sheet with subscribe, then when I click on subscribe it says successfully purchased but it doesn’t complete the transactions. Debug shows me this → [Purchases] - INFO: 💰 Finishing transaction 'number' for product 'identifier'. I test it in simulator with store kit configuration
Getting the error: There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect. Everything works in android, not iOS. It says starting store products request for: ["product10"] Let product Id = product10 for both google and apple.In revenue cat, under offerings I have:identifier (groupId) → offering id → group:product10 (for google) / product10 (for apple)[confusing here: Why is there no : for apple? is it suppose to match with groups in App Store? ] In Apple Store, under subscriptions. I have group name (group), under subscriptions productId I have “product10”. But revenue cat keeps saying no product10.
Hello, I get the following error : How to solve ? Nota: my Android app is in Open Testing (available on the store) ; tell me if it might be an issue.
hello, I am currently developing with flutter. All the steps below have been completed and the APK has been uploaded to the Google Play Store and tested in closed testing https://www.revenuecat.com/docs/creating-play-service-credentials#1-link-to-a-google-developer-project The payment screen does not appear and an error occurs. ```e.details: {code: 4, message: One or more of the arguments provided are invalid., readableErrorCode: PurchaseInvalidError, readable_error_code: PurchaseInvalidError, underlyingErrorMessage: There is no current Activity}```I've deleted all Google Play Store accounts on my device and added a recreated one to test, but it still doesn't work.However, the acquisition of the package has been confirmed.I need help. > purchases_flutter: 4.10.2
I am currently trying to handle purchases using RevenueCat. Everything seems to work fine, except my completion handler does not execute properly. I am currently running iOS16 -- the last of my logs look like this: 2023-07-07 21:46:29.274573-0400 main[1521:253544] [purchases] INFO: 💰 Finishing transaction 'x' for product 'x'2023-07-07 21:46:29.274658-0400 main[1521:254084] [network] DEBUG: ℹ️ Serial request done: POST receipts, 0 requests left in the queue2023-07-07 21:46:59.258445-0400 main[1521:254760] [tcp] tcp_output [C6.1.1.1:3] flags=[R.] seq=4201476122, ack=584019737, win=2047 state=CLOSED rcv_nxt=584019737, snd_una=4201476045As you can see, the transaction does not completely finish and thus I cannot properly set the user’s state to subscriptionActive = true. The purchase however, will successfully show up on my dashboard. Does anyone know a way around this? I’ve tried the documentation and have updated my code to try and use StoreKit1, which it looks like RC does by default
Hi there,I’m running into a problem where purchases do succeed, but the Purchases.shared.purchase(...) completion block is never called.I do see INFO: 💰 Finishing transaction in the logs, but the completion block itself is never called.Purchases.shared.purchase(package: package) { (transaction, customerInfo, error, userCancelled) in // Never called}I’m trying with a sandbox account on a real device. The same code seems to work for one of my other apps. I’m using purchases-ios 4.17.9. If after a purchase I do a restore purchase action, the entitlement is there for this customer. This confirms that the purchase does succeed.Any idea why this is happening?
Does the RevenueCat SDK cache products between app starts? I can’t find anything in the documentation about this. Use case: user opens app while device is offline and hits a paywall. While they won’t be able to proceed with the purchase, it would still be great to display prices.
Hi, RevenueCat skd is not able to fetch the offers packages, I already check the id and there are the same ( I imported from appStore connect)I ran the app in a device and the simulator, I’m able to fetch the customer info but not the offers.In the logs I can see the offers name but RevenueCat is no able to bring them.See Xcode Logs with the name of the offers:2023-06-07 17:43:31.500572-0500 RevenueCatSharpen[24587:4211535] [Purchases] - DEBUG: ℹ️ No existing products cached, starting store products request for: ["year_subscription", "sharpen_threeM_5M_0"]RevenueCatSharpen[24507:4202388] [Purchases] - DEBUG: ℹ️ Found an existing request for products: ["sharpen_threeM_5M_0", "year_subscription"], appending to completion See the offers name and Ids in Revenue Cat This is the full Log Network operation 'GetOfferingsOperation' found with the same cache key 'GetOfferingsOpe...'. Skipping request.2023-06-07 17:43:30.642469-0500 RevenueCatSharpen[24587:4211535] [Purchases] - DEBUG: ℹ️ API
I made Android and ios app with RevenueCat In app purchase working fine. So i need to upload app store and play store so i have few question Question 1: How can change sendbox key to real key? becuase when i download app from testflight they are showing purchase is on testing mode. Question 2: How can test app store user the app because i added in app purchases on login screenReact Native Framwork
I am using android kotlin sdk for fetching the offerings (google play, IAP products). But the fetching of offering is very slow (~15s). In my application users can see the list of products as soon as they open the app. So showing a loading screen for 10-15 seconds until i can show products is giving a bad user experience. I tested the public revenuecat apis separately and they are pretty fast (<0.3s).I am using `Purchases.sharedInstance.getOfferingsWith` as instructed in the docs.I am initializing the SDK at application start.From logs i can see a 10s delay “Updating pending purchase queue” and “starting http requests”Logs:21:55:08.744 D/[Purchases]: ℹ️ Debug logging enabled21:55:08.745 D/[Purchases]: ℹ️ SDK Version - 5.0.0-rc221:55:08.745 D/[Purchases]: 👤 Initial App User ID - null21:55:08.745 D/[Purchases]: 👤 Identifying App User ID: $RCAnonymousID:QQQQQQ21:55:08.745 D/[Purchases]: ℹ️ Deleting old synced subscriber attributes that don't belong to $RCAnonymousID:QQQQQQ21:55:
I am getting the following error with the code below: ‘java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.revenuecat.purchases.EntitlementInfo.isActive()' on a null object reference’ Purchases.getSharedInstance().getCustomerInfo(new ReceiveCustomerInfoCallback() { @Override public void onReceived(@NonNull CustomerInfo customerInfo) { Log.i("RevenueCat", String.valueOf(customerInfo.getEntitlements())); Log.i("RevenueCat", String.valueOf(customerInfo.getEntitlements().getAll())); if (customerInfo.getEntitlements().get(premiumEntitlementID).isActive()) { sharedPreferences.edit().putBoolean("premium", true).apply(); } else { sharedPreferences.edit().putBoolean("premium", false).apply(); } } @Override public void onError(@NonNull PurchasesError purchasesError) { Log.i("
Hi, I have been developing an app for iOS, and I can get the free trial as intro price in getOfferings response of the SDK. Now, I have upgraded to SDK 6 and trying to do the same on Android. The free trials are there in intro price, but they are returning wrong numbers. There are free trials as subscription options which have right number of days. Is this a bug or expected? Thank you in advance!
We are using visitorId from Fingerprint to identify the user. and it is used as the only user account on our system.Purchase setupPurchases.configure({ apiKey: REVENUECAT_API_KEY, appUserID: visitorId, //We are using Fingerprint to identify the user. observerMode: false, useAmazon: false, usesStoreKit2IfAvailable: true, });User A using device1 with identifier visitorID1 and AppleID1 makes the paymentIn case of used User A using device 2 with identifier visitorID2 and AppleID1 can restore the purchase. On the backend we can swap subscriptions between visitorID1 and visitorID2
I’m adding iOS Introductory Offers, and I would like to test before going live. However, when following the guide in the docs, the `discounts` field on the product is an empty array. How do I test this introductory offer before going live? Example of the code I’m using for reference:const purchaseDiscountedIOSPackage = async (purchasePackage) => { const product = purchasePackage.product; const discount = product.discounts?.[0]; // product.discounts is empty if (!discount) { throw new Error('No discount found on producct'); } const paymentDiscount = await Purchases.getPromotionalOffer(product, discount); if (!paymentDiscount) { throw new Error('No payment discount'); } try { const purchaseMade = await Purchases.purchaseDiscountedPackage(pkg, paymentDiscount); return purchaseMade.customerInfo; } catch (e) { if (!e.userCancelled) { throw e; } else { throw new Error('ignore'); } }};const purchase = async () => { const offering = (await Purch
Hi,I ran into an issue while implementing subscription for Android. I am trying to allow user to upgrade one a Basic plan ($10) to Pro plan ($40). Here, both Basic and pro plan is a monthly plan.I bought Basic plan, then I wanna upgrade it to Pro plan, but it returns me “Couldn't find existing purchase for SKU”.In my understanding, the product id (entitlement) is the SKU. Please correct me if am wrong. Any help would be greatly appreciated.
Thank you for creating a crazy useful package.I use this android library com.revenuecat.purchases:purchases:6.4.0.Unexpected crash in some users.The error log is here.Fatal Exception: org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject at org.json.JSON.typeMismatch(JSON.java:112) at org.json.JSONObject.<init>(JSONObject.java:172) at org.json.JSONObject.<init>(JSONObject.java:185) at com.revenuecat.purchases.common.diagnostics.DiagnosticsFileHelper.readDiagnosticsFile(DiagnosticsFileHelper.kt:39) at com.revenuecat.purchases.common.diagnostics.DiagnosticsSynchronizer.getEventsToSync(DiagnosticsSynchronizer.kt:86) at com.revenuecat.purchases.common.diagnostics.DiagnosticsSynchronizer.access$getEventsToSync(DiagnosticsSynchronizer.kt:19) at com.revenuecat.purchases.common.diagnostics.DiagnosticsSynchronizer$syncDiagnosticsFileIfNeeded$1.invoke(DiagnosticsSynchronizer.kt:44) at com.revenuecat.p
There is a delay of about 5 seconds from function call and popup displayed on ios. Is there solution for this?
Hi guys, We’re having issues with the purchase callback never being called for some users. This post came closest to the same issue, but didn’t have a clear answer to how to resolve or what the cause could be.The annoying this is that I can’t reproduce the issue. What happens for certain users, is that they hit our “Subscribe” button, and the loading icon that’s shown gets stuck because the callback never returns. This issue has to have to do with the call to func purchase(package: Package, completion: @escaping PurchaseCompletedBlock) , since in all other cases the loading icon would disappear. Relevant CodePurchasesManagerPurchasesManager is a wrapper Singleton class for called RevenueCat’s Purchases./// Purchase the given package and call completion upon resultfunc purchase(package: Package, completion: @escaping (StoreTransaction?, CustomerInfo?, PublicError?, Bool, Bool) -> Void) { if (configured) { Purchases.shared.purchase(package: package) { (transaction, customerI
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.