StoreKit

RSS for tag

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

StoreKit Documentation

Posts under StoreKit tag

347 Posts
Sort by:
Post not yet marked as solved
0 Replies
147 Views
Does StoreKit offer an option for a product that combines auto-renewable and consumable features? Specifically, I'm referring to a scenario where a user subscribes to a product and receives 100 tokens each month. If the user exhausts these tokens within the month, they must wait until the next month to receive another 100 tokens. Essentially, the user cannot access the product if they deplete the monthly allocation of tokens provided by the auto-renewable subscription. In this setup, the 100-token package per month constitutes the auto-renewable aspect, while the tokens themselves represent the consumable part. Is there a straightforward solution available within StoreKit for implementing this functionality? If not, what would be the recommendation?
Posted Last updated
.
Post not yet marked as solved
0 Replies
229 Views
I created a Bible app, and I am wondering if I am able to use In App Purchases to give users the opportunity to pay to sponsor a verse, within the app and their name would be be displayed in the app next to the verse they sponsored. Is that going against Apples Guidelines?
Posted
by sf2310.
Last updated
.
Post not yet marked as solved
0 Replies
188 Views
What I mean by "fake" here is some sort of button which will state "Buy a pass for 4.99$" and then, once you click it, it will tell you that the app is still in early phase and so the pass is actually free. Reason for wanting this: We'd like to test the willingness to pay without going through the hassle of setting up everything related to having real in-app purchases.
Posted
by GabMaz.
Last updated
.
Post not yet marked as solved
1 Replies
222 Views
I have an app in store which has in app subscription, while checking for renewal it is not providing me exact end date of subscription based on which I have to lock / unlock certain features. It never fetch right date to verify, this is seriously a little thing which seems to be too complicated.
Posted Last updated
.
Post not yet marked as solved
1 Replies
188 Views
Hi, For a user who subscribed a product via In-App Purchase, how does the application backend know that the user is still subscribed? The initial purchase happens on the mobile app. Via receiving and validating the receipt of initial purchase, the backend of mobile app would be informed. However, what is the appropriate option for the subsequent subscription payments? How do I know whether the user is still paying? Thanks.
Posted
by selbe.
Last updated
.
Post marked as solved
2 Replies
230 Views
**Question 1: ** Will ServerNotificationV2 be able to provide real-time notifications regarding Storekit1 contract renewals, and is receiving Storekit1 notifications in ServerNotificationV2 an expected use? (The documentation does not say that receiving Storekit1 notifications is not recommended, so we would like to confirm Apple's assumption.) **Question 2: ** If ServerNotificationV2 is not able to receive Storekit1 notifications in real time, what is the expected time lag?
Posted Last updated
.
Post not yet marked as solved
0 Replies
234 Views
I'm trying to test payments on an iOS app. I have a sandbox account and its worked previously. When I try and add a test credit card I get the error "Your Issuer Does Not Yet Offer Support For This Card" I'm using the cards here https://developer.apple.com/apple-pay/sandbox-testing/" What I have tried: Checking my Region is the UK Checking the card details Tried several cards Tried signing out of my iCloud completely I'm testing on an iPhone 12 mini using iOS 16.5.1
Posted
by itierney.
Last updated
.
Post marked as solved
1 Replies
297 Views
Static content is things like unlocking more functionality within an app, that doesn't change over time. Very basic example: Let's say I have an app that displays the workload on the CPU as a percentage in the macOS menu bar. I might want to give the user an option to pay to unlock features that also displays the workload percentage for the GPU and RAM in the macOS menu bar. For this, automatically renewing subscription is not allowed. But would a non-renewing subscription be acceptable, or does it have to be a perpetual (pay one time own forever) in-app purchase for static content?
Posted
by Filip27.
Last updated
.
Post marked as solved
1 Replies
281 Views
I use StoreKit's StoreView to buy in-app purchases. The purchase is working in the simulator, but how can I restore purchases? I did not find a restore handler, there is only a onInAppPurchaseCompletion but I'm missing a onRestorePurchaseCompletion or similar. This is how it looks This is my code: StoreView(ids: ["my.product.id"]) .storeButton(.visible, for: .restorePurchases) .storeButton(.hidden, for: .cancellation) .onInAppPurchaseCompletion { product, result in if case .success(.success(let transaction)) = result { print("Purchased successfully: \(transaction.signedDate)") isPremium = true } else { print("Something went wrong") } }
Posted Last updated
.
Post not yet marked as solved
0 Replies
248 Views
I want to test the in-app purchase in visionOS Simulator. I logged in to the Sandbox account in Simulator and was prompted to send the verification code to the phone number I wrote in the previous step. I entered the verification code accurately, but I couldn't log in normally. It was wet many times.
Posted
by lijiaxu.
Last updated
.
Post not yet marked as solved
1 Replies
315 Views
StoreKit don't work with iOS 17.4. After updating to iOS 17.4 our users can't make any purchases in App. Its very critical bug that affected our App. <SKPaymentQueue: 0x302bb4670>: Error in remote proxy while checking server queue: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.storekitd" UserInfo={NSDebugDescription=connection to service named com.apple.storekitd} [df94_SK2] Failed in XPC product request products(IDs: ["report"]): Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.storekitd" UserInfo={NSDebugDescription=connection to service named com.apple.storekitd} Does anyone know what to do?
Posted
by trori.
Last updated
.
Post not yet marked as solved
0 Replies
188 Views
Hello. How can I get transaction information when a payment request is submitted to the app store server
Posted
by ThanhDam.
Last updated
.
Post not yet marked as solved
4 Replies
537 Views
Hi, I am following https://developer.apple.com/documentation/storekit/transaction/testing_refund_requests and trying to test refund requests. I am able to trigger refund requests from my app (in sandbox) using https://developer.apple.com/documentation/swiftui/view/refundrequestsheet(for:ispresented:ondismiss:) I do see that the notification URL receives a NotificationTypeV2.CONSUMPTION_REQUEST but it's not receiving NotificationTypeV2.REFUND The product for which the refund is triggered is a consumable type Is this expected behavior? How can I test REFUND without this? Thanks
Posted
by gsin.
Last updated
.
Post not yet marked as solved
5 Replies
440 Views
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.
Posted Last updated
.
Post not yet marked as solved
0 Replies
239 Views
My company did an app for a customer 10 years ago. The app has in-app purchases (not subscriptions). It is an Objective-C code base. Over the years we've done minor updates to this app in order to keep it in compliance, but no major overhaul. The app has been pretty reliable in the past, but recently my customer is getting a flood of complaints from users who say their in-app purchases disappear and can't be restored. It's happening too often to just be a case of bad internet connection or similar issue. The only thing that seems to be consistent is that it's never US-based users. Whenever I test this app using sandbox accounts, I cannot reproduce the problems that are being reported. I'm always able to make purchases and restore them after reinstalling the app, or restore them to a different device. The content associated with the purchases always downloads correctly, even if I intentionally interrupt and restore internet access. What can I do to figure this out? Should an IAP based app from 2014 be expected to work correctly today? Are there new legal issues with non-US app stores that we need to be aware of? I realize there isn't a lot to go on here, but I don't have any more information. Thanks, Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
0 Replies
173 Views
{NSLocalizedDescription=Reached max retry count, AMSURL=https://amp-api.sandbox.apple.com/v1/catalog/us/in-apps?extend=hostedContent&amp;filter%5BappBundleId%5D=com.dazn.staging&amp;filter%5BofferName%5D=BR.AP.HO.01.STAG,BR.MP.HO.01.STAG,BR.NFL.APPLE.SPP.HO.01.STAG&amp;l=en-US&amp;omit%5Bresource%5D=autos&amp;platform=iphone&amp;with=adHocOffers, AMSStatusCode=401, NSLocalizedFailureReason=Task reached max retry count (0 / 0);}
Posted Last updated
.
Post marked as solved
2 Replies
226 Views
My app listens for transactions using: for await result in Transaction.updates { // check verification and process Transaction } The result coming from these updates has a jwsRepresentation field, which when decoded server-side reveals the price the user paid, discounted in the case of a custom offer code. How can I get this value without a server roundtrip? Transaction does not have price field, and the subscription product's price does not seem to include custom offer code pricing.
Posted
by j_ptron.
Last updated
.
Post marked as solved
2 Replies
318 Views
Hello, I'm trying to add in-app purchases to a macOS app but failing to load the local test products. From the docs and various examples I've found online, it should be pretty straightforward with StoreKit 2. So far, I've done the following: added in-app purchase capability created the local .storekit file added consumable and non-consumable products updated the scheme to use the test StoreKit configuration verified the products are present and can be purchase by using Debug > StoreKit > Manage Transactions to make direct purchases verified the product IDs are correct To simplify things I tried creating a barebones app. I created a new .storekit file and added a single non-consumable product with ID product1. I used the default view and just a task to retrieve the products: import SwiftUI import StoreKit struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") } .task { let products = try? await Product.products(for: ["product1"]) print(products) } .padding() } } The print statement output is: Optional([]) I know I must be doing something wrong, but I'm completely missing it. I hope someone can help me. Thanks
Posted
by plom.
Last updated
.
Post marked as solved
3 Replies
518 Views
After upgrading to iOS 17.4, when using SKProductsRequest to request product information from Apple, an error is returned. The error message is "4097 Couldn’t communicate with a helper application." At present, users who have upgraded to iOS 17.4 are unable to make payments. How can we solve this problem? Thank you!
Posted Last updated
.