Hello,
I hope to find out more about how AppTransaction works on macOS, specifically about its internet connection requirements: if I use this to validate that the app is a legit purchase from the Mac App Store, I would not want it to have an always-on requirement just to validate.
Does AppTransaction require the user to always be online for AppTransaction.shared ?
When an app is downloaded from the Mac App Store, is the data needed for AppTransaction automatically embedded during that download, or is that data downloaded upon first launch of the app, therefore requiring an internet connection at launch time?
Once the data/receipt has been downloaded by AppTransaction, is it cached until the app's next update, or is it cleared at some time during the version's life and needs to be re-downloaded, therefore requiring an internet connection at launch?
Where is that receipt/data stored?
Also, if you don't mind me sneaking in this non-related but sort of related question, in terms of receipt validation:
Does macOS Sequoia's MAC address rotation feature affect receipt validation in any way when using IOKit?
Thank you kindly,
– Matthias
StoreKit
RSS for tagSupport in-app purchases and interactions with the App Store using StoreKit.
Post
Replies
Boosts
Views
Activity
Hi I'm writing my first in-app purchase app, and I'm trying to do some testing with sandbox accounts. I wrote my subscription page use SwiftUI SubscriptionStoreView. And I read the documentation it says :
The sandbox account appears in Settings > App Store after the first time you use the device to attempt a purchase in a development-signed app.
But I have no idea how to make a sandbox purchasing. Every time I click the subscription button it just making a purchase in xcode environment. Did I missed anything? What can I do to make a sandbox pruchasing?
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!
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?
Over 50 hours ago, we created an app update with 4 IAP:s. We use revenue cat for the payment features. All IAP:s are approved, and they were bundled into this version.
Still, none of the IAP:s are working. They work as intended on TestFlight. All of them are approved.
I have reached out with a case to apple developer support but have received no assistance. This is a really frustrating situation and there are no logs or any ability to understand what is going on.
Hi, I can't get into "manage" sandbox account. I either get to a screen to put my password in. Here there is no way to click "next" or "login". (I have tried pressing "enter" on my keyboard to no effect). Or I get directly into "Cannot Connect" page. I have tried this two days in a row. I have tried turning it off and on again. I have tried logging out and in.
Device: iPhone 13 pro max, iOS: 16.0.3 (also tried the version before this)
I don't know if this is a iOS 18.1 beta bug or some StoreKit server issues but Product.SubscriptionInfo.Status is returning an empty array in production even if the user has a valid subscription that is months away from expiring or renewing.
I myself ran into this issue this morning but of course everything is fine in development mode so that makes it quite challenging to debug.
Anyone else has this issue?
My app calls Product.SubscriptionInfo.status(for:) to get the subscription status when the app starts.
Users with multiple Apple IDs have reported that every few days they get an unpurchased status, and when I checked that, the Product.SubscriptionInfo.status(for:) result array was empty.
(When the app is restarted, Product.SubscriptionInfo.status(for:) gives the correct result.)
StoreKit.Transaction.currentEntitlements, which is executed immediately after Product.SubscriptionInfo.status(for:), seems to be getting the correct result, so I am trying to check the subscription status with this result.
Is it a bug that Product.SubscriptionInfo.status(for:) returns an empty result for the purchaser?
There is a mismatch between Product.SubscriptionInfo.status(for:) and StoreKit.Transaction.currentEntitlements.
Is it possible for a mismatch to occur?
And In such a case, which result should be adopted?
I would like to know if it is possible to use the PIX payment option, a Brazilian payment method, for in-app purchases. Additionally, I would like to know if it is already possible to integrate other payment APIs such as MercadoPago, Iugu, etc.?
My app is planning to develop a subscription product, for this type of in-app purchase do I need call finish() to complete the transaction?
And, does currentEntitlements() return the transaction after calling finish()?
Hello,
I have an app where the users can connect their vehicles to an API and record trips and so on.
Currently I have one subscription, where the user can add as many vehicles as he wants. But now I want (need) to change this to one vehicle per subscription.
So if the user want to add two vehicles, he need to subscribe two times to the same product.
How can I handle this?
Thanks,
Arangoool
Which scenario does SKErrorOverlayCancelled refer to specifically?
If the user pulls up the payment and cancels it, does it return SKErrorPaymentCancelled or SKErrorOverlayCancelled?
Some paid users are unable to use the paid features unlocked by purchasing our subscription plan. It seems that this is due to StoreKit 2's Transaction.currentEntitlements not working the way we would expect it to work.
Are you also encountering this issue? Do you have any idea to improve this situation?
At launch, our app checks if the user is subscribed to the plan, using Transaction.currentEntitlements. As a result, the currentEntitlements array was empty.
Our app then fetches the products from StoreKit 2 using Product.products(for:). As a result, the Product.SubscriptionInfo.RenewalState value of the corresponding Product (product.subscription.status.first.state) is subscribed, which confirms that the user has indeed purchased our plan, but seems to contradict the absence of the corresponding transaction in Transaction.currentEntitlements.
Proactive in-app purchase restore and a restore purchase button calling the AppStore.sync() method are implemented, but using the button did not solve the issue.
Hello all!
My application written with C++ and using StoreKit1. For now my application using bridge C++/Objective-CPP/Objective-C/Swift. Since StoreKit1 declared "deprecated" got a question of how to implement correctly StoreKit2 in C++ application, mostly everything about Renewable Subscriptions. StoreKit2 have no direct API in Objective-C, it's available only in Swift. Which is the way the best and correct way:
-- for on-device writing C library and in it implement Swift? In this case how to add correctly StoreKit2 into library itself?
-- for on-device somehow write kind of wrapper for Swift StoreKit 2 within translation of all of objects in Objective-C and implement it with C++/Objective-CPP bridge? In this case how to add correctly StoreKit2 in C++ project written with CMake? Here https://github.com/compnerd/swift-cmake-examples/tree/main the one of the examples of interoperability C++/Swift with CMake. But how to use exactly with StoreKit2?
-- only using server side solution?
When I trigger the 'you've already purchased this subscription' alert and go to "Manage" my subscriptions, I'm prompted for a password to:
a Sandbox test account
that belongs to a different app
and I no longer have access to
Key Details:
I no longer have access to that Sandbox user, as I no longer work for that company.
I have long-since removed my AppleID from all of those apps using the appropriate flow to remove myself from their development accounts.
As such, I cannot delete these sandbox users myself.
I have wicked psychological damage from working at that company, and cannot 'reach out to them' to have them delete the sandbox accounts. I'm taking damage every time I see this alert as it is.
I'm NOT logged into my iPhone as a Sandbox tester, but with my AppleID proper.
NO purchases/iTunes email separate from my AppleID.
The prior AppStore Connect + App that it's asking me for credentials for did not offer subscriptions of any kind.
We only use Purchases Sandbox. We DON'T use StoreKit.
Questions:
Why am I being asked for this when I cannot ever succeed at providing it?
How do I work around this problem, so I can view and manage my test subscriptions?
Screenshots:
This alert:
Leads to this alert, which is an email address that belongs to a sandbox account that was created for an entirely different application on an entirely different AppStore Connect account, that I no longer develop for. I want to make this 100% crystal clear that there is no association whatsoever with my current application and the sandbox user this alert is asking me to provide credentials for.
For V1 used for internal purchase verification, when will the exclusive shared key regenerated after transfer be replaced? Will it affect in-app purchases and subscriptions by online users?
The V2 used for internal purchase verification uses the key ID instead of the dedicated shared key. In this case, what should we pay attention to before and after the transfer? Do I need to regenerate the key ID for the new account? Is the private shared key still useful? Do I need to generate a dedicated shared key again in the transferred App?
What will be the impact on existing subscriptions after the transfer? What do I need to do with the current existing subscriptions?
We have used universalLink, do we need to add a new TeamId to the apple-app-site-assn. txt file?
{
"applinks": {
"apps": [],
"details": [
{
"appID": “TeamIdA.com.***.***”,
"paths": [""]
},
{
"appID": “TeamIdB.com.***.***”,
"paths": [""]
}
]
}
}
We have stored the login information in Keychain Sharing, is there no way to get the original stored information after transfer? Is there a reasonable solution?
Trying to migrate to Swift 6.
However getting this error when using SwiftUI StoreKit purchase environment.
Sending main actor-isolated value of type 'PurchaseAction' with later accesses to nonisolated context risks causing data races
@Environment(\.purchase) private var purchase
let result = try await purchase(product)
I would like to clarify, do I understand correctly that Cancel and Refund events essentially have the same meaning, except that Cancel cancels the subscription, only the Cancel event applies to auto-renewable subscriptions, and refund applies to one-time purchases and non-renewable purchases?
I've been trying to test if the StoreKit API returns finished consumables when you fetch all transactions.
I added the SKIncludeConsumableInAppPurchaseHistory key to my Info.plist
I purchased 2 consumables and verified that they show up when you fetch all transactions before I finish them.
But when I fetch all transactions after finishing them, it doesn't contain the finished consumables.
Has anyone had success with this or is this a bug?
I tested using Xcode Version 16.0 (16A242d) running a macOS Catalyst app on Sonoma 14.7 (23H124).
Edit: If I try to get the transaction history using the https://api.storekit-sandbox.itunes.apple.com/inApps/v2/history from my server, I get the transactions back. So it seems like it's a bug on the client side.
We are using method “Transaction.latest(for: productId)” to verify the transaction .
Steps to reproduce :
Step 1 : User made purchase for productId “product_id_one”
Step 2 : “paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction])” api returns successful purchase for product_id_one .
func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {
for transaction in transactions {
switch transaction.transactionState {
case .purchased:
let mProductId = transaction.payment.productIdentifier
Print(mProductId) // product_id_one
..
Step 3: Call “Transaction.latest(for: product_id_one)” api .
guard let verificationResult = await Transaction.latest(for: productId) else {
// Here some times its returning nil for valid transaction
return
}
switch verificationResult {
case .verified(let transaction):
// at time its working fine . we are getting verified purchase .
// Check the transaction and give the customer access to purchased
case .unverified(let transaction, let verificationError):
// Here some times its returning unverified for valid transaction
}
Issue :
For valid purchase , Sometimes Transaction.latest(for: productId) api is returning nil and unverified transaction . This is intermittent issue.