StoreKit Test

RSS for tag

Create and automate tests in Xcode for your app's submission and in-app purchase transactions.

Posts under StoreKit Test tag

200 Posts

Post

Replies

Boosts

Views

Activity

In-App Purchase Resources
General: Forums topic: StoreKit Forums tag: In-App Purchase App Store Pathway Simple and safe In-App Purchases Auto-renewable subscriptions In-App Purchase documentation Getting started with In-App Purchase using StoreKit views documentation Supporting business model changes by using the app transaction documentation Testing at all stages of development with Xcode and the sandbox documentation App Store Server Notifications documentation App Store Server API documentation Simplifying your implementation by using the App Store Server Library documentation TN3185: Troubleshooting In-App Purchases availability in Xcode technote TN3186: Troubleshooting In-App Purchases availability in the sandbox technote TN3188: Troubleshooting In-App Purchases availability in the App Store technote Understanding StoreKit workflows sample code Implementing a store in your app using the StoreKit API sample code What’s new in StoreKit and In-App Purchase video
0
0
1.5k
Jun ’26
TestFlight 沙盒中 StoreKit 2 的 `Product.products(for:)` 对两个非消耗型内购持续返回空数组
大家好,我正在排查一个 TestFlight 沙盒环境中的 StoreKit 2 商品加载问题,希望获得建议。 一、现象 iOS App 通过 TestFlight 安装(Build 4)后,使用 Product.products(for:) 请求两个非消耗型内购项目。调用不会抛出错误,但始终返回空数组,因此购买页没有任何可购买商品。 products = try await Product.products(for: [ "com.shidan.qieting.plus.trial.7day", "com.shidan.qieting.plus.lifetime" ]).sorted { $0.id < $1.id } 两个 Product ID 分别为: Product ID 类型 价格 App Store Connect 状态 com.shidan.qieting.plus.trial.7day 非消耗型 Tier 0 / US$0.00 可供审核 com.shidan.qieting.plus.lifetime 非消耗型 US$5.99 可供审核 二、日志 在 TestFlight App 冷启动后,诊断日志记录: 2026-09-03T08:12:08Z [settings] plus products loaded: trialAvailable=false, lifetimeAvailable=false 打开购买页时再次调用,结果仍然为空。没有捕获到 StoreKit 异常,也没有购买流程报错。 三、系统级沙盒验证结果 为排除 App UI 和 StoreKit 商品加载代码的影响,我们还使用同一开发团队创建的 Sandbox Apple Account,在 iOS 的“设置 > 开发者 > Sandbox Apple Account > 管理 > Test Transactions”中直接测试: Bundle ID:com.shidan.qieting Product ID:com.shidan.qieting.plus.lifetime 系统提示:“提供的产品 ID 或套装 ID 无效”。该工具不经过 App 内的购买页或 Product.products(for:) 结果,仍无法识别这组 Bundle ID 与 Product ID。 四、已完成核验 代码中的 Product ID 与 App Store Connect 中的 Product ID 完全一致。 Release Bundle ID 与 App Store Connect App Record 一致,均为 com.shidan.qieting。 App ID 为显式 ID,不是 wildcard App ID。 Certificates, Identifiers & Profiles 中已启用 In-App Purchase capability;Xcode Target 也已启用,Xcode Cloud 使用自动签名。 TestFlight 使用 Archive 构建;共享 Scheme 的 ArchiveAction 没有 StoreKit Configuration 文件。本地 .storekit 文件只用于 Xcode Run/Test,本身不影响 Archive/TestFlight。 两个项目均已设置价格、175 个 App Store 地区可售,以及简体中文、繁体中文、英语本地化。 最后一次修改 IAP 元数据已经超过 48 小时。 Paid Apps Agreement、税务信息和银行信息均为有效/正在使用中。 尚未提交 App 或 IAP 审核;理解为 TestFlight 沙盒测试不应以提交审核为前提。 欧盟《数字服务法》(DSA)交易商合规信息仍在审核中;但该要求针对欧盟 App Store 产品页的交易商信息。Apple 官方说明中,单独通过 TestFlight 分发不属于在欧盟 App Store 以交易商身份分发,因此这不应影响 TestFlight 沙盒或 Test Transactions。 五、想请教 在上述条件已确认、Product.products(for:) 不报错却返回 [] 的情况下,是否还有容易遗漏的 App Store Connect、沙盒、签名或 TestFlight 配置? 是否有人遇到过“所有 Product ID 均正确、商品完整且全球可售,但 TestFlight 沙盒始终返回空数组”的情况?如果这是 Apple 沙盒端的已知延迟或异常,有什么进一步的排查或反馈渠道? 我可以按需要补充已打码的 App Store Connect 配置截图和完整诊断日志。谢谢。
3
0
418
1w
Build behaving differently in testflight compared to simulator
Hi all I have an app I’m pretty much done with, and on the Xcode simulator it works perfectly and the IAP shows us when the purchase buttons are clicked but for some reason when it goes to testflight none of the buttons respond, is there any reason that would cause it to behave differently in testflight when its coded correctly and works in the simulator. thanks
0
0
148
1w
Storekit Returns 0 product identifier in product Array.
Am same facing Storekit issue 0 product returns in Product identifier Array. Even i test on device it returns invalid product identifier due to 0 product array. Issue Description Step 1 Create a new Auto-Renewable Subscription from the App Information page in App Store Connect. Step 2 Complete all the required fields for the Auto-Renewable Subscription and click the "Save" button. Expected Result After saving, the subscription status should change from "Prepare for Submission" to "Ready to Submit". Actual Result The subscription status remains "Prepare for Submission" and does not change to "Ready to Submit", even though all required information has been completed and the subscription has been saved. I am currently facing a critical issue while creating an Auto-Renewable Subscription in "App Store Connect". I have already completed all the required subscription details. However, whenever I click the "Save" button, the subscription status does not change from "Prepare for Submission" to "Ready to Submit", as expected. Because the subscription never reaches the "Ready to Submit" state, every purchase attempt in the Sandbox environment fails with the following error: SKErrorDomain Code = 3 "Invalid Product Identifier" To troubleshoot the issue, I have already: Created multiple new Product Identifiers, but every identifier is reported as "invalid" in the Sandbox environment. Verified that my "Banking, Tax, and Paid Applications Agreement" is complete and active. Confirmed that all required fields for the Auto-Renewable Subscription have been filled in before saving. Since I am unable to submit the subscription for review and all Product Identifiers remain invalid, I believe there may be an issue with my App Store Connect configuration or account. I would appreciate it if you could investigate this issue and help resolve it as soon as possible, as it is currently blocking the implementation and testing of in-app purchases.
1
0
682
1w
WKWebView IAP message handler works in Simulator but not TestFlight
Hi, I’m having an issue with an in-app purchase implementation using StoreKit and a WKWebView. The app uses a WKWebView with a WKScriptMessageHandler registered with the name "iap" to communicate between JavaScript and the native Swift code. The implementation works correctly when running the app through Xcode Simulator. The IAP buttons trigger the expected native code and the bridge functions correctly. However, when I install the same/latest build through TestFlight, the IAP functionality does not work as expected. The buttons/JavaScript-to-native communication do not appear to trigger the same way they do in the Simulator. The IAP products and configuration have been set up in App Store Connect. I have already checked the implementation and confirmed that the same code works when running from Xcode. Could there be any difference between Simulator and TestFlight regarding: StoreKit sandbox/TestFlight behaviour Entitlements or signing App Store Connect configuration WKWebView/WKScriptMessageHandler behaviour JavaScript-to-native communication in a TestFlight build Any required configuration for IAP testing through TestFlight I would appreciate any guidance on what I should check to determine why the "iap" WKScriptMessageHandler works in Simulator but not in TestFlight. Thanks.
0
0
234
1w
Sandbox testing - Clear Purchase History
Hi, Overview I have an app for which I have created a sandbox account. When I try to clear purchase history it doesn't work, it still shows the in-app purchase items (non-consumable in-app purchases) as purchased. I have tied tried the following ways, but none of them work. Any help on this would be much appreciated! Attempt 1: Go to https://appstoreconnect.apple.com/ Users and Access > Sandbox Check sandbox account > Tap Clear Purchase History button Attempt 2: Go to the iPhone > Settings > Developer > Sandbox Apple Account Tap on account > Manage > Clear Purchase History Attempt 3: Sign out of Sandbox account and sign back in Attempt 4: Delete app and re-run app from Xcode
5
4
836
2w
App Review sandbox: revenuecat product loads, then STORE_PROBLEM followed by PRODUCT_NOT_AVAILABLE_FOR_PURCHASE on iPadOS 26.6
Hello, I am investigating an intermittent In-App Purchase failure that occurred during App Review for the first release of my app. Environment Review device: iPad Air 11-inch (M3) OS: iPadOS 26.6 Environment: App Review sandbox Product type: Consumable StoreKit integration: RevenueCat through react-native-purchases 10.4.3 Observed behavior StoreKit successfully returned the products, localized names, and prices. The reviewer could see the credit packs and initiate the native purchase flow. My diagnostics show this sequence: Purchase initiated PURCHASE_CANCELLED; no transaction evidence Purchase initiated again RevenueCat code 2: STORE_PROBLEM elapsed: 9.4 seconds no transaction evidence Purchase initiated again RevenueCat code 5: PRODUCT_NOT_AVAILABLE_FOR_PURCHASE no transaction evidence Purchase initiated again RevenueCat code 5: PRODUCT_NOT_AVAILABLE_FOR_PURCHASE elapsed: 0.6 seconds no transaction evidence code-block The relevant sanitized logs are: { "occurredAt": "2026-08-25T12:52:59.733Z", "platform": "ios", "appVersion": "1.0.0", "build": "14", "productId": "HIDDEN_FOR_DISPLAY", "stage": "STORE_CHECKOUT", "providerCode": "2", "providerReadableCode": "STORE_PROBLEM", "transactionEvidence": false, "elapsedMs": 9417 } code-block { "occurredAt": "2026-08-25T12:55:42.752Z", "platform": "ios", "appVersion": "1.0.0", "build": "14", "productId": "HIDDEN_FOR_DISPLAY", "stage": "STORE_CHECKOUT", "providerCode": "5", "providerReadableCode": "PRODUCT_NOT_AVAILABLE_FOR_PURCHASE", "transactionEvidence": false, "elapsedMs": 637 } code-block No App Store transaction was created, and therefore RevenueCat received no transaction or webhook for these attempts. Configuration verified I confirmed that: The affected product and the other consumable products are attached to the App Review submission. Product IDs match between the app, App Store Connect, and RevenueCat. Prices and localizations are configured. The products are available in the relevant storefronts. The Paid Apps Agreement is active. Banking and tax information are active. The In-App Purchase capability is present. The distribution build does not use a local StoreKit configuration file. The same build and affected product completed successfully afterward on a physical device using Apple Sandbox. The native purchase sheet opened, the transaction completed, and the consumable content was delivered successfully in my reproduction. The product metadata clearly remained available because its localized name and price were displayed. However, after the initial STORE_PROBLEM, subsequent purchase requests were rejected almost immediately as PRODUCT_NOT_AVAILABLE_FOR_PURCHASE. I do not have the underlying Apple NSError, such as an ASDServerErrorDomain or AMSErrorDomain value, because it was not exposed in my remote diagnostic record. Questions Can a failed sandbox transaction leave the StoreKit account/session or commerce-catalog state temporarily inconsistent, causing subsequent requests for an otherwise loaded product to return storeProductNotAvailable? Does StoreKit use separate metadata and transaction-eligibility services, allowing product information to load while the same product is rejected during purchase()? Are there known sandbox or StoreKit issues on iPadOS 26.6 that could produce this sequence? Could a stale App Review sandbox account token or storefront session explain the transition from STORE_PROBLEM to PRODUCT_NOT_AVAILABLE_FOR_PURCHASE? Is there any developer-side configuration that could explain this when the same product and binary complete successfully using another sandbox session? What additional logging should I capture from RevenueCat’s React Native SDK to preserve the complete underlying Apple error chain?
2
0
461
2w
StoreKit 2 transaction verification fails during App Review with localized error 「資訊對裝置無效」; how should our app handle this?
We are implementing in-app purchases using StoreKit 2. The issue we need guidance on is how our app should correctly handle a StoreKit 2 transaction that becomes .unverified during Apple App Review. In our local development testing, purchases work correctly. When we test the same IAP products locally, the transaction returned from Product.purchase() is .verified, and the purchase flow completes successfully. However, during Apple App Review, the reviewer appears to encounter a failure where the StoreKit 2 transaction is returned as .unverified on the client side. The original localized error message shown is in Traditional Chinese: 「資訊對裝置無效」 Our English translation of this message is: “The information is not valid for this device.” Because the message is localized, we are not sure what the exact original English StoreKit error string would be. This failure happens in the client app before our backend receipt or server-side validation flow. We are not using verifyReceipt for this step. The failure occurs at the StoreKit 2 VerificationResult level when checking the transaction returned by StoreKit. Our current implementation only accepts .verified transactions. If StoreKit 2 returns .unverified, we treat the transaction as failed and do not unlock the purchased content. We believe this is the recommended secure behavior, but we would like to confirm the correct handling, especially because this issue is appearing during App Review while our local development purchases succeed. Additional context: • Distribution/review context: App Review / IAP review • API: StoreKit 2 • Failure point: VerificationResult returned as .unverified • Localized error message: 「資訊對裝置無效」 • Rough English translation: “The information is not valid for this device.” • Local development testing: purchases return .verified and succeed • The issue occurs before backend validation • Our app currently rejects .unverified transactions and does not unlock content Questions: What are the known causes of StoreKit 2 returning .unverified with the localized error message 「資訊對裝置無效」 during App Review? Is our current behavior correct: only unlock content for .verified transactions and reject .unverified transactions? If App Review receives .unverified, what should the app do from Apple’s recommended perspective? Should we show a retry/error message, ask the reviewer to retry, refresh entitlements, or take another action? Is there any App Review environment, device configuration, Apple ID configuration, or StoreKit account state that can cause this device-related verification error? Since local development purchases succeed but App Review fails, what diagnostics or logs should we collect and provide to identify the root cause? Should we ever bypass StoreKit 2 transaction verification in App Review/TestFlight, or should .unverified always be treated as a failed transaction? We would appreciate guidance on the correct code-level handling so that our app remains secure while also passing App Review reliably. Thank you.
1
0
214
2w
Storekit, how to change and retrieve current user storefront
I've been struggling to work with the Storekit framework and specifically to find the current Storefront used by the user of the app. Context : My app needs to behave differently depending on the country of the user. For me relying on Locale.current.region?.identifier does not seem very reliable, the user can change it really easily. I'm trying to use the Storekit framework like so : if let storefront = await StoreKit.Storefront.current{ return storefront.countryCode } As per Apple's Storekit documentation : Use current to determine a customer's current storefront region and offer in-app products suitable for that region. You maintain your own list of product identifiers and the storefronts in which you make them available. But I just can't find out what I need to change in my current configuration to get another country. The code keeps returning my original storefront (which is France) I've tried login in with a sandbox user defined on another country. Changed all settings on my device to another country. Changed my Apple's account region as described here. Also tried to logout from everything. The only thing that works is setting a local .storekit file as described here and changing the default storefront. Is Xcode overriding the default storefront when building on debug or TestFlight? does anyone know how can I test different storefronts with sandbox users without the local storekit file ? Thank you in advance.
5
2
1.4k
2w
Unable to enable eligibility for External Purchase Link APIs — seeking clarification
Hello, I am currently implementing External Purchase Link and External Purchase Custom Link and am encountering an issue where both ExternalPurchaseLink.canOpen and ExternalPurchaseCustomLink.isEligible always return false under all test conditions. I would like to confirm whether my setup is missing any required steps or whether this behavior is expected. Below are the details of my current environment and configuration: 🔧 1. Development Environment Xcode: 16.3, 16.4, 26.0 beta 4 Devices: iPhone running iOS 26.2 beta iPhone running iOS 16.7.12 macOS 15.5 (real device testing) Simulator iOS 18.0 Build Type: Local development build using a Developer Provisioning Profile Sandbox account signed in during testing 🔑 2. Entitlements (Developer site & Xcode) In Certificates → Identifiers → App ID, both capabilities are enabled: StoreKit External Purchase StoreKit External Purchase Link The .entitlements file in Xcode includes: com.apple.developer.storekit.external-purchase = YES com.apple.developer.storekit.external-purchase-link = YES The Provisioning Profile also contains both entitlements (confirmed via codesign -d --entitlements :-). 📄 3. Info.plist Configuration Both keys are configured with correct region codes according to documentation: SKExternalPurchase SKExternalPurchaseCustomLinkRegions 🌍 4. Test Storefront Device storefront verified as United States (US) or Portugal (PT) (US = target region for External Purchase Link, PT = EU region) But despite all the above configuration, both API calls consistently return false: ExternalPurchaseLink.canOpen // false ExternalPurchaseCustomLink.isEligible // false So I cannot proceed to testing the remaining flow (token retrieval, link opening, etc.) ------ Questions ------ ❓ Q1) Local Development Build Limitation Is it expected behavior that Developer-signed local builds always return canOpen = false / isEligible = false for External Purchase Link & Custom Link? Is there a technical or policy restriction that prevents eligibility in local dev builds? ❓ Q2) App Store Connect Configuration Requirement Are there mandatory App Store Connect settings (such as external purchase URLs, support URL, disclosures, or country configuration) that must be enabled before eligibility becomes true? Currently, no External Purchase Link or Custom Link menu is visible in my App Store Connect app settings. Is this menu only available after certain approvals or under specific conditions? ❓ Q3) TestFlight Requirement Do External Purchase Link and Custom Link only return eligibility = true on: TestFlight builds, or Distribution-signed builds? Or should eligibility also work on developer builds? Formal confirmation would be helpful. ❓ Q4) Developer Account Type Limitation We are using an Individual Developer Account (not Organization). Can Individual accounts fully request, test, and ship apps using: External Purchase Link External Purchase Custom Link Or are there limitations on account type? 🙏 Request We have completed all documented setup steps (Entitlements → Provisioning → Info.plist), but eligibility remains false, blocking feature validation. Please clarify which of the following is the cause: Local development builds do not support eligibility Missing App Store Connect configuration (not visible to us) Account type restriction Region rollout or entitlement approval requirement Any additional setup not documented publicly Thank you for your assistance.
3
1
833
3w
App approved and released, but auto-renewable subscriptions remain "Waiting for Review" and StoreKit returns no products
M y app was approved and is now live on the App Store, but all four auto-renewable subscriptions are still Waiting for Review in App Store Connect. Because of this, the production app's StoreKit 2 call to Product.products(for:) returns 0 products, and users see: "No subscription products were returned by the App Store." There are no metadata errors or warnings—only Waiting for Review. My questions are: Is it normal for an app to be released before its subscriptions are approved? While subscriptions are in Waiting for Review, is it expected that Product.products(for:) returns an empty array? Has anyone experienced this, and how long did it take for the subscriptions to be approved after the app was already live? I've attached: App Store Connect screenshot showing all four subscriptions in Waiting for Review. App screenshot showing the "No subscription products were returned by the App Store." message. Any insight would be greatly appreciated. Thanks!
1
0
705
Aug ’26
Transaction.currentEntitlements returning NULL values
Hi, Overview In my project I am using a .storekit StoreKit configuration file that is synced. I have only non-consumable products Problem When I loop through Transaction.currentEntitlements after verification the properties such as transaction.productType are all NULL. Note I have called .finish on the transaction after the following: Processing Transaction.updates Processing purchasing a new product Environment: Xcode 27 Beta 5 iOS 26.6 Questions How can I resolve this? Am I missing something? Should I be using Transaction.latest(for:) instead of Transaction.currentEntitlements?
0
0
321
Aug ’26
StoreKit 2: products load with correct prices but purchase fails immediately with "Item Unavailable" (app not yet approved)
Our app sells two auto-renewable subscriptions. Product loading succeeds and returns both products with correct localized prices, but every purchase attempt fails roughly one second later with "Item Unavailable". No purchase sheet is ever presented to the user. The app has not yet passed its first App Review. It was rejected under Guideline 2.1(b) because the reviewer encountered this same error on their device. MY QUESTION Under what conditions does StoreKit reject a purchase with "Item Unavailable" for a product that has just been returned successfully, with a valid localized price, by a product request? Is an auto-renewable subscription transactable in the sandbox environment for an app that has never had a binary approved by App Review? Question 2 is the one I most need answered. App Review's rejection states that In-App Purchase products "do not need prior approval to function in review", but neither we nor the reviewer can transact them. DIAGNOSTIC LOG Captured on-device during a failing session: 01:08:56 fetchProducts [com.aurascanner.app.pro.weekly, com.aurascanner.app.pro.annual] 01:08:56 fetchProducts -> 2 product(s): com.aurascanner.app.pro.annual=$39.99; com.aurascanner.app.pro.weekly=$6.99 01:08:56 requestPurchase sku=com.aurascanner.app.pro.weekly 01:08:57 purchaseError: code=purchase-error msg=Item Unavailable 01:08:57 error code=purchase-error, storefront=USA 01:09:05 fetchProducts -> 2 product(s), same prices returned again 01:09:05 requestPurchase sku=com.aurascanner.app.pro.annual 01:09:06 requestPurchase threw: Item Unavailable 01:09:06 error code=purchase-error, storefront=USA An introductory-offer eligibility check earlier in the session also succeeded, using the subscription group ID read from the loaded product. So product metadata, including the subscription group, resolves correctly. CONDITIONS Fails identically for both products, on every attempt. Reproduces in TestFlight on our own devices and Apple IDs. Also failed during App Review on iPad Air 11-inch (M3), iPadOS 26.5.2. Storefront reports as USA in every case. Real devices only. Not reproduced on Simulator. ALREADY VERIFIED Paid Applications Agreement: Active, banking and tax information complete. In-App Purchase capability: enabled on the App ID at Certificates, Identifiers & Profiles. Bundle identifier com.aurascanner.app matches the App Store Connect record. Both subscriptions: complete metadata, review screenshots uploaded, USD pricing set, United States availability. Both subscriptions and the subscription group are attached to the current submission, status "Ready for Review". Subscription group has a localized display name. Build distributed via TestFlight, which routes purchases to sandbox automatically. IMPLEMENTATION The app is React Native and uses a wrapper library over StoreKit 2, but the error text originates from StoreKit rather than the wrapper, and the call order follows the documented pattern: Initialize the StoreKit connection. Load products. This succeeds and returns both products. Register transaction update and error listeners. Request the purchase. This is where it fails. Purchases are verified server-side using Apple's App Store Server Library, and the transaction is finished only after verification succeeds. I am not asking anyone to debug the wrapper. My question is about StoreKit and App Store behaviour: what causes the store to quote a product and then decline to sell it? Any pointers appreciated. I can supply screenshots or the full log.
2
1
1k
Aug ’26
Transaction.currentEntitlements sometimes does not emit a result until device is reboot
I have the typical StoreKit 2 manager class, where I check currentEntitlements for subscription. I have filed a feedback (FB22349195), I hope someone can take a look at it. func updateCustomerProductStatus() async { var activeSubscription: String? = nil // BUG: In some cases the currentEntitlements does not emit a transaction until the device is reboot for await result in Transaction.currentEntitlements { print("Found transaction: \(result)") // This print does not appear until a restart! do { let transaction = try checkVerified(result) // Skip revoked transactions if transaction.revocationDate != nil { print("Skipping revoked transaction for \(transaction.productID)") continue } // Skip expired subscriptions if let expirationDate = transaction.expirationDate, expirationDate < Date() { print("Skipping expired subscription for \(transaction.productID)") continue } // Check product type switch transaction.productType { case .autoRenewable: activeSubscription = transaction.productID default: break } } catch { print("Unable to verify transaction: \(error)") } } // Update state once after processing all entitlements self.activeSubscription = activeSubscription print("updateCustomerProductStatus() activeSubscription: \(activeSubscription ?? "nil")") } There is some unexpected behavior where the currentEntitlements does not emit a result until the iPhone device is reboot. This bug appeared in iOS 26.4 (and in the betas).
3
3
1.3k
Aug ’26
401 Unauthorized When Requesting Sandbox Test Notification Using app-store-server-library-java 5.2.0
I am using app-store-server-library-java:5.2.0. Following the official guide video, I downloaded and configured all required credentials, including the Key ID, Issuer ID, private key (.p8 file), and Bundle ID. However, when I try to send a test notification in the Sandbox environment, the request consistently returns a 401 Unauthorized error without any additional error message or details. One difference from the guide is how I handle the private key file. The guide reads the .p8 file directly from a file path on the server. In my environment, I cannot store external files on the server, so I Base64-encode the contents of the .p8 file, store it as an environment variable, and then decode it back to its original content before initializing the App Store Server API client. As far as I can tell, the decoded content matches the original key file exactly, but I am wondering whether this approach could cause any issues with authentication or JWT generation. Are there any additional prerequisites, permissions, agreements, or configuration steps that must be completed before this feature can be used? I have spent a significant amount of time troubleshooting this issue, but I have been unable to identify the root cause from the available documentation or error responses. Any guidance or suggestions would be greatly appreciated. Thank you for your help. Additional information: Library: app-store-server-library-java 5.2.0 Environment: Sandbox Credentials configured: Key ID, Issuer ID, Bundle ID, Private Key (.p8) Private key handling: Base64 encoded in environment variables, then decoded before client initialization Result: HTTP 401 Unauthorized with no response body or error details
1
0
626
Jul ’26
Sandbox subscription purchase fails with ASDServerErrorDomain 3504
Type: Auto-renewable subscription Sandbox Storefront: USA StoreKit successfully loads the subscription product and returns its correct name and price (US$29.99). However, every purchase attempt fails: ASDServerErrorDomain Code=3504 AMSServerErrorCode=3504 "Item not found" client-environment-type=Sandbox storefront-country-code=USA This reproduces both in a TestFlight build and in iPhone Developer Settings > Test In-App Purchases. Please verify the app-product linkage and Sandbox commerce availability for this subscription product. Purchase did not return a transaction: Error Domain=ASDServerErrorDomain Code=3504 "找不到此项目。" UserInfo={storefront-country-code=USA, AMSServerErrorCode=3504, client-environment-type=Sandbox, NSLocalizedFailureReason=找不到此项目。} HKIPO-IAP 11:12:33.712 purchase error: type=StoreKit.Product.PurchaseError, domain=StoreKit.Product.PurchaseError, code=1, description=無法使用項目, failureReason=目前無法使用此項目。, underlying=nil, userInfo={}
0
1
555
Jul ’26
ASDServerErrorDomain Code 3504 when purchasing non-consumable IAP
I am experiencing an issue with a non-consumable in-app purchase in my iOS app. The product loads correctly from the App Store and is displayed in the app, but when attempting to complete the purchase, StoreKit returns the following error: Payment completed with error: Error Domain=ASDServerErrorDomain Code=3504 "This item cannot be found." UserInfo={ NSLocalizedFailureReason=This item cannot be found., AMSServerErrorCode=3504, client-environment-type=Sandbox, storefront-country-code=USA } The same issue was also encountered by the App Review tester when they attempted to purchase the non-consumable product during review. The product: Is correctly configured in App Store Connect Has active pricing Is available in the United States Was included in the app submission Loads successfully and displays the correct price Fails only when the purchase is initiated Since the product metadata can be retrieved successfully, but the transaction fails with “This item cannot be found,” this appears to be a possible inconsistency between the StoreKit product catalog and the purchase backend. Has anyone encountered ASDServerErrorDomain Code=3504 for a non-consumable product that loads correctly but cannot be purchased? Is there any known App Store sandbox or commerce backend issue that can cause this, or any additional App Store Connect configuration that should be checked?
3
0
858
Jul ’26
SKTestSession.buyProduct(identifier: options:) throws error
Hi, Overview I am trying to write a unit test case to buy a storekit product. SKTestSession.buyProduct(identifier: options:) throws the error StoreKit.StoreKitError.notEntitled Testcase Code @Test func example() async throws { let session = try SKTestSession(configurationFileNamed: "VehicleStore") session.disableDialogs = true session.clearTransactions() do { let transaction = try await session.buyProduct(identifier: "nonconsumable.car", options: []) print(transaction) } catch { // Throws StoreKit.StoreKitError.notEntitled print("Error: \(error)") } } Storekit configuration file Note In-App purchases capability is added StoreKit configuration file is used in testcase Environment: macOS 26.5.2 (25F84) Xcode 26.6 (17F113)
7
0
1.3k
Jul ’26
Sandbox Apple Account sign-in asks for phone verification, then fails with “Could not connect to iCloud”
Hi, I created a Sandbox Apple Account in App Store Connect for testing StoreKit / Age Assurance sandbox scenarios. When I try to sign in on an iPhone through: Settings -> Developer -> Sandbox Apple Account I can enter the sandbox account email/password and I successfully receive the email verification code. After entering the email verification code, iOS asks me to add/verify a phone number. When I enter the phone number, I get this error: “Could not connect to iCloud. Verification codes cannot be sent to this phone number at this time. Please try again later.” I did not set any phone number when creating the sandbox tester in App Store Connect. The sandbox tester was created with only name, email, password, and country/region. Context: iPhone has Developer Mode enabled I am signing in via Settings -> Developer -> Sandbox Apple Account I am not trying to sign in through normal iCloud / Apple Account settings The sandbox account email is not used as a normal Apple Account Email verification works Phone verification has failed for more than a day Questions: Is phone verification expected when signing in with a Sandbox Apple Account? Is there a way to use Sandbox Apple Accounts / Age Assurance sandbox scenarios without adding a trusted phone number? Does this error usually mean the phone number is rate-limited/blocked, or that the sandbox account is stuck? Should this be handled by Apple Developer Program Support instead? Thanks!
0
0
352
Jul ’26
Sandbox can purchase auto-renewable subscriptions but non-consumable IAP is always invalid
I’m testing In-App Purchases in the sandbox on a real iPhone. Auto-renewable subscriptions work correctly with the same app build, bundle ID, and sandbox tester account: com.aifalling.sides.vip.monthly com.aifalling.sides.vip.yearly However, a non-consumable product can’t be purchased: Product ID: com.aifalling.sides.vip.onetime App Store Connect IAP Apple ID: 6794812888 Type: Non-Consumable Status: Ready to Submit Bundle ID: com.aifalling.sides The native StoreKit payment request fails immediately with: The purchase identifier was invalid. The wrapper reports error code 700605. I verified the non-consumable product through the App Store Connect API: Product ID exists and is returned by the API One localization exists: zh-Hans A price schedule is configured, including a base territory and prices Availability includes China (CHN) and many other territories availableInNewTerritories is true I waited more than one hour after the latest metadata changes I completely removed the app, rebuilt/reinstalled the custom development build, and retried The same signed build can successfully purchase the two auto-renewable subscriptions This is the first non-consumable IAP type for this app. The app and IAPs have not been submitted for App Review yet because I’m trying to complete sandbox testing first. Does a non-consumable IAP require any additional App Store Connect setup or association that an auto-renewable subscription doesn’t require for sandbox testing? Is Ready to Submit sufficient for sandbox testing of a non-consumable product in this situation? Any guidance would be appreciated.
1
0
601
Jul ’26
Product.products(for:) returns one subscription group's products but not return the other
I'm stuck on this and genuinely don't know what's wrong. I have two auto-renewable subscription groups in one app. I pass all six product IDs to a single Product.products(for:) call. It succeeds, doesn't throw, and returns three products — all from group A. The three from group B just aren't in the array. No error, they're simply absent. All six show Approved in App Store Connect. [PlusStore] probe — storefront: USA [PlusStore] probe — OK ...plus.monthly (group A) [PlusStore] probe — OK ...plus.quarterly (group A) [PlusStore] probe — OK ...plus.yearly (group A) [PlusStore] probe — MISSING ...plus.founding.monthly (group B) [PlusStore] probe — MISSING ...plus.founding.quarterly (group B) [PlusStore] probe — MISSING ...plus.founding.yearly (group B) Retried three times with backoff, so it isn't cold-launch timing. I don't think it can be the Paid Applications Agreement, the sandbox account, a network failure, or a wrong bundle prefix, since group A comes back fine. I've checked the group B IDs character-for-character against the Product ID field in App Store Connect, confirmed United States is enabled with an active price and no future-dated schedule on all three, and confirmed there's no .storekit file attached to the scheme. So the only difference I can find between the two groups is the group itself.
0
0
355
Jul ’26
In-App Purchase Resources
General: Forums topic: StoreKit Forums tag: In-App Purchase App Store Pathway Simple and safe In-App Purchases Auto-renewable subscriptions In-App Purchase documentation Getting started with In-App Purchase using StoreKit views documentation Supporting business model changes by using the app transaction documentation Testing at all stages of development with Xcode and the sandbox documentation App Store Server Notifications documentation App Store Server API documentation Simplifying your implementation by using the App Store Server Library documentation TN3185: Troubleshooting In-App Purchases availability in Xcode technote TN3186: Troubleshooting In-App Purchases availability in the sandbox technote TN3188: Troubleshooting In-App Purchases availability in the App Store technote Understanding StoreKit workflows sample code Implementing a store in your app using the StoreKit API sample code What’s new in StoreKit and In-App Purchase video
Replies
0
Boosts
0
Views
1.5k
Activity
Jun ’26
TestFlight 沙盒中 StoreKit 2 的 `Product.products(for:)` 对两个非消耗型内购持续返回空数组
大家好,我正在排查一个 TestFlight 沙盒环境中的 StoreKit 2 商品加载问题,希望获得建议。 一、现象 iOS App 通过 TestFlight 安装(Build 4)后,使用 Product.products(for:) 请求两个非消耗型内购项目。调用不会抛出错误,但始终返回空数组,因此购买页没有任何可购买商品。 products = try await Product.products(for: [ "com.shidan.qieting.plus.trial.7day", "com.shidan.qieting.plus.lifetime" ]).sorted { $0.id < $1.id } 两个 Product ID 分别为: Product ID 类型 价格 App Store Connect 状态 com.shidan.qieting.plus.trial.7day 非消耗型 Tier 0 / US$0.00 可供审核 com.shidan.qieting.plus.lifetime 非消耗型 US$5.99 可供审核 二、日志 在 TestFlight App 冷启动后,诊断日志记录: 2026-09-03T08:12:08Z [settings] plus products loaded: trialAvailable=false, lifetimeAvailable=false 打开购买页时再次调用,结果仍然为空。没有捕获到 StoreKit 异常,也没有购买流程报错。 三、系统级沙盒验证结果 为排除 App UI 和 StoreKit 商品加载代码的影响,我们还使用同一开发团队创建的 Sandbox Apple Account,在 iOS 的“设置 > 开发者 > Sandbox Apple Account > 管理 > Test Transactions”中直接测试: Bundle ID:com.shidan.qieting Product ID:com.shidan.qieting.plus.lifetime 系统提示:“提供的产品 ID 或套装 ID 无效”。该工具不经过 App 内的购买页或 Product.products(for:) 结果,仍无法识别这组 Bundle ID 与 Product ID。 四、已完成核验 代码中的 Product ID 与 App Store Connect 中的 Product ID 完全一致。 Release Bundle ID 与 App Store Connect App Record 一致,均为 com.shidan.qieting。 App ID 为显式 ID,不是 wildcard App ID。 Certificates, Identifiers & Profiles 中已启用 In-App Purchase capability;Xcode Target 也已启用,Xcode Cloud 使用自动签名。 TestFlight 使用 Archive 构建;共享 Scheme 的 ArchiveAction 没有 StoreKit Configuration 文件。本地 .storekit 文件只用于 Xcode Run/Test,本身不影响 Archive/TestFlight。 两个项目均已设置价格、175 个 App Store 地区可售,以及简体中文、繁体中文、英语本地化。 最后一次修改 IAP 元数据已经超过 48 小时。 Paid Apps Agreement、税务信息和银行信息均为有效/正在使用中。 尚未提交 App 或 IAP 审核;理解为 TestFlight 沙盒测试不应以提交审核为前提。 欧盟《数字服务法》(DSA)交易商合规信息仍在审核中;但该要求针对欧盟 App Store 产品页的交易商信息。Apple 官方说明中,单独通过 TestFlight 分发不属于在欧盟 App Store 以交易商身份分发,因此这不应影响 TestFlight 沙盒或 Test Transactions。 五、想请教 在上述条件已确认、Product.products(for:) 不报错却返回 [] 的情况下,是否还有容易遗漏的 App Store Connect、沙盒、签名或 TestFlight 配置? 是否有人遇到过“所有 Product ID 均正确、商品完整且全球可售,但 TestFlight 沙盒始终返回空数组”的情况?如果这是 Apple 沙盒端的已知延迟或异常,有什么进一步的排查或反馈渠道? 我可以按需要补充已打码的 App Store Connect 配置截图和完整诊断日志。谢谢。
Replies
3
Boosts
0
Views
418
Activity
1w
Build behaving differently in testflight compared to simulator
Hi all I have an app I’m pretty much done with, and on the Xcode simulator it works perfectly and the IAP shows us when the purchase buttons are clicked but for some reason when it goes to testflight none of the buttons respond, is there any reason that would cause it to behave differently in testflight when its coded correctly and works in the simulator. thanks
Replies
0
Boosts
0
Views
148
Activity
1w
Storekit Returns 0 product identifier in product Array.
Am same facing Storekit issue 0 product returns in Product identifier Array. Even i test on device it returns invalid product identifier due to 0 product array. Issue Description Step 1 Create a new Auto-Renewable Subscription from the App Information page in App Store Connect. Step 2 Complete all the required fields for the Auto-Renewable Subscription and click the "Save" button. Expected Result After saving, the subscription status should change from "Prepare for Submission" to "Ready to Submit". Actual Result The subscription status remains "Prepare for Submission" and does not change to "Ready to Submit", even though all required information has been completed and the subscription has been saved. I am currently facing a critical issue while creating an Auto-Renewable Subscription in "App Store Connect". I have already completed all the required subscription details. However, whenever I click the "Save" button, the subscription status does not change from "Prepare for Submission" to "Ready to Submit", as expected. Because the subscription never reaches the "Ready to Submit" state, every purchase attempt in the Sandbox environment fails with the following error: SKErrorDomain Code = 3 "Invalid Product Identifier" To troubleshoot the issue, I have already: Created multiple new Product Identifiers, but every identifier is reported as "invalid" in the Sandbox environment. Verified that my "Banking, Tax, and Paid Applications Agreement" is complete and active. Confirmed that all required fields for the Auto-Renewable Subscription have been filled in before saving. Since I am unable to submit the subscription for review and all Product Identifiers remain invalid, I believe there may be an issue with my App Store Connect configuration or account. I would appreciate it if you could investigate this issue and help resolve it as soon as possible, as it is currently blocking the implementation and testing of in-app purchases.
Replies
1
Boosts
0
Views
682
Activity
1w
WKWebView IAP message handler works in Simulator but not TestFlight
Hi, I’m having an issue with an in-app purchase implementation using StoreKit and a WKWebView. The app uses a WKWebView with a WKScriptMessageHandler registered with the name "iap" to communicate between JavaScript and the native Swift code. The implementation works correctly when running the app through Xcode Simulator. The IAP buttons trigger the expected native code and the bridge functions correctly. However, when I install the same/latest build through TestFlight, the IAP functionality does not work as expected. The buttons/JavaScript-to-native communication do not appear to trigger the same way they do in the Simulator. The IAP products and configuration have been set up in App Store Connect. I have already checked the implementation and confirmed that the same code works when running from Xcode. Could there be any difference between Simulator and TestFlight regarding: StoreKit sandbox/TestFlight behaviour Entitlements or signing App Store Connect configuration WKWebView/WKScriptMessageHandler behaviour JavaScript-to-native communication in a TestFlight build Any required configuration for IAP testing through TestFlight I would appreciate any guidance on what I should check to determine why the "iap" WKScriptMessageHandler works in Simulator but not in TestFlight. Thanks.
Replies
0
Boosts
0
Views
234
Activity
1w
Sandbox testing - Clear Purchase History
Hi, Overview I have an app for which I have created a sandbox account. When I try to clear purchase history it doesn't work, it still shows the in-app purchase items (non-consumable in-app purchases) as purchased. I have tied tried the following ways, but none of them work. Any help on this would be much appreciated! Attempt 1: Go to https://appstoreconnect.apple.com/ Users and Access > Sandbox Check sandbox account > Tap Clear Purchase History button Attempt 2: Go to the iPhone > Settings > Developer > Sandbox Apple Account Tap on account > Manage > Clear Purchase History Attempt 3: Sign out of Sandbox account and sign back in Attempt 4: Delete app and re-run app from Xcode
Replies
5
Boosts
4
Views
836
Activity
2w
App Review sandbox: revenuecat product loads, then STORE_PROBLEM followed by PRODUCT_NOT_AVAILABLE_FOR_PURCHASE on iPadOS 26.6
Hello, I am investigating an intermittent In-App Purchase failure that occurred during App Review for the first release of my app. Environment Review device: iPad Air 11-inch (M3) OS: iPadOS 26.6 Environment: App Review sandbox Product type: Consumable StoreKit integration: RevenueCat through react-native-purchases 10.4.3 Observed behavior StoreKit successfully returned the products, localized names, and prices. The reviewer could see the credit packs and initiate the native purchase flow. My diagnostics show this sequence: Purchase initiated PURCHASE_CANCELLED; no transaction evidence Purchase initiated again RevenueCat code 2: STORE_PROBLEM elapsed: 9.4 seconds no transaction evidence Purchase initiated again RevenueCat code 5: PRODUCT_NOT_AVAILABLE_FOR_PURCHASE no transaction evidence Purchase initiated again RevenueCat code 5: PRODUCT_NOT_AVAILABLE_FOR_PURCHASE elapsed: 0.6 seconds no transaction evidence code-block The relevant sanitized logs are: { "occurredAt": "2026-08-25T12:52:59.733Z", "platform": "ios", "appVersion": "1.0.0", "build": "14", "productId": "HIDDEN_FOR_DISPLAY", "stage": "STORE_CHECKOUT", "providerCode": "2", "providerReadableCode": "STORE_PROBLEM", "transactionEvidence": false, "elapsedMs": 9417 } code-block { "occurredAt": "2026-08-25T12:55:42.752Z", "platform": "ios", "appVersion": "1.0.0", "build": "14", "productId": "HIDDEN_FOR_DISPLAY", "stage": "STORE_CHECKOUT", "providerCode": "5", "providerReadableCode": "PRODUCT_NOT_AVAILABLE_FOR_PURCHASE", "transactionEvidence": false, "elapsedMs": 637 } code-block No App Store transaction was created, and therefore RevenueCat received no transaction or webhook for these attempts. Configuration verified I confirmed that: The affected product and the other consumable products are attached to the App Review submission. Product IDs match between the app, App Store Connect, and RevenueCat. Prices and localizations are configured. The products are available in the relevant storefronts. The Paid Apps Agreement is active. Banking and tax information are active. The In-App Purchase capability is present. The distribution build does not use a local StoreKit configuration file. The same build and affected product completed successfully afterward on a physical device using Apple Sandbox. The native purchase sheet opened, the transaction completed, and the consumable content was delivered successfully in my reproduction. The product metadata clearly remained available because its localized name and price were displayed. However, after the initial STORE_PROBLEM, subsequent purchase requests were rejected almost immediately as PRODUCT_NOT_AVAILABLE_FOR_PURCHASE. I do not have the underlying Apple NSError, such as an ASDServerErrorDomain or AMSErrorDomain value, because it was not exposed in my remote diagnostic record. Questions Can a failed sandbox transaction leave the StoreKit account/session or commerce-catalog state temporarily inconsistent, causing subsequent requests for an otherwise loaded product to return storeProductNotAvailable? Does StoreKit use separate metadata and transaction-eligibility services, allowing product information to load while the same product is rejected during purchase()? Are there known sandbox or StoreKit issues on iPadOS 26.6 that could produce this sequence? Could a stale App Review sandbox account token or storefront session explain the transition from STORE_PROBLEM to PRODUCT_NOT_AVAILABLE_FOR_PURCHASE? Is there any developer-side configuration that could explain this when the same product and binary complete successfully using another sandbox session? What additional logging should I capture from RevenueCat’s React Native SDK to preserve the complete underlying Apple error chain?
Replies
2
Boosts
0
Views
461
Activity
2w
StoreKit 2 transaction verification fails during App Review with localized error 「資訊對裝置無效」; how should our app handle this?
We are implementing in-app purchases using StoreKit 2. The issue we need guidance on is how our app should correctly handle a StoreKit 2 transaction that becomes .unverified during Apple App Review. In our local development testing, purchases work correctly. When we test the same IAP products locally, the transaction returned from Product.purchase() is .verified, and the purchase flow completes successfully. However, during Apple App Review, the reviewer appears to encounter a failure where the StoreKit 2 transaction is returned as .unverified on the client side. The original localized error message shown is in Traditional Chinese: 「資訊對裝置無效」 Our English translation of this message is: “The information is not valid for this device.” Because the message is localized, we are not sure what the exact original English StoreKit error string would be. This failure happens in the client app before our backend receipt or server-side validation flow. We are not using verifyReceipt for this step. The failure occurs at the StoreKit 2 VerificationResult level when checking the transaction returned by StoreKit. Our current implementation only accepts .verified transactions. If StoreKit 2 returns .unverified, we treat the transaction as failed and do not unlock the purchased content. We believe this is the recommended secure behavior, but we would like to confirm the correct handling, especially because this issue is appearing during App Review while our local development purchases succeed. Additional context: • Distribution/review context: App Review / IAP review • API: StoreKit 2 • Failure point: VerificationResult returned as .unverified • Localized error message: 「資訊對裝置無效」 • Rough English translation: “The information is not valid for this device.” • Local development testing: purchases return .verified and succeed • The issue occurs before backend validation • Our app currently rejects .unverified transactions and does not unlock content Questions: What are the known causes of StoreKit 2 returning .unverified with the localized error message 「資訊對裝置無效」 during App Review? Is our current behavior correct: only unlock content for .verified transactions and reject .unverified transactions? If App Review receives .unverified, what should the app do from Apple’s recommended perspective? Should we show a retry/error message, ask the reviewer to retry, refresh entitlements, or take another action? Is there any App Review environment, device configuration, Apple ID configuration, or StoreKit account state that can cause this device-related verification error? Since local development purchases succeed but App Review fails, what diagnostics or logs should we collect and provide to identify the root cause? Should we ever bypass StoreKit 2 transaction verification in App Review/TestFlight, or should .unverified always be treated as a failed transaction? We would appreciate guidance on the correct code-level handling so that our app remains secure while also passing App Review reliably. Thank you.
Replies
1
Boosts
0
Views
214
Activity
2w
Storekit, how to change and retrieve current user storefront
I've been struggling to work with the Storekit framework and specifically to find the current Storefront used by the user of the app. Context : My app needs to behave differently depending on the country of the user. For me relying on Locale.current.region?.identifier does not seem very reliable, the user can change it really easily. I'm trying to use the Storekit framework like so : if let storefront = await StoreKit.Storefront.current{ return storefront.countryCode } As per Apple's Storekit documentation : Use current to determine a customer's current storefront region and offer in-app products suitable for that region. You maintain your own list of product identifiers and the storefronts in which you make them available. But I just can't find out what I need to change in my current configuration to get another country. The code keeps returning my original storefront (which is France) I've tried login in with a sandbox user defined on another country. Changed all settings on my device to another country. Changed my Apple's account region as described here. Also tried to logout from everything. The only thing that works is setting a local .storekit file as described here and changing the default storefront. Is Xcode overriding the default storefront when building on debug or TestFlight? does anyone know how can I test different storefronts with sandbox users without the local storekit file ? Thank you in advance.
Replies
5
Boosts
2
Views
1.4k
Activity
2w
Unable to enable eligibility for External Purchase Link APIs — seeking clarification
Hello, I am currently implementing External Purchase Link and External Purchase Custom Link and am encountering an issue where both ExternalPurchaseLink.canOpen and ExternalPurchaseCustomLink.isEligible always return false under all test conditions. I would like to confirm whether my setup is missing any required steps or whether this behavior is expected. Below are the details of my current environment and configuration: 🔧 1. Development Environment Xcode: 16.3, 16.4, 26.0 beta 4 Devices: iPhone running iOS 26.2 beta iPhone running iOS 16.7.12 macOS 15.5 (real device testing) Simulator iOS 18.0 Build Type: Local development build using a Developer Provisioning Profile Sandbox account signed in during testing 🔑 2. Entitlements (Developer site & Xcode) In Certificates → Identifiers → App ID, both capabilities are enabled: StoreKit External Purchase StoreKit External Purchase Link The .entitlements file in Xcode includes: com.apple.developer.storekit.external-purchase = YES com.apple.developer.storekit.external-purchase-link = YES The Provisioning Profile also contains both entitlements (confirmed via codesign -d --entitlements :-). 📄 3. Info.plist Configuration Both keys are configured with correct region codes according to documentation: SKExternalPurchase SKExternalPurchaseCustomLinkRegions 🌍 4. Test Storefront Device storefront verified as United States (US) or Portugal (PT) (US = target region for External Purchase Link, PT = EU region) But despite all the above configuration, both API calls consistently return false: ExternalPurchaseLink.canOpen // false ExternalPurchaseCustomLink.isEligible // false So I cannot proceed to testing the remaining flow (token retrieval, link opening, etc.) ------ Questions ------ ❓ Q1) Local Development Build Limitation Is it expected behavior that Developer-signed local builds always return canOpen = false / isEligible = false for External Purchase Link & Custom Link? Is there a technical or policy restriction that prevents eligibility in local dev builds? ❓ Q2) App Store Connect Configuration Requirement Are there mandatory App Store Connect settings (such as external purchase URLs, support URL, disclosures, or country configuration) that must be enabled before eligibility becomes true? Currently, no External Purchase Link or Custom Link menu is visible in my App Store Connect app settings. Is this menu only available after certain approvals or under specific conditions? ❓ Q3) TestFlight Requirement Do External Purchase Link and Custom Link only return eligibility = true on: TestFlight builds, or Distribution-signed builds? Or should eligibility also work on developer builds? Formal confirmation would be helpful. ❓ Q4) Developer Account Type Limitation We are using an Individual Developer Account (not Organization). Can Individual accounts fully request, test, and ship apps using: External Purchase Link External Purchase Custom Link Or are there limitations on account type? 🙏 Request We have completed all documented setup steps (Entitlements → Provisioning → Info.plist), but eligibility remains false, blocking feature validation. Please clarify which of the following is the cause: Local development builds do not support eligibility Missing App Store Connect configuration (not visible to us) Account type restriction Region rollout or entitlement approval requirement Any additional setup not documented publicly Thank you for your assistance.
Replies
3
Boosts
1
Views
833
Activity
3w
App approved and released, but auto-renewable subscriptions remain "Waiting for Review" and StoreKit returns no products
M y app was approved and is now live on the App Store, but all four auto-renewable subscriptions are still Waiting for Review in App Store Connect. Because of this, the production app's StoreKit 2 call to Product.products(for:) returns 0 products, and users see: "No subscription products were returned by the App Store." There are no metadata errors or warnings—only Waiting for Review. My questions are: Is it normal for an app to be released before its subscriptions are approved? While subscriptions are in Waiting for Review, is it expected that Product.products(for:) returns an empty array? Has anyone experienced this, and how long did it take for the subscriptions to be approved after the app was already live? I've attached: App Store Connect screenshot showing all four subscriptions in Waiting for Review. App screenshot showing the "No subscription products were returned by the App Store." message. Any insight would be greatly appreciated. Thanks!
Replies
1
Boosts
0
Views
705
Activity
Aug ’26
Transaction.currentEntitlements returning NULL values
Hi, Overview In my project I am using a .storekit StoreKit configuration file that is synced. I have only non-consumable products Problem When I loop through Transaction.currentEntitlements after verification the properties such as transaction.productType are all NULL. Note I have called .finish on the transaction after the following: Processing Transaction.updates Processing purchasing a new product Environment: Xcode 27 Beta 5 iOS 26.6 Questions How can I resolve this? Am I missing something? Should I be using Transaction.latest(for:) instead of Transaction.currentEntitlements?
Replies
0
Boosts
0
Views
321
Activity
Aug ’26
StoreKit 2: products load with correct prices but purchase fails immediately with "Item Unavailable" (app not yet approved)
Our app sells two auto-renewable subscriptions. Product loading succeeds and returns both products with correct localized prices, but every purchase attempt fails roughly one second later with "Item Unavailable". No purchase sheet is ever presented to the user. The app has not yet passed its first App Review. It was rejected under Guideline 2.1(b) because the reviewer encountered this same error on their device. MY QUESTION Under what conditions does StoreKit reject a purchase with "Item Unavailable" for a product that has just been returned successfully, with a valid localized price, by a product request? Is an auto-renewable subscription transactable in the sandbox environment for an app that has never had a binary approved by App Review? Question 2 is the one I most need answered. App Review's rejection states that In-App Purchase products "do not need prior approval to function in review", but neither we nor the reviewer can transact them. DIAGNOSTIC LOG Captured on-device during a failing session: 01:08:56 fetchProducts [com.aurascanner.app.pro.weekly, com.aurascanner.app.pro.annual] 01:08:56 fetchProducts -> 2 product(s): com.aurascanner.app.pro.annual=$39.99; com.aurascanner.app.pro.weekly=$6.99 01:08:56 requestPurchase sku=com.aurascanner.app.pro.weekly 01:08:57 purchaseError: code=purchase-error msg=Item Unavailable 01:08:57 error code=purchase-error, storefront=USA 01:09:05 fetchProducts -> 2 product(s), same prices returned again 01:09:05 requestPurchase sku=com.aurascanner.app.pro.annual 01:09:06 requestPurchase threw: Item Unavailable 01:09:06 error code=purchase-error, storefront=USA An introductory-offer eligibility check earlier in the session also succeeded, using the subscription group ID read from the loaded product. So product metadata, including the subscription group, resolves correctly. CONDITIONS Fails identically for both products, on every attempt. Reproduces in TestFlight on our own devices and Apple IDs. Also failed during App Review on iPad Air 11-inch (M3), iPadOS 26.5.2. Storefront reports as USA in every case. Real devices only. Not reproduced on Simulator. ALREADY VERIFIED Paid Applications Agreement: Active, banking and tax information complete. In-App Purchase capability: enabled on the App ID at Certificates, Identifiers & Profiles. Bundle identifier com.aurascanner.app matches the App Store Connect record. Both subscriptions: complete metadata, review screenshots uploaded, USD pricing set, United States availability. Both subscriptions and the subscription group are attached to the current submission, status "Ready for Review". Subscription group has a localized display name. Build distributed via TestFlight, which routes purchases to sandbox automatically. IMPLEMENTATION The app is React Native and uses a wrapper library over StoreKit 2, but the error text originates from StoreKit rather than the wrapper, and the call order follows the documented pattern: Initialize the StoreKit connection. Load products. This succeeds and returns both products. Register transaction update and error listeners. Request the purchase. This is where it fails. Purchases are verified server-side using Apple's App Store Server Library, and the transaction is finished only after verification succeeds. I am not asking anyone to debug the wrapper. My question is about StoreKit and App Store behaviour: what causes the store to quote a product and then decline to sell it? Any pointers appreciated. I can supply screenshots or the full log.
Replies
2
Boosts
1
Views
1k
Activity
Aug ’26
Transaction.currentEntitlements sometimes does not emit a result until device is reboot
I have the typical StoreKit 2 manager class, where I check currentEntitlements for subscription. I have filed a feedback (FB22349195), I hope someone can take a look at it. func updateCustomerProductStatus() async { var activeSubscription: String? = nil // BUG: In some cases the currentEntitlements does not emit a transaction until the device is reboot for await result in Transaction.currentEntitlements { print("Found transaction: \(result)") // This print does not appear until a restart! do { let transaction = try checkVerified(result) // Skip revoked transactions if transaction.revocationDate != nil { print("Skipping revoked transaction for \(transaction.productID)") continue } // Skip expired subscriptions if let expirationDate = transaction.expirationDate, expirationDate < Date() { print("Skipping expired subscription for \(transaction.productID)") continue } // Check product type switch transaction.productType { case .autoRenewable: activeSubscription = transaction.productID default: break } } catch { print("Unable to verify transaction: \(error)") } } // Update state once after processing all entitlements self.activeSubscription = activeSubscription print("updateCustomerProductStatus() activeSubscription: \(activeSubscription ?? "nil")") } There is some unexpected behavior where the currentEntitlements does not emit a result until the iPhone device is reboot. This bug appeared in iOS 26.4 (and in the betas).
Replies
3
Boosts
3
Views
1.3k
Activity
Aug ’26
401 Unauthorized When Requesting Sandbox Test Notification Using app-store-server-library-java 5.2.0
I am using app-store-server-library-java:5.2.0. Following the official guide video, I downloaded and configured all required credentials, including the Key ID, Issuer ID, private key (.p8 file), and Bundle ID. However, when I try to send a test notification in the Sandbox environment, the request consistently returns a 401 Unauthorized error without any additional error message or details. One difference from the guide is how I handle the private key file. The guide reads the .p8 file directly from a file path on the server. In my environment, I cannot store external files on the server, so I Base64-encode the contents of the .p8 file, store it as an environment variable, and then decode it back to its original content before initializing the App Store Server API client. As far as I can tell, the decoded content matches the original key file exactly, but I am wondering whether this approach could cause any issues with authentication or JWT generation. Are there any additional prerequisites, permissions, agreements, or configuration steps that must be completed before this feature can be used? I have spent a significant amount of time troubleshooting this issue, but I have been unable to identify the root cause from the available documentation or error responses. Any guidance or suggestions would be greatly appreciated. Thank you for your help. Additional information: Library: app-store-server-library-java 5.2.0 Environment: Sandbox Credentials configured: Key ID, Issuer ID, Bundle ID, Private Key (.p8) Private key handling: Base64 encoded in environment variables, then decoded before client initialization Result: HTTP 401 Unauthorized with no response body or error details
Replies
1
Boosts
0
Views
626
Activity
Jul ’26
Sandbox subscription purchase fails with ASDServerErrorDomain 3504
Type: Auto-renewable subscription Sandbox Storefront: USA StoreKit successfully loads the subscription product and returns its correct name and price (US$29.99). However, every purchase attempt fails: ASDServerErrorDomain Code=3504 AMSServerErrorCode=3504 "Item not found" client-environment-type=Sandbox storefront-country-code=USA This reproduces both in a TestFlight build and in iPhone Developer Settings > Test In-App Purchases. Please verify the app-product linkage and Sandbox commerce availability for this subscription product. Purchase did not return a transaction: Error Domain=ASDServerErrorDomain Code=3504 "找不到此项目。" UserInfo={storefront-country-code=USA, AMSServerErrorCode=3504, client-environment-type=Sandbox, NSLocalizedFailureReason=找不到此项目。} HKIPO-IAP 11:12:33.712 purchase error: type=StoreKit.Product.PurchaseError, domain=StoreKit.Product.PurchaseError, code=1, description=無法使用項目, failureReason=目前無法使用此項目。, underlying=nil, userInfo={}
Replies
0
Boosts
1
Views
555
Activity
Jul ’26
ASDServerErrorDomain Code 3504 when purchasing non-consumable IAP
I am experiencing an issue with a non-consumable in-app purchase in my iOS app. The product loads correctly from the App Store and is displayed in the app, but when attempting to complete the purchase, StoreKit returns the following error: Payment completed with error: Error Domain=ASDServerErrorDomain Code=3504 "This item cannot be found." UserInfo={ NSLocalizedFailureReason=This item cannot be found., AMSServerErrorCode=3504, client-environment-type=Sandbox, storefront-country-code=USA } The same issue was also encountered by the App Review tester when they attempted to purchase the non-consumable product during review. The product: Is correctly configured in App Store Connect Has active pricing Is available in the United States Was included in the app submission Loads successfully and displays the correct price Fails only when the purchase is initiated Since the product metadata can be retrieved successfully, but the transaction fails with “This item cannot be found,” this appears to be a possible inconsistency between the StoreKit product catalog and the purchase backend. Has anyone encountered ASDServerErrorDomain Code=3504 for a non-consumable product that loads correctly but cannot be purchased? Is there any known App Store sandbox or commerce backend issue that can cause this, or any additional App Store Connect configuration that should be checked?
Replies
3
Boosts
0
Views
858
Activity
Jul ’26
SKTestSession.buyProduct(identifier: options:) throws error
Hi, Overview I am trying to write a unit test case to buy a storekit product. SKTestSession.buyProduct(identifier: options:) throws the error StoreKit.StoreKitError.notEntitled Testcase Code @Test func example() async throws { let session = try SKTestSession(configurationFileNamed: "VehicleStore") session.disableDialogs = true session.clearTransactions() do { let transaction = try await session.buyProduct(identifier: "nonconsumable.car", options: []) print(transaction) } catch { // Throws StoreKit.StoreKitError.notEntitled print("Error: \(error)") } } Storekit configuration file Note In-App purchases capability is added StoreKit configuration file is used in testcase Environment: macOS 26.5.2 (25F84) Xcode 26.6 (17F113)
Replies
7
Boosts
0
Views
1.3k
Activity
Jul ’26
Sandbox Apple Account sign-in asks for phone verification, then fails with “Could not connect to iCloud”
Hi, I created a Sandbox Apple Account in App Store Connect for testing StoreKit / Age Assurance sandbox scenarios. When I try to sign in on an iPhone through: Settings -> Developer -> Sandbox Apple Account I can enter the sandbox account email/password and I successfully receive the email verification code. After entering the email verification code, iOS asks me to add/verify a phone number. When I enter the phone number, I get this error: “Could not connect to iCloud. Verification codes cannot be sent to this phone number at this time. Please try again later.” I did not set any phone number when creating the sandbox tester in App Store Connect. The sandbox tester was created with only name, email, password, and country/region. Context: iPhone has Developer Mode enabled I am signing in via Settings -> Developer -> Sandbox Apple Account I am not trying to sign in through normal iCloud / Apple Account settings The sandbox account email is not used as a normal Apple Account Email verification works Phone verification has failed for more than a day Questions: Is phone verification expected when signing in with a Sandbox Apple Account? Is there a way to use Sandbox Apple Accounts / Age Assurance sandbox scenarios without adding a trusted phone number? Does this error usually mean the phone number is rate-limited/blocked, or that the sandbox account is stuck? Should this be handled by Apple Developer Program Support instead? Thanks!
Replies
0
Boosts
0
Views
352
Activity
Jul ’26
Sandbox can purchase auto-renewable subscriptions but non-consumable IAP is always invalid
I’m testing In-App Purchases in the sandbox on a real iPhone. Auto-renewable subscriptions work correctly with the same app build, bundle ID, and sandbox tester account: com.aifalling.sides.vip.monthly com.aifalling.sides.vip.yearly However, a non-consumable product can’t be purchased: Product ID: com.aifalling.sides.vip.onetime App Store Connect IAP Apple ID: 6794812888 Type: Non-Consumable Status: Ready to Submit Bundle ID: com.aifalling.sides The native StoreKit payment request fails immediately with: The purchase identifier was invalid. The wrapper reports error code 700605. I verified the non-consumable product through the App Store Connect API: Product ID exists and is returned by the API One localization exists: zh-Hans A price schedule is configured, including a base territory and prices Availability includes China (CHN) and many other territories availableInNewTerritories is true I waited more than one hour after the latest metadata changes I completely removed the app, rebuilt/reinstalled the custom development build, and retried The same signed build can successfully purchase the two auto-renewable subscriptions This is the first non-consumable IAP type for this app. The app and IAPs have not been submitted for App Review yet because I’m trying to complete sandbox testing first. Does a non-consumable IAP require any additional App Store Connect setup or association that an auto-renewable subscription doesn’t require for sandbox testing? Is Ready to Submit sufficient for sandbox testing of a non-consumable product in this situation? Any guidance would be appreciated.
Replies
1
Boosts
0
Views
601
Activity
Jul ’26
Product.products(for:) returns one subscription group's products but not return the other
I'm stuck on this and genuinely don't know what's wrong. I have two auto-renewable subscription groups in one app. I pass all six product IDs to a single Product.products(for:) call. It succeeds, doesn't throw, and returns three products — all from group A. The three from group B just aren't in the array. No error, they're simply absent. All six show Approved in App Store Connect. [PlusStore] probe — storefront: USA [PlusStore] probe — OK ...plus.monthly (group A) [PlusStore] probe — OK ...plus.quarterly (group A) [PlusStore] probe — OK ...plus.yearly (group A) [PlusStore] probe — MISSING ...plus.founding.monthly (group B) [PlusStore] probe — MISSING ...plus.founding.quarterly (group B) [PlusStore] probe — MISSING ...plus.founding.yearly (group B) Retried three times with backoff, so it isn't cold-launch timing. I don't think it can be the Paid Applications Agreement, the sandbox account, a network failure, or a wrong bundle prefix, since group A comes back fine. I've checked the group B IDs character-for-character against the Product ID field in App Store Connect, confirmed United States is enabled with an active price and no future-dated schedule on all three, and confirmed there's no .storekit file attached to the scheme. So the only difference I can find between the two groups is the group itself.
Replies
0
Boosts
0
Views
355
Activity
Jul ’26