StoreKit

RSS for tag

Support in-app purchases and interactions with the App Store using StoreKit.

StoreKit Documentation

Post

Replies

Boosts

Views

Activity

There is a condition where receipts cannot be retrieved for test flight delivery.
Enviloment : TestFlight AppleAccount : sandbox The problem that is happening : Unable to get receipt with storeKit.requestReceipt Prerequisite : The form to input ID and password is displayed even if the user is already logged in to AppleAccount (not displayed when normal). The same operation is not reproduced by using the sandbox during debug builds. - (void)requestReceiptWithBlocks:(ReceiptCallback)callback { self.receiptCallback = callback; SKReceiptRefreshRequest *receiptRequest = [[SKReceiptRefreshRequest alloc] init]; receiptRequest.delegate = self; /** When start() is executed, iOS displays the "Sign in to iTunes Store" dialog if you are not yet logged in to the iTunes Store */ [receiptRequest start]; } storeKit.requestReceipt { success, receipt in guard success, receipt != nil else { if success { // receipt nil } else { // requestReceipt failed } } } Does anyone know why the receipt would be in a state where it cannot be retrieved? Thank you.
0
0
311
Jan ’24
How to receive usage-based payment on the app
Hi everyone, we are trying to incorporate a usage-based payment system in our app, quite similar to how AWS charges users. It would ideally be a monthly recurring payment, but the amount charged would vary by user and by month. Looks like we can't do this through in-app payments, so what is the best way to do this? If we incorporate an external payment method like Stripe, would that be an issue during the app review process? We just can't seem to find a way to execute this through in-app purchase, and must go with another method. We would really appreciate an advice or past experience!
0
0
286
Jan ’24
In-App Purchase:No Token Available When Expected.What is this token?
ERROR: 💰 Product purchase for '***' failed with error: Error Domain=RevenueCat.ErrorCode Code=2 "There was a problem with the App Store." UserInfo={source_file=RevenueCat/SKError+Extensions.swift:64, NSUnderlyingError=0x600000c91890 {Error Domain=SKErrorDomain Code=0 "An unknown error occurred" UserInfo={NSLocalizedDescription=An unknown error occurred, NSUnderlyingError=0x600000c68570 {Error Domain=ASDServerErrorDomain Code=1003 "No Token Available When Expected." UserInfo={NSLocalizedFailureReason=No Token Available When Expected.}}}}, readable_error_code=STORE_PROBLEM, NSLocalizedDescription=There was a problem with the App Store., source_function=asPurchasesError} And, I have also tested with SwiftyStoreKit and encountered the same issue.
5
0
848
Jan ’24
In_app_purchase Flutter Package: Purchased Stream not firing after successful purchase on iOS
Description: I am facing an issue with the in_app_purchase Flutter package, which is the official package for handling in-app purchases. After successfully making a purchase on iOS, the 'Purchased' stream is not firing as expected. Steps to Reproduce: Request a purchase by buying a consumable or non-consumable product. Enter necessary credentials if required (e.g., email, password). Click on Sign In. Expected Results: The 'Purchased' stream should fire after a successful purchase on iOS. Actual Result: The 'Purchased' stream is not firing after a successful purchase on iOS. Bottom sheet to purchase the product is popping up again after the purchase is complete. Environment: Flutter version: 3.16.8 on channel stable Package version: in_app_purchase 3.1.11 Operating System: iOS 17.2
0
0
333
Feb ’24
Implementing Premium Services for Users Upgraded via Website in iOS App
Hello, I am seeking advice on integrating a feature in our iOS app related to user subscriptions and account upgrades. Our current setup allows users to upgrade their subscription to a premium account level exclusively through our website. The app, as it stands, does not support in-app account upgrades. However, we aim to offer advanced services within the app to users who have upgraded their accounts through the website. I'm interested in understanding the guidelines and best practices to follow for this scenario to ensure compliance with App Store policies. Any insights, experiences, or suggestions from the community would be greatly appreciated. Thank you!
0
0
356
Feb ’24
Sandbox Testing Problems (StoreKit works fine)
I have a problem with submitting my app to the AppStore. I have an app in the AppStore with currently OneTime Purchase. Now I want to add an InApp purchase to this app. I have tested the app with a local StoreKit file (with synchronised AppStore In App Products) and everything works fine. But when I submitted this file to the store, it was not accepted. So I found out that I need to remove the local StoreKit file so that it uses the real AppStore data. But my problem is, once I remove the StoreKit file, my purchase process gets stuck in the transaction process. So when I click on the in-app purchase button, I get the payment overlay and everything about the in-app purchase is displayed there. Name, price, details. Also a sandbox title says I am not in production. As soon as I click on the "Buy" button, I have to log in with my sandbox user account that I have previously created in AppStore connect and also verify the email address by clicking on the link in the e-mail. Then the confirmation tone sounds, but after 4-5 seconds the overlay appears again (and again and again). The transaction remains in "in progress" status. My question now, since everything worked fine with StoreKit? What could be the problem. I need to submit a new appVersion (which I am working on) with my first new in-app purchase. Could it be that the payment process is not working because the IAP is still in "under review" or "submitted for review"? Where could be a difference that StoreKit IAP works just fine, but sandbox does not work. Thanks in advance for your help.
2
0
670
Feb ’24
Reward Distribution to users
Hello, I am looking forward to a really quick help. Thank you for taking time. I have an app where I give my users monetary rewards based on the game of skills. I have integrated in-app purchases for users when they want to add an amount to my app to play this game of skill. Now after the results, I would like to send them their monetary rewards to their Apple wallet based on the performance and rules. Is there any way to pass these rewards to users' Apple wallets through in-app purchases?
0
0
243
Feb ’24
Calendar Month Pricing / Periodic Month Pricing
Hello, After processing the data I received from another source in my new application, I will offer it for sale as a monthly subscription. However, pricing for my data source is based on calendar month, but subscription flows start from the purchase date and I could not find such a subscription flow in the store kit. How can I draw this flow in a way that doesn't violate app store rules regarding pricing?
0
0
324
Feb ’24
Issues with preserved pricing
After scheduling price changes for November 23 and selecting to "Preserve current price for existing subscribers", we are seeing around 31% "renewals" coming through at the new price on later app versions following the price change. Has anyone else experienced this? Could this be something to do with a payment being marked as a renewal in the summary sales report but not actually being a renewal (and perhaps a reactivation instead?) Thanks
0
0
308
Feb ’24
'availableInAllTerritories' is not an attribute on the resource 'inAppPurchases'
I'm using the API to update and create in-app purchases. Up until now, the https://api.appstoreconnect.apple.com/v2/inAppPurchases endpoint would allow me to set the availableInAllTerritories attribute to true, but as of this week the API is returning this error: ENTITY_ERROR.ATTRIBUTE.UNKNOWN - 'availableInAllTerritories' is not an attribute on the resource 'inAppPurchases' It appears availableInAllTerritories has been removed from the class definition, but not the sample code. The 3.2 release notes state that the enum "is no longer available for pricing related endpoints", but this isn't a pricing endpoint. Anyone else having this issue? I guess the only workaround would be to send a separate request to the inAppPurchaseAvailabilities endpoint.
1
2
897
Feb ’24
Receipt Verification 21004 code for Consumable Item on Production
Hello, One of our customer's purchases of IAP consumable product have issue on its receipt verification. Verification via "https://buy.itunes.apple.com/verifyReceipt" returns {"environment": "Production", "status": 21004}. He purchased 3 consumable items and only verification of 3rd purchase successfully got verified. All of other purchases in our app before and after had no problem with same secret, same server. I once heard 21004 is for auto renewable subscription, not for consumable. Can it be returned for consumable purchase? Is there any other known issue for receipt verification? We have no change of code, server, secret at that time and all other verification succeeded but two failed. Thanks in advance. Regards,
2
0
768
Feb ’24
How do you request a review in a volumetric app?
I have a volumetric app. I am trying to present a review prompt using SKStoreReviewController's requestReview(in:) I'm using the code below: if let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene { SKStoreReviewController.requestReview(in: scene) } When this code executes, though, I get a crash with the error: Presentations are not permitted within volumetric window scenes. What is the proper way to do this for a volumetric app?
1
2
387
Feb ’24
Error Code 21107 - There's no information available for In-App Purchases. Try again later.
Hello, Over the past couple weeks we have been getting increased reports from our users who are unable to purchase IAPs within our app. Every time they go to make a purchase they are getting the 21107 error code. I haven't been able to find any concrete information about why users might be getting this error. The only thing that I have been able to find in the Apple documentation is: Status codes 21100-21199 are various internal data access errors. I did see some threads with this error code for people in sandbox accounts, but note that these are live users in our production environment. This is not internal testing. Users load the app, attempt to make an IAP purchase and they immediately get this OS error popup on the client and the purchase fails. We are using the Unity IAP package 4.10.0 If anyone has any information or suggestions it would be much appreciated.
5
0
1.5k
Feb ’24
Publishing an app with in-app purchase with webview (PWA)
Hello, I'm trying to publish a PWA application. I got a refusal to publish the app because of the in-app purchase. I asked for more information I need some clarification regarding in-app purchases. The application is a PWA that displays the content of the url https://revisions-crpe.app . The purchase is made on the following site: https://maitresse-jero.com Do you mean that if I make the in-app purchase available by staying on the url https://revisions-crpe.app the application will be approved? I can't use services like StoreKit or Swift development because the application is a PWA. How do other PWA applications with paid services work? Apple's response Hello, We are not able to provide feedback on app concepts or features, but we recommend evaluating your suggestions against the App Store Review Guidelines, as well as the Apple Developer Program License Agreement, and the Human Interface Guidelines. Additionally, if you are considering implementing any of the following functionality, we recommend reviewing all associated reference material and other resources available on Apple Developer for any additional requirements. Apple Developer Apple Copyright and Trademark Guidelines Game Center iCloud In-App Purchase You may also choose to post a question in the Apple Developer Forums. Best regards, My questions So I wonder if offering direct purchase from https://revisions-crpe.app would be enough to get my pwa app published? If not, I don't see how I can do it any other way, as I don't develop in Swift. I use PWABuilder. Thanks for your help! :)
0
0
508
Feb ’24
The store kit review pop up appears hidden behind UI
The store review alert is shown hidden behind UI, I'm 100% sure it shows up, and I can see it when the current view is empty/transparent. I tried using various ways to find the current window, launching on different threads but nothing works. I have no idea what else to try the library doesn't really provide any documentation or anything. If it matters we are using the unity framework in the app, and it is a multi-window app. if let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene { serviceProvider.reviewService.requestReview(in: scene) } this is the invocation, the service then calls func requestReview(in scene: UIWindowScene) { SKStoreReviewController.requestReview(in: scene) } the result is that the prompt is shown, but it is hidden behind ui elements, if the view is empty, the prompt is visible and interactable.
0
0
317
Feb ’24
Get all Products for in a subscription group
If I use SubscriptionStoreView.init(groupID), it seems to be able to look up all the Products that have that subscription group ID. But I don't see any public method for doing that myself. Am I missing something, or is SubscriptionStoreView using a private method to do this lookup? I know that historically it has always been necessary to know the product IDs of all the products you want to sell; you have never been able to ask Store Kit to give you a list. SubscriptionStoreView doesn't seem to have this limitation, which is a bit surprising.
0
3
524
Feb ’24