We are facing an issue where some users send receipts with an empty 'in_app' attribute during server validation.
We are using the API described here:
https://developer.apple.com/documentation/appstorereceipts/verifyreceipt
After a purchase, we validate the receipt on the server and call finishTransaction in the app.
Most receipts are fine, but this issue affects some users.
The documentation states that an empty 'in_app' attribute means no valid purchases:
https://developer.apple.com/documentation/appstorereceipts/responsebody/receipt/in_app#discussion
Our questions are:
When is a receipt with an empty 'in_app' attribute generated?
How should we handle such receipts?
Thank you for your help.
Best regards,
StoreKit
RSS for tagSupport in-app purchases and interactions with the App Store using StoreKit.
Posts under StoreKit tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I'm having some trouble with in-app purchases on Apple Store Connect, and I'm hoping someone here has dealt with a similar issue.
Initially, I was able to add the purchases using the "Select In-App Purchases" button. However, after my app was refused, the in-app purchases were also rejected, and now I'm stuck in a frustrating loop: Developer Action Needed -> Waiting for Review -> Rejected.
I’ve tried submitting the in-app purchases for review at the same time as the app, but that also ended in rejection. The reviewers can’t locate the in-app purchases, even though I list them in the comment box. I suspect this is because I can’t re-add them using the "Select In-App Purchases" button anymore.
The instructions on "add the in-app purchases in the binary" are vague and non-specific.
To make matters worse, the reviewers are commenting on issues from an older build, like a placeholder I left in the settings window. That placeholder has been removed in the latest build, but their feedback doesn’t reflect that.
Has anyone encountered this loop or know how to get out of it? Any advice would be much appreciated!
Error Domain=SKErrorDomain Code=5 "(null)" UserInfo={NSUnderlyingError=0x3086335a0 {Error Domain=ASDServerErrorDomain Code=3504 "找不到此项目。" UserInfo={NSLocalizedFailureReason=找不到此项目。}}}
线上App出现这样的报错(大部分用户是好的)
在该报错用户的配合下我们尝试引导:重新登录appid账号、重新设置付款信息、重新下载应用,都不行
而且这个appid登录后可以买别的产品,但是买不了我的内购
请问怎么解决
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
Hello everyone! I've encountered an issue related to SwiftUI and StoreKit. Please take a look at the SwiftUI code snippet below:
import SwiftUI
struct ContentView: View {
var body: some View {
NavigationStack {
List {
NavigationLink {
Page1()
} label: {
Text("Go to Page 1")
}
}
}
}
}
struct Page1: View {
@Environment(\.dismiss) private var dismiss
@State private var string: String = ""
var body: some View {
List {
NavigationLink {
List {
Page2(string: $string)
.simpleValue(4)
}
} label: {
Text("Tap this button will freeze the app")
}
}
.navigationTitle("Page 1")
}
}
struct Page2: View {
@Binding var string: String?
init(string: Binding<String>) {
self._string = Binding(string)
}
var body: some View {
Text("Page 2")
}
}
extension EnvironmentValues {
@Entry var simpleValue: Int = 3
}
extension View {
func simpleValue(_ value: Int) -> some View {
self.environment(\.simpleValue, value)
}
}
This view runs normally until the following symbol is referenced anywhere in the project:
import StoreKit
extension View {
func notEvenUsed() -> some View {
self.manageSubscriptionsSheet(isPresented: .constant(false))
}
}
It seems that once the project links the View.manageSubscriptionsSheet(isPresented:) method, regardless of whether it's actually used, it causes the above SwiftUI view to freeze.
Steps to Reproduce:
Clone the repository: https://github.com/gongzhang/StrangeFreeze
Open it in Xcode 16 and run on iOS 17-18.1
Navigate to the second page and tap the button, causing the app to freeze.
Remove manageSubscriptionsSheet(...), then everything will work fine
I'm on an Intel-based Mac running macOS Sonoma 14.7.1 (23H222) and Xcode Version 16.1 (16B40).
I've created a local StoreKit Configuration File that does not synchronise with App Store Connect and selected it in the Scheme.
I have some products that are consumable in-app purchase and it loads fine as expected when I run the app and I am able to make transactions. It also show up in the Transaction Manager.
After a little while, working on the app, re-running it several times, it stops working. The products do not load the metadata from the StoreKit configuration file.
I also get this error in the console:
Error enumerating unfinished transactions for first transaction listener: Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={AMSStatusCode=0, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <DF5E86B0-0E4A-4982-AF42-FC58FA858C01>.<1>, NSErrorFailingURLKey=http://localhost:51027/inApps/history?guid=F01898465023&reason=initial, _kCFStreamErrorDomainKey=10, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <DF5E86B0-0E4A-4982-AF42-FC58FA858C01>.<1>"
), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=http://localhost:51027/inApps/history?guid=F01898465023&reason=initial, NSUnderlyingError=0x60000038c150 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorDomainKey=10, _kCFStreamErrorCodeKey=-72000, _NSURLErrorNWPathKey_desc=satisfied (Path is satisfied), interface: lo0, _NSURLErrorNWResolutionReportKey_desc=Resolved 0 endpoints in 0ms using unknown from query}}, _kCFStreamErrorCodeKey=-72000}
Restarting the computer resolves the issue but I don't want to restart the computer every single time when it happens and it happens quite soon after a short while.
How can I make sure that it doesn't happen or if it does happen then fix the issue without restarting the computer?
Relaunching Xcode doesn't help and neither does deleting Project Build Data and Indexes.
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.
I encounter a problem that duplicate charges for a single purchase. iI received two transactions with the same appAccountToken but different original transactionId.(a non-renewing subscription product). One of them is from Transaction.updates. The user of our app has already given us feedback twice. the phone runs iOS 18.0.1.
I would like to know whether and how people are getting the sandbox account > manage > clear purchase history feature to work. I clear purchase history (either on my device or at app store connect), and I delete my app from my device. I then run my app from Xcode on my device, and it detects at launch the existence of the purchase, and so I cannot test my purchase user interface. Does this thing actually work as advertised?
How can I check the orders from my app's users? Sometimes users may encounter issues with their payments, so I need to verify the transactions when there are problems reported by my app's users.
Not using beginRefundRequest like method from client side code,
Can I ask apple to refund specific order from website or help center?
If it possible where is the ask to refund menu in appstore connect or other?
Third-party analytics SDKs, such as Firebase, can collect and analyze in-app purchase data without requiring explicit coding by developers. How do they achieve this? Does Apple provide a mechanism to monitor in-app purchases, or do these SDKs implement runtime monitoring of the system’s in-app purchase process themselves?
Additionally, I noticed that when using StoreKit 2 for in-app purchases, Firebase require developers to explicitly write code to enable the collection of in-app purchase data. Is this because the StoreKit 2 framework no longer supports arbitrary services implementing runtime monitoring of in-app purchases?
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
We have a user that's shared screenshots indicating that they're the recipient of a subscription to our app through Family Sharing, but when we look for the transaction in Transaction.currentEntitlements there's nothing there, even after calling AppStore.sync. Should we expect to see a transaction in current entitlements? How can we determine whether it's our bug or Apple's?
I'm currently in the process of submitting a new app with a single non-consumable In-App Purchase.
After creating the IAP in AppStore Connect, I created a synced StoreKit config in Xcode which correctly loaded the purchase.
After making sure that the transaction works as expected within the app, I submitted the app in AppStore connect, including the In-App Purchase.
Since then, the In-App Purchase can not be found in the StoreKit configuration and isn't displayed in the app, which lead to the submission being rejected.
As requested by the review team, I have resubmitted the In-App Purchase, so it's currently "Waiting for Review" but still not showing up in the StoreKit configuration in Xcode.
I'm not quite sure what I'm doing wrong here. I have other apps live in the AppStore with IAPs and no outstanding agreements to sign.
I'm testing auto renewable subscription, specifically using Xcode testing (not sandbox). It seems that subscriptions are automatically cancelled after some time. I haven't found any documentation on how long time this is, so does anyone know?
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
Hi!
I'm currently developing an app to support artists.
This should include a shop where artists can buy digital resources to use in their projects.
Now the issue is how I handle this.
I know there are consumable and non-consumable IAPs and there is a limit of 10.000 IAPs per app.
Because my shop will have more than 10.000 items eventually, I try to use a different approach:
For every price I want to have, I create a generic consumable IAP with the price I want. Then I assign this IAP to the product.
To keep transactions safe, users need to sign-up before making a purchase.
When a user intends to purchase the item, I create a transaction with the item a user wants to purchase along with the user in my database and return a unique uuid. Then I attach this uuid with the transaction appAccountToken.
Then I listen to App Store Server Notifications and unlock the item for the user based on appAccountToken.
I already read about this extensively and other people seemed to be able to use it after explaining everything to Apple.
I tried to submit the first version of the app and it was rejected with reason:
Guideline 2.3.2 - Performance - Accurate Metadata
We noticed that the display names and descriptions for your promoted in-app purchase products are the same, which makes it hard for users to identify what they are purchasing from the App Store.
Next Steps
To resolve this issue, please revise the display names or descriptions for your promoted in-app purchase products to ensure each individual metadata item is unique.
Please note that display names for promoted in-app purchases can be up to 30 characters long, while descriptions can be up to 45 characters long.
If you have no future plans on promoting this in-app purchase product, you can delete the associated promotional image in App Store Connect.
All my consumable IAPs are named the same because it is generic and I don't really see how I would change this.
What kind of information do I need to supply to Apple to approve it?
Any insights or tips are highly appreciated.
Please help! I have a subscription IAP failing on tvOS 18.2 at:
func makePurchase(_ product: Product) async throws
{
let result = try await product.purchase() //ERROR OCCURS HERE (See error message below)
...
Xcode Console message: "Could not get confirmation scene ID for [insert my IAP id here]"
The IAP subscription was working fine on 18.1 and earlier, and the same IAP and code is also running fine on iOS 18.2. The tvOS error on 18.2 happens both in production and sandbox.
Are there any changes to StoreKit 2 which might cause this error?
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
}
}