I have has a the Storekit working in my application previously.
It uses the a iTunes songs ID and allows the user to purchase the track from iTunes within the app using a View.
its been fine in IOS 17 but since the update to 18 Ive not been able to get this to work.
the iTunes panel loads within the app and shows the track I wish to purchase. on clicking purchase I login with my Apple ID password. that then spins for a few seconds then asks to do the purchase again.
Can you please advise.
code below
print ("Store ID + \(self.appId)")
let storeProductViewController = SKStoreProductViewController()
storeProductViewController.delegate = self
let parameters = [SKStoreProductParameterITunesItemIdentifier: self.appId]
storeProductViewController.loadProduct(withParameters: parameters) { status, error -> Void in
if status {
self.present(storeProductViewController, animated: false, completion: nil)
print("success: \(status.description)")
} else {
if let error = error {
print("Error: \(error.localizedDescription)")
}
}
}
DispatchQueue.main.async {
self.isPresentStoreProduct.wrappedValue = false
}
}
StoreKit
RSS for tagSupport in-app purchases and interactions with the App Store using StoreKit.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Since today, we are receiving reports from several customers on iPadOS17.x and iPadOS18 that their app runs in 'demo' mode. This can only happen if the purchase receipt is not found and this also shows in the log file they sent us. We can also reproduce it on an officially installed version of our app, but not when run from Xcode.
Is anyone else experiencing this?
I use the write-review query parameter in my App Store URL to bring up the review prompt in the App Store app:
https://apps.apple.com/app/id0123456789?action=write-review
(0123456789 is just an example ID, obviously replace that with your app ID)
This is exactly what is supposed to be done as per the documentation: https://developer.apple.com/documentation/storekit/requesting_app_store_reviews#4312600
However, on macOS it just opens the product page as if I never put the query parameter in the URL. It works fine on iOS 18.2.
I am using macOS 15.2 beta 3 (24C5079e)
Feedback ID: FB15866683
I have two sandbox users in App Store Connect, as I'm trying to test in-app purchases and Family Sharing. They're set up fine; I can make purchases in the app.
The issue is that the refund request sheet in my app sometimes shows properly and lets me request a refund, but I'd say >80% of the time the sheet just shows "Cannot Connect" with a "Retry" button. Hitting that button doesn't ever result in the sheet showing the refund page.
The only fix for this is to delete the app from the device, and restart the device.
This has to be a joke, right? I need to be able to test this IAP, and the sandbox environment is useless most of the time. Why?
Anyone experiencing this sort of issue?
Hello,
Is anyone else seeing Purchase.PurchaseResult.UserCancelled, despite a successful transaction?
I had a user notify me today that he:
Attempted a purchase
Entered payment credentials
Was asked to opt in to email subscription notifications
Opted In
Was shown my app's "User Canceled Purchase" UI
Attempted to repurchase
Was alerted that he was "Already Subscribed"
I have adjusted my code to check Transaction.currentEntitlements on receiving a .userCancelled result, to avoid this in the future. Is this logically sound?
Here is my code - please let me know if you see any issues:
func purchase(product: Product, userId: String) async throws -> StoreKit.Transaction {
let purchaseUUID = UUID()
let options: Set<Product.PurchaseOption> = [.appAccountToken(purchaseUUID)]
let result = try await product.purchase(options: options)
switch result {
case .success(let verification):
guard case .verified(let tx) = verification else {
throw PurchaseError.verificationFailed // Show Error UI
}
return try await processVerified(tx)
case .userCancelled:
for await result in Transaction.currentEntitlements {
if case .verified(let tx) = result, tx.productID == product.id, tx.revocationDate == nil {
return try await processVerified(tx)
}
}
throw PurchaseError.cancelled // Show User Cancelled UI
case .pending:
throw PurchaseError.pending // Show Pending UI
@unknown default:
throw PurchaseError.unknown // Show Error UI
}
}
@MainActor
func processVerified(_ transaction: StoreKit.Transaction) async throws -> StoreKit.Transaction {
let id = String(transaction.id)
if await transactionCache.contains(id) {
await transaction.finish()
return transaction // Show Success UI
}
let (ok, error) = await notifyServer(transaction)
guard ok else {
throw error ?? PurchaseError.serverFailure(nil) // Show Error UI
}
await transaction.finish()
await transactionCache.insert(id)
return transaction // Show Success UI
}
The only place the "User Cancelled Purchase" UI is displayed on my app is after the one instance of "throw PurchaseError.cancelled" above.
This happened in Production, but I have also seen userCancelled happen unexpectedly in Sandbox.
Thank you for your time and help.
My IAPs no longer display for one of my apps. I'm not sure where to start to troubleshoot. Any ideas?
Topic:
App & System Services
SubTopic:
StoreKit
Hey team, we are having some unexpected transactions being sent to us by the Store Kit service. Right after we process a transaction, another transaction, with a different id, is received on paymentQueue(_:updatedTransactions:) without the user interaction.
This is breaking some of our internal flows and there were some reports of users being charged twice. I'm trying to understand where did these transactions came from and how can we avoid that. Can you help me?
I've attached some transactions that had this issue:
match_incomplete_purchases.csv
I'm considering developing an app where users can create their own subscription plans by freely setting their prices, similar to YouTube's membership feature.
I understand that in-app purchases must be used to unlock features within the app. With that in mind, I searched for APIs to enable this functionality but couldn't find relevant information.
When I contacted Apple directly, they mentioned that they couldn't provide specific answers unless the app is under review.
If anyone has knowledge about the following points, I would greatly appreciate your response:
Is it possible to implement a feature similar to YouTube's membership using in-app purchase APIs? If it's not feasible with in-app purchases, is it allowed to use external payment services like Stripe?
I have got from App Review Team this same feedback during several months:
Guideline 2.1 - Performance - App Completeness
We are unable to complete the review of your app because one or more of your in-app purchase products have not been submitted for review.
Next Steps
To resolve this issue, please be sure to take action and submit your in-app purchases and upload a new binary in App Store Connect so we can proceed with our review.
I am unable to understand and implement what is meant by the feedback:
… take action …
What "action" to take?
… submit your in-app purchases …
How to "submit in-app purchases"? I know how to submit my app but how "submitting in-app purchases”?
My app contains no separate in-app purchases but several pathways through the app. The app's code contains three flags that act as signposts on user’s way through the app (Basic, Standard, Premium). The signposts are not extra content and features distributed on the App Store. They are existing parts in the app from the very beginning. They are activated according to the model user chooses (Basic, Standard, Premium) and loads down from the App Store.
I try to solve the problem since several months - without success. Links offer no solution. Links say what one can do but not how to do it. What is missing are a couple of lines of code I can adapt and integrate into my app's Objective-C code.
Best regards
gefa
We’re encountering a problem with StoreKit in the sandbox environment. During an SKProductsRequest, some or all of the product identifiers provided are being returned in the invalidProductIdentifiers array of the SKProductsResponse, despite being valid and already approved.
This behavior began occurring since last 2 days only and appears to be intermittent—in some cases, a product identifier that initially fails will succeed after one or two retries, without any changes on our end.
What we've verified:
All product identifiers are correctly configured and approved in App Store Connect.
No recent changes have been made to our product configuration.
The same product identifiers have previously worked without issue.
We would appreciate any assistance in identifying the root cause of this behavior. Please also let us know if there is a known issue currently affecting StoreKit sandbox services.
Thank you for your support.
when we test in app purchase feature in TestFlight, we realize that TestFlight using our real iCloud account in AppStore, but because the app installed from TestFlight, they know it is still "Testing Phase" so they purchase set to FREE.
Now im asking about how to test in app purchase for CANCEL SUBSCRIPTION?
I can't found in my real iCloud account, either for my sandbox account inside AppStore settings.
Please any response will helpful. Thankyou.
Hello,
I am currently integrating with the iTunes Sandbox environment, specifically with APIs like:
https://sandbox.itunes.apple.com/inApps/v1/subscriptions/12345
However, I consistently receive a 503 - Http/1.1 Service Unavailable error in response. Below is the typical response I get:
<html><body><b>Http/1.1 Service Unavailable</b></body></html>
I've tried sending requests from different IP addresses and servers, but all attempts result in the same 503 error. Could anyone provide guidance on whether this is a temporary issue with the sandbox environment or if there is something I need to adjust in my setup?
Any help would be greatly appreciated!
Thank you.
Topic:
App & System Services
SubTopic:
StoreKit
What happens after 12 renewals? Does the subscription expire completely? The next day when I try to manage settings for my sandbox account it says it cannot connect.
I cannot see the status of subscription in:
Settings-> App Store -> Sandbox Account -> Manage
Logging out and logging in of my regular account does not fix that.
When I login with a different non-testflight sandbox account I can finally edit those settings. There are some missing details in documentation explaining testflight sandbox accounts. Do these accounts stop working after 12 auto-renewals? I need more specific details in order to ensure subscriptions will work properly during production.
I have a question with isEligibleForIntroOffer(for: groupId) that in which case that isEligibleForIntroOfferForGroupId changes from false to true. I found that a few user of our app isEligibleForIntroOffer changes. they used to buy a renewing-subscription with 3-day free trial. but 3 days later. i got from logs their isEligibleForIntroOffer becomes true. We rely on this field to determine whether to display products with free trials. there is only one product with free trial introductory offer.
Currently, over the xcode environment to do the testing of product subscriptions through appstore are working correctly using the storeKit.
When deployed in testflight to do the testing over the integration environment, the store response times are being excessively high, in excess of 20 minutes.
This behavior is not replicated on Xcode, and is happening on recent versions uploaded to testflight, as earlier versions that were already tested and are currently in production.
In addition the communication between the appstore webhook and the BE is also failing in this environment.
It is being blocked to generate any test to be able to launch to production.
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
Developer Tools
App Store
StoreKit
iOS Storekit2 Appstore production environment, some user feedback in app purchase faliure, What our log records is StoreKitError.unknown,please How to solve problem, thanks
Hi All,
I have setup RevenueCat integration with Apple for in-App purchase, signed all Business Agreements. x-checked all the keys and deleted and created subscription 100 times along with products in RevenueCat but only null is returned to my app by RevenueCat.
I read and discussed with RevenueCat, as per them Apple returns null to them and they revert back null to users.
Can someone please help me, I am struggling and out of wits. Don't know what to do. Any help, will be highly appreciated.
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
In-App Purchase
App Store Server API
I have an app that allows users to complete a video call and then bills them a per-minute charge for the length of the call. How can I automatically bill my app user using in-app purchase without prompting for approval?
I'm using Stripe on the web to complete an automatic purchase with the user's stored credit card. How do I accomplish the same thing on the web while on Apple device (or within my app) without prompting them for approval? They've already given approval by completing the call.
I am aware that I can create an in-app purchase product for the necessary "credits" but this will prompt them to complete the purchase which should instead be automatic. Thanks!
Hi, I've some issues on my application about purchases.
My app is available for iOS and tvOS.
Some part of my code is the same on both target (my purchase code is one of them).
The issue is:
Some users can't do a purchase on Apple TV (but not all and I can't reproduce)
Some users purchased on a device and are not considered as pro on the other device (logged with same apple account). Again it's not all.
Here is my store code
The following document states that some APIs in Storekit1 have been deprecated and that migration to Storekit2 is recommended, but I understand that Storekit2 only supports Swift.
I'm currently creating an iPhone app in Objective-C, but is there a way to implement APIs equivalent to Storekit2 using a different Objective-C API?
https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-18-release-notes#StoreKit