Hello,
I added new In-App Purchase into my app, it was approved on 2nd of Oct but now 7th of Oct I still cannot see it in the list of products coming from Store.
I already have 2 subscriptions and 1 In-App purchase in my app, but the new In-App purchase is still not coming from the store in available products. What could cause this?
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
Created
Problem:
I'm implementing StoreKit 2 in my SwiftUI app. Products load successfully when I rebuild in Xcode, but on a fresh install, Product.products(for:) returns an empty array. The paywall shows "Unable to load pricing."
Setup:
Using StoreKit Configuration File (
.storekit
) for testing
Product IDs match exactly between config and code:
com..premium.lifetime (non-consumable)
com..premium.monthly (auto-renewable subscription)
com.****.premium.yearly (auto-renewable subscription)
StoreKitManager is a @MainActor singleton with @Published properties
What I've Tried:
Initial delay before loading - Added 1-second delay in init before calling loadProducts()
Product ID verification - Confirmed IDs match exactly between StoreKitConfig.storekit and code
Retry logic with exponential backoff - Implemented 3 retry attempts with 0.5s/1s/1.5s delays
Multiple calls to updatePurchasedProducts() - Called twice after initial load
Verified StoreKit configuration - File is properly added to project, has valid product definitions
Code Structure:
swift
@MainActor
final class StoreKitManager: ObservableObject {
static let shared = StoreKitManager()
@Published private(set) var products: [Product] = []
private init() {
updateListenerTask = listenForTransactions()
Task {
try? await Task.sleep(nanoseconds: 1_000_000_000)
await loadProducts() // Returns empty on fresh install
await updatePurchasedProducts()
}
}
}
Observations:
✅ Works perfectly after Xcode rebuild
❌ Fails on fresh app install (simulator & device)
❌ Product.products(for:) returns empty array (no error thrown)
✅ StoreKit configuration file is valid and properly configured
Question: Why does StoreKit need a rebuild to recognize products? Is there a proper initialization sequence I'm missing for fresh installs?
Environment:
Xcode [Version 26.0 beta 7]
iOS [IOS +17.0]
Testing with StoreKit Configuration File
We are currently using App Store Server Notifications V2 in a production environment, but occasionally encounter the error "Failed to parse signedTransactionInfo in the notification payload. status=VERIFICATION_FAILURE."
What could be the cause of this error? Also, is there a way to resolve this error?
After the notification from Apple was received on the server side, it was passed to the Apple library and an error occurred in the Apple library when decryption was performed.
I'm developing an app and I think I've implemented what I need to in the swift code. However, when I click the Purchase button in my app, I see "Cannot connect to App Store" when the App Store app opens. Attached are images showing how I've configured the Sandbox user. What am I doing wrong? I expect to be able to do a fake purchase to test subscription activation in the app, but it doesn't work.
Looking to update one of my apps that uses SKStoreReviewController +requestReview (deprecated) to
AppStore.requestReview(in:)
umm...I have a few of questions...
Why is an NSViewController parameter required? It's really not so uncommon for an AppKit app to just use NSWindowController with a window that does not use NSViewController...
It should be possible to present the review request in a standalone alert (attached to a window is preferred IMO but it still should be possible to ask in separate window).
3)...why Swift..(err nevermind)
Ideally:
AppStore requestReview should take a NSWindow parameter but that parameter should be optional. If nil the request should be presented in a standalone window (like an alert). If non nil..present as a sheet on the window.
Why a view controller? Maybe I'm missing something.
Regarding the offer codes in https://developer.apple.com/help/app-store-connect/manage-subscriptions/set-up-offer-codes, I set up some incorrect offer codes by mistake.
Currently, I can only deactivate it but I can't delete it. Is it possible to let me delete the incorrect offer codes due to the below reasons? Thank you.
I can't recreate the offer code due to error message This reference name is or has been used by another offer in this subscription group.
When I use the offer code redemption view in https://developer.apple.com/documentation/SwiftUI/View/offerCodeRedemption(isPresented:onCompletion:), it shows all the deactivated offer codes. I don't want them to be displayed in the page.
Question:
In the sandbox environment, I attempted to perform an In-App Purchase within an IME (Input Method Extension) using a sandbox test account. The purchase flow completed successfully, and I received the success callback.
However, I encountered an issue: no receipt file is generated. I tried checking with both the main app’s bundle and the IME’s bundle, but the receipt file was not found in either case.
When I attempted to refresh the receipt using SKReceiptRefreshRequest, it failed with an exception (error code: 0).
I would appreciate any guidance on how to resolve this issue.
I tested a subscription with my developer account, it never charges but at the same time I can't cancel it anymore. It does not appear in the list of my official purchsed subscriptions. I tried to login to the sandbox with my developer account, but then when I click on "Manage" I just keep getting the error "Can't connect - retry".
I have already tried to logout from all the services, App store, etc. and re-login, nothing worked.
Is there anything I can do?
Thanks in advance to anyone who can give any tips.
After downloading Backyard Birds and following the steps in the section "Configure the sample code project" (i.e. enabling local StoreKit testing in the scheme).
When I run the macOS app from within XCode, the following error occurs.
Whenever I try to purchase any item from within the app, I am presented with the following error dialogue:
"Couldn’t communicate with a helper application. Try your operation again. If that fails, quit and relaunch the application and try again."
This happens after I click the purchase button (i.e. the button that displays the price).
The Xcode logs show the following errors:
Error handling payment sheet request: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service created from an endpoint was invalidated from this process." UserInfo={NSDebugDescription=The connection to service created from an endpoint was invalidated from this process.}
Type: Error | Timestamp: 2025-09-26 18:05:36.214491+02:00 | Process: Backyard Birds | Library: StoreKit | Subsystem: com.apple.storekit | Category: Default | TID: 0xafed
followed by
Purchase did not return a transaction: Error Domain=ASDErrorDomain Code=5115 "Received failure in response from Xcode" UserInfo={NSDebugDescription=Received failure in response from Xcode, NSUnderlyingError=0x600001545470 {Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service created from an endpoint was invalidated from this process." UserInfo={AMSDescription=Ein unbekannter Fehler ist aufgetreten. Versuche es erneut., AMSURL=http://localhost:49244/WebObjects/MZBuy.woa/wa/inAppBuy, NSDebugDescription=The connection to service created from an endpoint was invalidated from this process., AMSStatusCode=200, AMSServerPayload={
"app-list" = (
);
dialog = {
cancelButtonString = Cancel;
defaultButton = Buy;
explanation = "Do you want to buy one Box of Nutrition Pellets for $3.99?\n\n[Environment: Xcode]";
initialCheckboxValue = 1;
"m-allowed" = 0;
message = "Confirm Your In-App Purchase";
okButtonAction = {
buyParams = "bid=com.example.apple-samplecode.Backyard-BirdsHQN4U5V5MY&bvrs=1.0&offerName=pellet.box&quantity=1&deviceVerification=0aee9116-fef7-5d20-b21b-b28848615717&storekitViewInitiated=true";
itemName = "pellet.box";
kind = Buy;
};
okButtonString = Buy;
paymentSheetInfo = {
caseControl = true;
confirmationTitle = Pay;
countryCode = US;
currency = USD;
designVersion = 2;
displayPrice = "$3.99";
flexList = (
{
value = (
{
style = priceMain;
value = "$3.99";
},
{
style = priceSub;
value = "One-time charge";
}
);
},
{
header = "$null";
value = "For testing purposes only. You will not be charged for confirming this purchase.";
}
);
price = "3.99";
requestor = AppStore;
salableIcon = "http://localhost:49244/StoreKit/AppIcon?bid=com.example.apple-samplecode.Backyard-BirdsHQN4U5V5MY";
salableIconType = app;
salableInfo = (
"Box of Nutrition Pellets %%image_0%%",
"Backyard Birds",
"In-App Purchase"
);
styles = (
{
bold = true;
name = priceMain;
size = large;
},
{
color = gray;
name = priceSub;
},
{
bold = true;
name = priceMainSpaceBefore;
size = large;
spacingBefore = medium;
}
);
title = {
type = text;
value = Xcode;
};
};
};
"download-queue-item-count" = 0;
dsid = 17322632127;
failureType = 5115;
jingleAction = inAppBuy;
jingleDocType = inAppSuccess;
pings = (
);
}}}}
Type: Error | Timestamp: 2025-09-26 18:05:36.346918+02:00 | Process: Backyard Birds | Library: StoreKit | Subsystem: com.apple.storekit | Category: Default | TID: 0xafea
I am running
Xcode Version 26.0.1 (17A400)
macOS Sequia 15.7
What I have tried so far:
created a new admin user, logged in as that user, installed Xcode and ran the Backyard Bird sample from there. Same error.
This also happens with my own app, when I am trying to test purchasing.
How can I further debug this problem?
Topic:
App & System Services
SubTopic:
StoreKit
Description of the Issue
We are encountering issues with App Store Server Notifications, where the notification type received does not align with our expectations for subscription changes. Specifically, we receive DID_RENEW notifications in scenarios involving downgrades or intra-tier upgrades, which disrupts our backend subscription management logic and may lead to incorrect user subscription states and billing errors. Below are two reproducible scenarios with associated transaction data.
Scenario 1: Downgrade from Premium Yearly (with 7-Day Trial) to Standard Yearly
Steps to Reproduce:
A user purchases the Premium Yearly subscription with a 7-day free trial (initial transaction ID: 700002116066502).
On the day before the trial ends, the user downgrades to the Standard Yearly subscription via the App Store’s subscription management interface.
Expected Behavior:
We expect to receive a DID_CHANGE_RENEWAL_STATUS or a similar downgrade notification (e.g., DID_CHANGE_RENEWAL_PREF) to indicate the subscription plan has been downgraded, enabling immediate updates to the user’s subscription status.
Actual Behavior:
Upon downgrade, our server receives a DID_RENEW notification instead of a downgrade-specific notification. This causes our system to incorrectly interpret the action as a renewal of the Premium subscription rather than a downgrade to Standard, with no subsequent downgrade confirmation received.
Relevant Transaction Data:
New Transaction ID: 700002122810952
Notification Type: DID_RENEW
Notification UUID: 26de9b0e-5d61-4893-b679-0bd18ae3d208
Original Transaction ID (Trial): 700002116066502
Scenario 2: Intra-Tier Upgrade from Standard Monthly to Standard Yearly
Steps to Reproduce:
A user purchases the Standard Monthly subscription.
On the day before the monthly subscription expires, the user switches to the Standard Yearly subscription via the App Store’s subscription management interface.
Expected Behavior:
The original Monthly subscription expires normally, with a DID_EXPIRE notification received.
Upon expiration, we expect a DID_RENEW or SUBSCRIBED notification for the new Yearly subscription to confirm its activation, allowing seamless transition of the user’s subscription plan.
Actual Behavior:
Immediately after the upgrade, our server receives a DID_RENEW notification for the new Yearly plan.
No further notifications are received, including no DID_EXPIRE for the original Monthly subscription. This leaves our system unable to confirm the expiration of the Monthly plan, potentially resulting in duplicate active subscriptions in our records.
Relevant Transaction Data:
Transaction ID: 70002902074491
Notification Type: DID_RENEW
Notification UUID: 3d35bc2f-e769-4549-bf50-d84d41b10342
Impact
These notification discrepancies disrupt our subscription lifecycle management, potentially causing incorrect user entitlements, over-billing, and a degraded user experience.
Requested Assistance
Please confirm the correct notification types for these scenarios as per Apple’s documentation (e.g., App Store Server Notifications V2).
Provide guidance on handling these edge cases, including any recent changes to notification logic.
If this is a backend issue, please investigate the provided transaction IDs and Notification UUIDs.
Thank you for your prompt assistance. We look forward to your response to help resolve this issue for our users.
问题描述:
我们在处理 App Store 订阅变更通知时发现,服务器接收到的通知类型与预期不符,具体表现为降级或同级升级场景下错误接收到 DID_RENEW 通知。这影响了我们后端订阅管理的逻辑,可能导致用户订阅状态和计费出现偏差。以下是两个可重现的场景及相关交易数据。
场景 1:高级年费(含 7 天试用)降级至标准年费
重现步骤:
用户购买高级年费订阅并开启 7 天免费试用(初始交易 ID:700002116066502)。
在试用期结束前一天,用户通过 App Store 的订阅管理界面降级至标准年费订阅。
预期行为:
我们预期会收到 DID_CHANGE_RENEWAL_STATUS 或类似的降级通知(如 DID_CHANGE_RENEWAL_PREF),以表明订阅计划已降级,从而允许我们立即更新用户订阅状态。
实际行为:
降级后,服务器立即收到 DID_RENEW 通知,而非降级相关通知。这导致系统误认为高级订阅仍在续订,而非降级为标准订阅,且后续未收到任何降级确认通知。
相关交易数据:
新交易 ID:700002122810952
通知类型:DID_RENEW
通知 UUID:26de9b0e-5d61-4893-b679-0bd18ae3d208
原始交易 ID(试用):700002116066502
场景 2:标准月费订阅升级为标准年费订阅
重现步骤:
用户购买标准月费订阅。
在月费订阅到期前一天,用户通过 App Store 的订阅管理界面切换至标准年费订阅。
预期行为:
原月费订阅正常到期,预期收到 DID_EXPIRE 通知。
月费到期后,预期收到新年费订阅的 DID_RENEW 或 SUBSCRIBED 通知,以确认年费订阅开始,方便我们无缝切换用户订阅计划。
实际行为:
升级后,服务器立即收到新年费订阅的 DID_RENEW 通知。
后续未收到任何通知,包括原月费订阅的 DID_EXPIRE 通知。这导致我们无法确认月费订阅的到期状态,可能在记录中出现重复的活跃订阅。
相关交易数据:
交易 ID:70002902074491
通知类型:DID_RENEW
通知 UUID:3d35bc2f-e769-4549-bf50-d84d41b10342
影响:
这些通知异常干扰了我们的订阅生命周期管理,可能导致用户权益错误、潜在的重复计费以及用户体验下降。
请求协助:
请确认根据 Apple 文档(例如 App Store Server Notifications V2)在上述场景中应返回的正确通知类型。
请提供处理此类边缘场景的指导,包括通知逻辑的任何最新变更。
如果这是后端问题,请调查提供的交易 ID 和通知 UUID。
感谢您的及时协助,期待您的回复以帮助我们为用户解决问题。
I tried to apply a promotional offer to a subscribed user.
When I tested it in the Sandbox environment, it did not show the promotional payment popup but returned a “restored” status.
However, when I tested it in the Xcode environment, it correctly displayed the payment popup, but after I tapped the Subscribe button, it showed an “Unable to Purchase” popup like this:
And in the console I could see this error:
Received error that does not have a corresponding StoreKit Error: Error Domain=AMSErrorDomain Code=305 "Server Error The server encountered an error" UserInfo={AMSURL=http://localhost:56862/WebObjects/MZBuy.woa/wa/inAppBuy, AMSDescription=Server Error, NSDebugDescription=Server Error The server encountered an error, AMSServerErrorCode=3903, AMSStatusCode=200, AMSServerPayload={
"cancel-purchase-batch" = 1;
dialog = {
defaultButton = ok;
explanation = "Contact the developer for more information.\n\n[Environment: Xcode]";
initialCheckboxValue = 1;
"m-allowed" = 0;
message = "Unable to Purchase";
okButtonString = OK;
};
dsid = 17322632127;
failureType = 3903;
jingleAction = inAppBuy;
jingleDocType = inAppSuccess;
pings = (
);
}, AMSFailureReason=The server encountered an error}
Could someone help me resolve this issue? I’ve been struggling with it for two days and feeling exhausted...
Use the following method to fetch:
let appProducts = try await Product.products(for: productIdentifiers)
The following checks have been carried out
✅ Must-check points
App ID capabilities
Subscription product status (ready to submit)
Why The result is an empty array?
Hello All,
We continue to receive post backs for campaigns which were run 6 months back. Our understanding is post back window is only 3 months, so checking to see if this is expected or any documentation will help. We are on SKAN4.0
Topic:
App & System Services
SubTopic:
StoreKit
Hello.
I have setup a StoreKit testing in the app that was and still is perfectly working on iOS 18.
Unfortunately when run on iOS 26 the following error gets printed in the console after calling Transaction.currentEntitlement(for:) method:
Failed to verify certificate chain due to client recoverable failure:
Error Domain=NSOSStatusErrorDomain Code=-67843 "“StoreKit Testing in Xcode” certificate is not trusted" UserInfo={NSLocalizedDescription=“StoreKit Testing in Xcode” certificate is not trusted, NSUnderlyingError=0x109de7e10 {Error Domain=NSOSStatusErrorDomain Code=-67843 "Certificate 0 “StoreKit Testing in Xcode” has errors: Root is not trusted;" UserInfo={NSLocalizedDescription=Certificate 0 “StoreKit Testing in Xcode” has errors: Root is not trusted;}}}
I'm not seeting any StoreKit Testing certificates in phone's certificate trust settings.
This test was performed on iOS 26.0 (23A341) with app built in Xcode 16.4.
FB20339145
I am developing and testing Apple Promotional Offers and encountered issues during implementation.
Purchase Failure
When using the following API, the promotional purchase sheet is displayed, but after attempting payment, the transaction fails.
API:
public static func promotionalOffer(
offerID: String,
keyID: String,
nonce: UUID,
signature: Data,
timestamp: Int
) -> Product.PurchaseOption
Observed behavior:
Alert shows:
Unable to Purchase [Environment: Xcode]
Not Eligible for Offer
Console logs:
AMSErrorDomain Code=305
ASDErrorDomain Code=3903
Discount Not Applied
When calling this API, there are no errors, but the promotional price is not applied, and the user still sees the original price.
API:
public static func promotionalOffer(
_ offerID: String,
compactJWS: String
) -> [Product.PurchaseOption]
Questions
Does Promotional Offers support testing with .storekit files in Xcode?
Can Promotional Offers be tested with sandbox accounts using real offers configured in App Store Connect?
How should I troubleshoot and resolve the above issues?
• Could it be related to the subscription history of the sandbox account?
• Do I need to use TestFlight instead of Xcode to test certain scenarios?
• Could this be caused by signature parameters or StoreKit configuration?
I am attempting to test non-consumable sandbox purchases, however I am unable to select the "Approve Transaction" option after initiating a purchase. Leaving the transaction in a permanent pending state. I can view the transaction in the transaction manager by navigating to Debug -> Storekit -> Manage Transactions.. but the only available options to select are "Refund Transaction" or "Delete Transaction".
What am I missing about Xcode or my environment that is preventing me from testing this purchase flow?
Some more information about my set up.
I have a .storekit file synced to AppStore Connect with my product Id.
There's a StoreKitTestCertificate.cert saved in the project.
I've tried running the build on my phone as Debug, Release and ReleaseForRunning all with the same behavior after making a purchase.
My phone is logged into a sandbox test user apple account in the developer iOS settings
Hi All
i have developed an app but when I go to download the paywall appears as it’s subscription only but it shows no prices for the subscription I get an endless swirl.
I checked the product id etc and it’s correct but the subcription on my App Store Connect shows as approved. is there another status it needs to reach before it becomes like like ready for sale?
https://apps.apple.com/gb/app/gameaware-pro/id6751592563
Hello!
We are implementing consumable IAP for iOS using StoreKit 2 together with our own server backend.
Our happy path looks like this:
1. Call /prepare on our server
• We only allow one purchase at a time, so this fails if a pending transaction already exists.
2. Call /purchase via StoreKit
3. If successful, call /complete on our server
4. Call .finish() on the Transaction
⸻
The Problem
Some users report being charged by Apple but not receiving coins.
I suspect this happens in rare cases where the purchase flow throws an exception:
• Every time we throw, we immediately cancel the transaction on our server.
• However, some errors may actually be temporary. StoreKit seems to recover by later sending an update through Transactions.updates.
• When that happens, since the transaction was already canceled on our server, we cannot match it. As a result, we just call .finish() without granting consumables.
⸻
Additional Observations
From user logs, the issue tends to appear when the following errors are reported:
• リクエストを完了できません。
• Triggered by: StoreKit.notEntitled
• Triggered by: StoreKit.unknown
• ヘルパーアプリケーションと通信できませんでした。
I was not able to reproduce the last one, even when testing all possible StoreKit configuration errors. Some sources suggest this may be a rare case where the app cannot communicate with the App Store itself.
Additionally, affected users often seem to be using non-standard payment methods (PayPay, gift cards, carrier billing, etc.) rather than credit cards.
⸻
My Question
What is the best practice for handling StoreKitError and PurchaseError?
Specifically:
• Should some of these errors be treated as temporary instead of final?
• How should we ensure users always receive their consumables in such cases?
⸻
Code
do {
let result = try await wrapper.product.purchase()
switch result {
case .success(let result):
let transaction = try StoreKitVerifier.checkVerified(result)
let iOSPurchase = IOSPurchase(transaction: transaction, jws: result.jwsRepresentation)
return .Success(purchase: iOSPurchase)
case .userCancelled:
return .Canceled()
case .pending:
return .Pending()
@unknown default:
return .Error(
message: "Purchase result doesn't match with anything. This must not be executed")
}
} catch {
return .Error(message: error.localizedDescription)
}
I use [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]. Works on my App which is in the store (compiled pre-iOS 26).
If I compile the same App now, same codebase with Xcode Version 26.0, restore does not work. Nothing happens. Tested on real device (iOS 26).
Documentation says its deprecated, but my deployment target is iOS 12.
Anyone has similar issues? Any recommendations?
Topic:
App & System Services
SubTopic:
StoreKit
We’ve been approved for the Advanced Commerce API and are setting up the generic product identifiers per the guide:
https://developer.apple.com/documentation/advancedcommerceapi/setting-up-your-project-for-advanced-commerce#Set-up-generic-product-identifiers
We have multiple auto-renewable subscriptions (for simplicity: Product 1, Product 2, etc.). We created a new subscription group for Advanced Commerce and are about to add the subscription(s) inside that group.
Should we create one auto-renewable subscription (generic, e.g. subscription.ac) to represent all of our subscriptions, or one generic per product family (e.g., product1.ac, product2.ac, …)? If the answer depends on whether subscribers can hold multiple products simultaneously, please advise which structure supports that (e.g., separate groups).
Reporting identifiers / segmentation: In Sales and Trends and Payments & Financial Reports, which identifier(s) will appear after migration: the legacy StoreKit product_id, the new generic product id, and/or the SKU? If we use a single generic subscription for all products, what’s Apple’s recommended way to segment revenue by product (Product 1 vs. Product 2)? If SKUs don’t surface in these reports, should we prefer multiple generics/groups to preserve report-level segmentation?
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
In-App Purchase
Advanced Commerce API