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.3k
Jun ’26
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
672
1d
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
181
1d
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
47
3d
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.3k
4d
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
647
6d
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
528
2w
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
215
2w
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
907
3w
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.2k
3w
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
495
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
429
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
722
Jul ’26
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.
0
0
454
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.2k
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
291
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
475
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
273
Jul ’26
**Subject:** AdAttributionKit Postback URL Registration Questions for Existing SKAdNetwork Ad Networks
Here's a much shorter version with just the questions: Hi Apple Developer Support, We're an ad network already registered for SKAdNetwork and are integrating AdAttributionKit. We have a few questions regarding postback URL registration: Do we need to register a separate postback URL for AdAttributionKit, or is our existing SKAdNetwork postback URL reused automatically? If a separate AAK registration is required, can the AAK postback URL be the same as our existing SKAN postback URL, or does Apple require a different URL/path? If the same URL is used for both, are AAK postbacks always delivered as a JWS payload while SKAN postbacks continue to use the existing JSON format? When WWDC states that existing SKAdNetwork ad networks require "no further enrollment," does that refer only to reusing the existing ad network ID, or also to reusing the registered postback URL? Is the Developer Mode AdAttributionKit testing flow the correct way to validate ad network postback delivery? Thanks!
0
0
255
Jul ’26
xcodebuild test (CLI) does not sync .storekit to storekitd on iOS 26.5 — SKTestSession unusable in CI
On iOS 26.5 simulator runtime, running UI tests via xcodebuild test from the command line does not push the scheme's StoreKitConfigurationFileReference to the destination simulator's storekitd AppGroup Octane container. As a consequence, SKTestSession(configurationFileNamed:) either silently falls through to the production App Store (surfacing a "Sign in to Apple Account" SpringBoard alert during paywall tests), or throws SKInternalErrorDomain Code=3 "Error saving configuration file" if you call any SKTestSession instance method. The same project, same scheme, same .storekit file works correctly when launched via Xcode IDE (Cmd+R / Cmd+U) — which uses DVTDevice.handleStoreKitConfigurationSyncForBundleID:configurationFilePath: via an internal IDELaunchSession XPC path that the public xcodebuild CLI does not invoke. This regression makes StoreKit Test unusable in CI for any project using xcodebuild test or xcodebuild test-without-building against an iOS 26.5 simulator. Environment macOS: 26.x Xcode: 26.4.1 (25E253) iOS Simulator runtime affected: 26.5 iOS Simulator runtime that does not exhibit the bug: 26.1 Test target: XCTest UI tests Test plan: *.xctestplan with "storeKitConfiguration": "MyApp.storekit" in defaultOptions Affected scheme actions: Test (CLI) Not affected: Run, Test (Xcode IDE) Steps to Reproduce Create a SwiftUI iOS app com.example.MyApp. Add a MyApp.storekit with one auto-renewable subscription. Add a UI test target. In the xctestplan: defaultOptions.storeKitConfiguration = "MyApp.storekit". In the UI test base case: private var storeKitSession: SKTestSession? override func setUpWithError() throws { storeKitSession = try SKTestSession(configurationFileNamed: "MyApp") app.launch() } Boot a fresh iOS 26.5 simulator. Run via CLI: xcodebuild test \ -project MyApp.xcodeproj \ -scheme MyApp \ -testPlan MyAppUITests \ -destination "platform=iOS Simulator,name=iPhone 17 Pro" In the test, trigger paywall and call Product.purchase(). Expected Product.purchase() presents the StoreKit Test sheet labeled "[Environment] Xcode". Same behavior as Xcode IDE Cmd+U. Actual Production App Store flow triggers. SpringBoard alert "Sign in to Apple Account" appears. Tests waiting on the "Xcode"-labeled sheet fail with Element does not exist. Evidence The simulator's ~/Library/Developer/CoreSimulator/Devices/<UDID>/data/Containers/Shared/AppGroup/<storekit-AGID>/Documents/Persistence/Octane/com.example.MyApp/Configuration.storekit: Present (≈100 KB) when launched via Xcode IDE. Missing when launched via xcodebuild test CLI on the same simulator UDID. Workarounds Attempted (all fail on iOS 26.5) No-op XCTestCase "warmup" that calls XCUIApplication.launch() + sleep — does not trigger the sync because XCUIApplication.launch() routes through XCTRunner, not IDELaunchSession. Multi-destination xcodebuild test with -parallelize-tests-among-destinations. Manually cp-ing the .storekit file into the AppGroup Octane container — storekitd only loads via the XPC channel. launchctl kickstart -k system/com.apple.storekitd — wipes in-memory state, does not pick up disk file. Only working workaround: open project in Xcode IDE, Cmd+R, wait ~20–30 sec, Cmd+., then Cmd+U. Not viable for CI. Related Open Feedback FB22237318 — SKTestSession instance methods (clearTransactions(), failTransactionsEnabled = true) throw SKInternalErrorDomain Code=3 "Error saving configuration file". Discussion thread: https://developer.apple.com/forums/thread/808030 The iOS 26.5 Release Notes (https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-26_5-release-notes) under StoreKit Test list this issue as resolved in 26.5: "Fixed: SKTestSession may fail to save its configuration file when invoked outside of an Xcode debug session." However, on the public iOS 26.5 simulator runtime the behavior is unchanged — SKTestSession still hits Code=3 on any mutation, and xcodebuild test from CLI still does not sync the .storekit configuration. The 26.5 fix either did not actually ship, or this report describes a distinct but related issue that the fix did not cover. Impact Any CI/CD pipeline running UI tests for apps with StoreKit subscriptions is broken when targeting an iOS 26.5 simulator. Workarounds are either: Pin CI simulator runtime to iOS 26.1. Manually run the project in Xcode IDE before each test run (impossible headless). Has anyone found a CLI-friendly workaround? Or is there an undocumented xcodebuild flag / simctl command that can trigger the same DVTDevice sync from outside the IDE?
7
3
1.4k
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.3k
Activity
Jun ’26
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
672
Activity
1d
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
181
Activity
1d
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
47
Activity
3d
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.3k
Activity
4d
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
647
Activity
6d
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
528
Activity
2w
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
215
Activity
2w
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
907
Activity
3w
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.2k
Activity
3w
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
495
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
429
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
722
Activity
Jul ’26
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
0
Boosts
0
Views
454
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.2k
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
291
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
475
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
273
Activity
Jul ’26
**Subject:** AdAttributionKit Postback URL Registration Questions for Existing SKAdNetwork Ad Networks
Here's a much shorter version with just the questions: Hi Apple Developer Support, We're an ad network already registered for SKAdNetwork and are integrating AdAttributionKit. We have a few questions regarding postback URL registration: Do we need to register a separate postback URL for AdAttributionKit, or is our existing SKAdNetwork postback URL reused automatically? If a separate AAK registration is required, can the AAK postback URL be the same as our existing SKAN postback URL, or does Apple require a different URL/path? If the same URL is used for both, are AAK postbacks always delivered as a JWS payload while SKAN postbacks continue to use the existing JSON format? When WWDC states that existing SKAdNetwork ad networks require "no further enrollment," does that refer only to reusing the existing ad network ID, or also to reusing the registered postback URL? Is the Developer Mode AdAttributionKit testing flow the correct way to validate ad network postback delivery? Thanks!
Replies
0
Boosts
0
Views
255
Activity
Jul ’26
xcodebuild test (CLI) does not sync .storekit to storekitd on iOS 26.5 — SKTestSession unusable in CI
On iOS 26.5 simulator runtime, running UI tests via xcodebuild test from the command line does not push the scheme's StoreKitConfigurationFileReference to the destination simulator's storekitd AppGroup Octane container. As a consequence, SKTestSession(configurationFileNamed:) either silently falls through to the production App Store (surfacing a "Sign in to Apple Account" SpringBoard alert during paywall tests), or throws SKInternalErrorDomain Code=3 "Error saving configuration file" if you call any SKTestSession instance method. The same project, same scheme, same .storekit file works correctly when launched via Xcode IDE (Cmd+R / Cmd+U) — which uses DVTDevice.handleStoreKitConfigurationSyncForBundleID:configurationFilePath: via an internal IDELaunchSession XPC path that the public xcodebuild CLI does not invoke. This regression makes StoreKit Test unusable in CI for any project using xcodebuild test or xcodebuild test-without-building against an iOS 26.5 simulator. Environment macOS: 26.x Xcode: 26.4.1 (25E253) iOS Simulator runtime affected: 26.5 iOS Simulator runtime that does not exhibit the bug: 26.1 Test target: XCTest UI tests Test plan: *.xctestplan with "storeKitConfiguration": "MyApp.storekit" in defaultOptions Affected scheme actions: Test (CLI) Not affected: Run, Test (Xcode IDE) Steps to Reproduce Create a SwiftUI iOS app com.example.MyApp. Add a MyApp.storekit with one auto-renewable subscription. Add a UI test target. In the xctestplan: defaultOptions.storeKitConfiguration = "MyApp.storekit". In the UI test base case: private var storeKitSession: SKTestSession? override func setUpWithError() throws { storeKitSession = try SKTestSession(configurationFileNamed: "MyApp") app.launch() } Boot a fresh iOS 26.5 simulator. Run via CLI: xcodebuild test \ -project MyApp.xcodeproj \ -scheme MyApp \ -testPlan MyAppUITests \ -destination "platform=iOS Simulator,name=iPhone 17 Pro" In the test, trigger paywall and call Product.purchase(). Expected Product.purchase() presents the StoreKit Test sheet labeled "[Environment] Xcode". Same behavior as Xcode IDE Cmd+U. Actual Production App Store flow triggers. SpringBoard alert "Sign in to Apple Account" appears. Tests waiting on the "Xcode"-labeled sheet fail with Element does not exist. Evidence The simulator's ~/Library/Developer/CoreSimulator/Devices/<UDID>/data/Containers/Shared/AppGroup/<storekit-AGID>/Documents/Persistence/Octane/com.example.MyApp/Configuration.storekit: Present (≈100 KB) when launched via Xcode IDE. Missing when launched via xcodebuild test CLI on the same simulator UDID. Workarounds Attempted (all fail on iOS 26.5) No-op XCTestCase "warmup" that calls XCUIApplication.launch() + sleep — does not trigger the sync because XCUIApplication.launch() routes through XCTRunner, not IDELaunchSession. Multi-destination xcodebuild test with -parallelize-tests-among-destinations. Manually cp-ing the .storekit file into the AppGroup Octane container — storekitd only loads via the XPC channel. launchctl kickstart -k system/com.apple.storekitd — wipes in-memory state, does not pick up disk file. Only working workaround: open project in Xcode IDE, Cmd+R, wait ~20–30 sec, Cmd+., then Cmd+U. Not viable for CI. Related Open Feedback FB22237318 — SKTestSession instance methods (clearTransactions(), failTransactionsEnabled = true) throw SKInternalErrorDomain Code=3 "Error saving configuration file". Discussion thread: https://developer.apple.com/forums/thread/808030 The iOS 26.5 Release Notes (https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-26_5-release-notes) under StoreKit Test list this issue as resolved in 26.5: "Fixed: SKTestSession may fail to save its configuration file when invoked outside of an Xcode debug session." However, on the public iOS 26.5 simulator runtime the behavior is unchanged — SKTestSession still hits Code=3 on any mutation, and xcodebuild test from CLI still does not sync the .storekit configuration. The 26.5 fix either did not actually ship, or this report describes a distinct but related issue that the fix did not cover. Impact Any CI/CD pipeline running UI tests for apps with StoreKit subscriptions is broken when targeting an iOS 26.5 simulator. Workarounds are either: Pin CI simulator runtime to iOS 26.1. Manually run the project in Xcode IDE before each test run (impossible headless). Has anyone found a CLI-friendly workaround? Or is there an undocumented xcodebuild flag / simctl command that can trigger the same DVTDevice sync from outside the IDE?
Replies
7
Boosts
3
Views
1.4k
Activity
Jul ’26
iOS 26.5 simulator failed process in-app purchases from Storekit configuration
When using iOS 26.5 simulator to test my in-app purchase module, the products were loaded from my configuration file correctly, but calling purchase on the product would always return userCancellled outcome. Changing to iPhone15 + iOS 18 simulator resolved this issue.
Replies
3
Boosts
1
Views
467
Activity
Jul ’26