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
2.3k
Jun ’26
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.
1
0
499
22h
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.
2
0
567
1d
SKTestSession.setSimulatedError does not work - Products load successfully despite error configuration
Description I'm attempting to test error handling in my StoreKit implementation using SKTestSession.setSimulatedError(), but it doesn't trigger any errors. All StoreKit APIs (.loadProducts, .purchase, .appTransaction) succeed despite error simulation being configured before API calls. According to Apple's documentation, setSimulatedError(_:forAPI:) should cause the specified API to throw an error, but this doesn't happen in my testing environment. Background / Known issue I found a previous forum discussion: "SKTestSession.setSimulatedError() not working for .loadProducts API in iOS 26.2" which mentioned this was a bug in iOS 26.2 and was supposedly fixed in iOS 26.3. However, I'm experiencing the same issue in my current environment (Xcode 26.6 / iOS 26.5), which suggests either: The bug has regressed, or There's a different underlying issue, or I'm missing something in my implementation I wanted to report this to confirm whether this is still a known issue or if additional steps are needed. Environment Xcode: 26.6 Test Environment: iOS Simulator - iPhone 17 Pro(26.5) Testing Framework: XCTest StoreKitTest Framework: Included in Xcode Code Unit test code import XCTest import StoreKit import StoreKitTest final class StoreKitErrorTests: XCTestCase { func test_LoadProducts_SetSimulatedError() async throws { // Arrange let session = try SKTestSession(configurationFileNamed: "storekit") session.clearTransactions() session.disableDialogs = true // Set simulated error for loadProducts API try await session.setSimulatedError( .generic(.unknown), forAPI: .loadProducts ) // Act - Attempt to load products do { let products = try await Product.products(for: ["com.example.app.testproduct"]) // This line executes - products were loaded successfully print("[TEST] FAIL: Loaded \(products.count) products") XCTFail("setSimulatedError did not work - products loaded successfully") } catch { // This should execute, but it doesn't print("[TEST] PASS: Error was thrown") } } }.storekit file Note: Showing only the product definition. File also contains settings and version info. { "products" : [ { "displayPrice" : "1.23", "familyShareable" : false, "internalID" : "5AE6F98A", "localizations" : [ { "description" : "Test app", "displayName" : "LsStorekit", "locale" : "en_US" } ], "productID" : "com.example.app.testproduct", "referenceName" : "LsStorekit", "type" : "NonConsumable" } ] }Expected Behavior The Product.products(for:) call should throw an error because setSimulatedError(.generic(.unknown), forAPI: .loadProducts) was called before the API invocation. The test should: Configure the simulated error Attempt to load products Catch an error in the catch block Test passes with: "[TEST] PASS: Error was thrown" Actual Behavior Products are loaded successfully despite the error simulation: • The do block completes without throwing • 1 product is returned from Product.products(for:) • XCTFail() is called, indicating the error simulation didn't work • Test fails with: "[TEST] FAIL: Loaded 1 products" Console Output [TEST] FAIL: Loaded 1 products Additional Testing I've tested setSimulatedError with multiple APIs, and all show the same behavior: APIError configurationResult.loadProducts.generic(.unknown)No error thrown.purchase.generic(.unknown)No error thrown.appTransaction.generic(.unknown)No error thrown.appStoreSync.generic(.unknown)No error thrownWhat I've Already Tried • Calling setSimulatedError before app launch (in UI tests) • Calling setSimulatedError after app launch but before API calls • Using different error types (.generic(.unknown), .generic(.networkError(...))) • Testing in both Unit Tests and UI Tests • Using different APIs (.loadProducts, .purchase, .appTransaction) • Clearing transactions and resetting session state • Verifying the .storekit file is correctly loaded (products load successfully) • Running the app first (⌘R) to ensure StoreKit configuration is registered with the StoreKit daemon - This was necessary to fix an initial issue where products weren't loading at all Questions Is this a known limitation of SKTestSession.setSimulatedError()? Are there additional steps required to make error simulation work? Is there an alternative approach to test StoreKit error handling? Does this work in specific Xcode/iOS SDK versions only? Any guidance would be greatly appreciated. I need to test error handling in my StoreKit implementation, but cannot find a way to simulate errors reliably.
0
0
33
3d
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
1
0
609
1w
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?
3
0
1k
1w
StoreKit Testing on iOS 27.2 Simulator returns the refunded renewal when repurchasing a subscription
I'm testing auto-renewable subscriptions with a local .storekit configuration in Xcode 27.2 (27B52). With the same app and configuration on iPhone 17 simulators, I get different results on iOS 26.2 (23C54) and iOS 27.2 (24B8117). Set SKTestSession.timeRate to .oneRenewalEveryThirtySeconds, then purchase an auto-renewable subscription in the app with StoreKit 2. Wait for the original period to expire and the first automatic renewal to appear. Refund that renewal using SKTestSession.refundTransaction(identifier:) and wait for the app to receive the revocation. While the app is still running, purchase the same product again and inspect the verified transaction returned directly by Product.purchase(). Both runtimes return .success with a verified transaction. On iOS 26.2, the repurchase returns a new transaction ID with revocationDate == nil, and Transaction.currentEntitlements contains it. On iOS 27.2, the result has the same ID, purchaseDate, and non-nil revocationDate as the refunded renewal. The current entitlement check yields no verified unrevoked transaction. This reproduced for both a monthly and a three-month subscription. The monthly case also reproduced when calling Product.purchase() without an appAccountToken option. Is this a known issue in StoreKit Testing on iOS 27.2 Simulator? Is there a supported way to test the repurchase path while preserving the refunded transaction in the test history?
0
0
75
1w
SKTestSession: declined Ask to Buy now produces a purchased transaction on iOS 27.2. Expected?
Hello! I'm glad that Xcode 27.2 could fix many StoreKit testing issues (27.2 release notes). While refreshing my unit tests for Xcode 27.2, I noticed a new behavior of "Ask to Buy" transactions. Since Xcode/iOS 27.2 at least, it seems that declining an Ask to Buy request in an SKTestSession makes StoreKit 2 record a purchase. Is this the intended new behavior? To reproduce: let session = try SKTestSession(configurationFileNamed: "ConfigFile") session.askToBuyEnabled = true session.resetToDefaultState() session.disableDialogs = true session.clearTransactions() let result = try await product.purchase() // .pending let pending = session.allTransactions().first! // state .deferred try session.declineAskToBuyTransaction(identifier: pending.identifier) // a few seconds later for await t in Transaction.all { print(t.unsafePayloadValue) }In my case the purchased product is an auto-renewable subscription with a free-trial intro offer, from a local .storekit file, in a unit test run inside a host app. After the decline, I could observe the following iOS 26.2 simulator SKTestTransaction.state = .deferred Transaction.updates : nothing Transaction.all : empty iOS 27.2 simulator SKTestTransaction.state = .failed Transaction.updates : emits a transaction Transaction.all : 1 transaction: ownershipType = .purchased, reason = .purchase, no revocation, expires at the end of the trial. The test session marks the request as failed, yet StoreKit 2 reports an active subscription... My understanding was that a declined "Ask to Buy" request never produces a transaction. With the new behavior, apps relying on Transaction.all or currentEntitlements would grant access that the Apple user refused... Is the new behavior expected? Or is it a regression (and is it limited to SKTestSession) ? Thanks for your help!
0
0
66
1w
How is your team handling Privacy Manifest (PrivacyInfo.xcprivacy) audits before App Store submission?
Hey everyone, Curious how other iOS teams/indies are dealing with Apple's Privacy Manifests (PrivacyInfo.xcprivacy) and Required Reason APIs now that enforcement is active. Recently had to deal with third-party dependencies (both CocoaPods and SPM packages) where an undeclared API usage buried deep inside an embedded framework caused an App Store submission headache (ITMS-91053). I wanted to ask: What does your pre-submission workflow look like? Are you auditing privacy manifests and API reasons manually, using Xcode’s built-in report, or do you have a custom script in your CI/CD pipeline? Third-party SDK visibility: How do you catch when an updated dependency introduces an undeclared restricted API or tracking domain before pushing to TestFlight / App Store Connect? Local vs Cloud tooling: If you were checking compliance pre-flight, would your team ever be allowed to upload compiled .ipa binaries to a 3rd-party cloud service, or does security require everything to run 100% locally on your machine/CI runners? Is this painful enough to care? Is this just a one-time setup headache you ignore once it passes, or does dependency churn cause regular release friction? Would love to know how you guys handle this in production builds. Thanks!
0
0
82
1w
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={}
1
1
892
2w
Xcode 27.2: Deprecated API warning in Apple's SKTestTransaction.h
After updating to the public release of Xcode 27.2 (27B52), I'm seeing this warning in Apple's StoreKitTest framework: **File**: `SKTestTransaction.h`, line 34 **Warning**: `'SKPaymentTransactionState' is deprecated: first deprecated in iOS 18.0` The warning recommends using `PurchaseResult` from `Product.purchase(confirmIn:options:)`. Is this a known issue?
0
0
151
3w
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.
2
0
951
3w
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.
1
0
752
3w
"StoreKit Testing in Xcode" certificate is not trusted on iOS 26
Hello. I have setup a StoreKit testing in the app that was and still is perfectly working on iOS 18. Unfortunately when run on iOS 26 the following error gets printed in the console after calling Transaction.currentEntitlement(for:) method: Failed to verify certificate chain due to client recoverable failure: Error Domain=NSOSStatusErrorDomain Code=-67843 "“StoreKit Testing in Xcode” certificate is not trusted" UserInfo={NSLocalizedDescription=“StoreKit Testing in Xcode” certificate is not trusted, NSUnderlyingError=0x109de7e10 {Error Domain=NSOSStatusErrorDomain Code=-67843 "Certificate 0 “StoreKit Testing in Xcode” has errors: Root is not trusted;" UserInfo={NSLocalizedDescription=Certificate 0 “StoreKit Testing in Xcode” has errors: Root is not trusted;}}} I'm not seeting any StoreKit Testing certificates in phone's certificate trust settings. This test was performed on iOS 26.0 (23A341) with app built in Xcode 16.4. FB20339145
8
2
1.4k
3w
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!
1
0
658
3w
Sandbox returns invalid product identifier for correctly configured auto-renewable subscription
I’m unable to retrieve a newly configured auto-renewable subscription from the Apple Sandbox environment. Product information Bundle ID: com.reynaga.Imoox Product ID: com.reynaga.Imoox.subscription.monthly Subscription status: Prepare for Submission Price: USD 1.99 per month Introductory offer: one-week free trial Result The app requests the product using StoreKit 2: let products = try await Product.products( for: ["com.reynaga.Imoox.subscription.monthly"] ) The request doesn’t throw an error, but the returned products array is empty. I also tested with SKProductsRequest. The Sandbox response is: Valid products: [] Invalid product identifiers: ["com.reynaga.Imoox.subscription.monthly"] Configuration already verified The Bundle ID and Product ID match App Store Connect exactly. The app uses an explicit App ID, not a wildcard. In-App Purchase is enabled for the App ID. The development certificate and provisioning profile are valid. There is no StoreKit Configuration file active in the Run scheme. The Apple Developer Program membership is active. The Paid Applications Agreement is active. Banking and all required tax forms show an Active status. The subscription has a price, localizations, tax category, and availability. Mexico and the United States are included in its availability. The Sandbox Apple Account belongs to the same developer team. The app is development-signed and installed from Xcode 26.2 on a physical iPhone. I signed out and back into the Sandbox account, deleted and reinstalled the app, restarted the device, and cleaned the Xcode build. The issue has persisted well beyond the documented metadata propagation period. Apple Developer Support reviewed the administrative configuration and referred me to the Developer Forums. According to Apple’s documentation, an In-App Purchase doesn’t require prior App Review approval to work in Sandbox. Could an Apple StoreKit or App Store Connect Commerce engineer verify whether the app-to-subscription catalog association is correctly provisioned in Sandbox and refresh or reprocess it if necessary?
0
0
361
Oct ’26
StoreKit 2 Product.products(for:) returns empty array without error on device and TestFlight
Hello, I’m investigating subscription product discovery in my iOS app, BiteTempo. StoreKit 2 completes the product request successfully but returns an empty array for both auto-renewable subscriptions. The issue occurs on a physical iPhone running through Xcode and also in TestFlight. App and products Bundle ID: shehan.NouriJournal App version: 1.0 (4) Monthly: shehan.NouriJournal.plus.monthly Annual: shehan.NouriJournal.plus.annual Reported storefront: USA Device system version reported in diagnostics: 26.6.1 (23G83) Reproduction Run the app on a physical iPhone through Xcode with StoreKit Configuration set to None. Open the subscription paywall. Request both products using Product.products(for:). Inspect the returned array immediately after the awaited call, before filtering. At that breakpoint, returnedProducts contains 0 values. The empty result is not created by application filtering or by converting a caught error into an empty array. Errors are reported separately. Diagnostic output from the Xcode device run Date: 2026-09-26T10:06:24Z App: shehan.NouriJournal 1.0 (4) Storefront: USA Requested: shehan.NouriJournal.plus.monthly, shehan.NouriJournal.plus.annual Returned: 0 Products: Lookup: completed I also see unavailable plans in TestFlight, although the diagnostic output above is specifically from the Xcode device run. Configuration checked Product IDs match App Store Connect exactly. Both subscriptions have pricing and all-country availability. Both products and their subscription group have English (U.S.) localization. Paid Apps Agreement is Active. Other apps under my developer account have working live subscriptions. Debug and Release use the same bundle identifier and signing team. No local StoreKit configuration file is selected. A Sandbox Apple Account is signed in on the test device. These are the first subscriptions for this app and have not yet been submitted for review. I have retried after completing the missing localization, but the result remains empty. The failure occurs during product discovery, before any purchase or server-side transaction verification. What additional checks or diagnostics would help distinguish an app/signing configuration issue from a sandbox product-catalog availability issue? Is there any additional product state or configuration required for these subscriptions to appear in sandbox? I have also submitted a support request to Apple and can provide a minimal reproduction project through the appropriate support channel. Thank you.
1
1
428
Oct ’26
StoreKit testing not working on iOS26.5 simulator
Hi, I'm trying to run our StoreKit unit tests with Xcode26.5 on an iOS26.5 simulator. Host computer has macOS26.5. All tests are failing and in the console I see logs such as [SKTestSession] Error saving configuration file: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error deleting all transactions: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error clearing overrides: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error setting value to 1 for identifier 2 for jp.unext.mediaplayer: Error Domain=SKInternalErrorDomain Code=3 "(null)" And the simulator asks me to provide my AppleID. Tests have been broken since at least 26.4 The release notes claims that it has been fixed but not for me. https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-26_5-release-notes#StoreKit-Testing-in-Xcode Does anyone else have the same issue? Reported FB22774836 just in case.
9
11
1.7k
Sep ’26
ExternalPurchaseCustomLink.isEligible always returns false in Japan Sandbox
ExternalPurchaseCustomLink.isEligible always returns false although the documented Japan requirements are satisfied. Environment: iPhone, iOS 26.7 Bundle ID: com.audio.yoho.ios Storefront: JPN (143462) Japan Sandbox account canMakePayments: true AppTransaction: Sandbox, verified Signed entitlement: com.apple.developer.storekit.custom-purchase-link.allowed-regions = ["jp"] ExternalPurchase.canPresent also returns false. Has anyone successfully tested this API in a development-signed Sandbox build? Feedback Assistant: ExternalPurchaseCustomLink.isEligible always returns false although the documented Japan requirements are satisfied. Environment: iPhone, iOS 26.7 Bundle ID: com.audio.yoho.ios Storefront: JPN (143462) Japan Sandbox account canMakePayments: true AppTransaction: Sandbox, verified Signed entitlement: com.apple.developer.storekit.custom-purchase-link.allowed-regions = ["jp"] ExternalPurchase.canPresent also returns false. Has anyone successfully tested this API in a development-signed Sandbox build? Feedback Assistant: FB24902861
0
0
448
Sep ’26
AppTransaction.refresh() fails before authentication: SKInternalErrorDomain 14 on a development-installed app
I need the supported way to obtain an Apple-signed AppTransaction for a development-installed iOS app without initiating an in-app purchase. DTS directed me to ask on the forums. Environment at the time of reproduction Physical iPhone 17e, iOS 27.0 (24A437). Xcode 27.0 (27A266a), macOS 27.0 (26A428). Swift / SwiftUI / StoreKit; version 0.1.0, build 1. Explicit bundle identifier registered with App Store Connect; development signing. The executable signature, embedded profile and installed executable hash were checked. Installed and launched using devicectl. Network access allowed. No StoreKit Configuration file or StoreKitTest session. No IAP products or TestFlight builds. App Store Connect version 1.0: Prepare for Submission. Observed behavior Call try await AppTransaction.shared once. It throws; no verified transaction is returned. From a separate visible button, the user explicitly calls try await AppTransaction.refresh() once. No Apple Account authentication prompt appears. The refresh fails immediately. The refresh error is identified by Swift pattern matching as StoreKitError.systemError: Outer NSError: StoreKit.StoreKitError, code 1 Underlying NSError: SKInternalErrorDomain, code 14 The refresh was recorded at 2026-09-20T15:40:12Z. The original shared probe recorded only the outer error, so I am not claiming its underlying error was identical. I could not find a public definition of the internal error; I am not interpreting it as SKErrorDomain code 14. A Sandbox Test Account was subsequently created, but has not been signed in on the device. The user could not find the Sandbox Apple Account entry. No purchase has been attempted to make that entry appear. The later controlled refresh is described below. The device App Store account differs from the developer account; we have not established this as a cause. Controlled follow-up on 2026-09-22 A separate instrumented copy of RefreshProbe was development-signed, installed and launched with devicectl on the same phone. The user explicitly tapped refresh once at 2026-09-22T14:35:39Z. It again returned StoreKitError.systemError, outer StoreKit.StoreKitError code 1 and underlying SKInternalErrorDomain code 14. The runtime executable SHA-256 matched the locally validated signed binary. No verified AppTransaction was returned. Bounded traversal of the typed underlying error, NSUnderlyingErrorKey and multiple underlying errors exposed only those two domain/code nodes and no allowlisted numeric service status. We did not collect arbitrary userInfo, accounts or signed transactions. App stdout confirmed the result; no storekitd/appstored system log or Xcode IDE launch comparison is claimed. The user confirmed that this attempt also showed no Apple Account login or password prompt. This instrumented copy is separate from the original source ZIP described below. No automatic retry or purchase was performed. VPN-disabled follow-up on 2026-09-22 After the earlier controlled attempt, the user reported using a VPN. For a second controlled attempt the user confirmed that the VPN was disabled and the normal Apple Account remained unchanged. At 2026-09-22T14:48:25Z, one explicit button tap again returned StoreKitError.systemError, outer StoreKit.StoreKitError code 1 and underlying SKInternalErrorDomain code 14. The bounded error tree was identical to the preceding attempt. The user confirmed that no login or password prompt appeared. No verified AppTransaction was returned. The runtime executable hash matched this signed build. The StoreKit call and diagnostic logic were unchanged; only the run identifier and UI label changed to preserve earlier records, followed by installation/relaunch. VPN and account conditions are user observations, not captured network routing. Disabling the VPN did not resolve this attempt; this is not proof that all network causes are excluded. There were no automatic retries or purchases. Questions Is an Apple-signed sandbox AppTransaction supported in this development-install scenario without an IAP product or purchase attempt? What registration and authentication prerequisites apply? What supported diagnostics or corrective steps should we use when refresh fails before presenting authentication? Is there a supported sandbox authentication path for this case without initiating a purchase or signing out of the normal Apple Account? If logs are needed, which narrowly scoped StoreKit logs should we collect? Focused sample A small project with two targets (192 Swift source lines, no dependencies) is ready to provide. The source entry points match the probes used for the observations above. Both packaged targets passed unsigned generic iOS builds, but the newly assembled focused package has NOT itself been re-signed and run on a device. It performs no purchase or photo-library access and does not include credentials, provisioning profiles, device identifiers or signed transactions. I can provide the package to DTS in the existing email request with a link to this forum post. I have not uploaded the package publicly.
1
0
397
Sep ’26
StoreKit External Purchases or Offers entitlement missing from macOS provisioning profile
Hey We are implementing EU external purchases for both our iOS and native macOS apps as it's written here: https://developer.apple.com/br/support/payment-options-on-the-app-store-in-the-eu For our App ID, we enabled StoreKit External Purchases or Offers, whose entitlement key is: com.apple.developer.storekit.custom-purchase-link.allowed-regions The capability works for iOS, but newly generated macOS provisioning profiles do not contain this entitlement. In Certificates, Identifiers & Profiles, the capability itself shows Platform Support: iOS, tvOS, watchOS, visionOS - macOS is not listed. However, the StoreKit documentation for ExternalPurchaseCustomLink and the EU alternative-payment documentation appear to describe external-purchase support more generally. Could you please clarify: Is com.apple.developer.storekit.custom-purchase-link.allowed-regions currently supported for native macOS apps distributed through the Mac App Store? If not, what entitlement and API should a native macOS app use for EU external purchases and external-purchase token reporting? Is macOS support for the StoreKit External Purchases or Offers entitlement planned or available through a separate entitlement request? At the moment, our macOS provisioning profiles cannot contain this entitlement because macOS is not listed as a supported platform for this capability. Thank you!
0
0
792
Sep ’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
2.3k
Activity
Jun ’26
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
1
Boosts
0
Views
499
Activity
22h
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
2
Boosts
0
Views
567
Activity
1d
SKTestSession.setSimulatedError does not work - Products load successfully despite error configuration
Description I'm attempting to test error handling in my StoreKit implementation using SKTestSession.setSimulatedError(), but it doesn't trigger any errors. All StoreKit APIs (.loadProducts, .purchase, .appTransaction) succeed despite error simulation being configured before API calls. According to Apple's documentation, setSimulatedError(_:forAPI:) should cause the specified API to throw an error, but this doesn't happen in my testing environment. Background / Known issue I found a previous forum discussion: "SKTestSession.setSimulatedError() not working for .loadProducts API in iOS 26.2" which mentioned this was a bug in iOS 26.2 and was supposedly fixed in iOS 26.3. However, I'm experiencing the same issue in my current environment (Xcode 26.6 / iOS 26.5), which suggests either: The bug has regressed, or There's a different underlying issue, or I'm missing something in my implementation I wanted to report this to confirm whether this is still a known issue or if additional steps are needed. Environment Xcode: 26.6 Test Environment: iOS Simulator - iPhone 17 Pro(26.5) Testing Framework: XCTest StoreKitTest Framework: Included in Xcode Code Unit test code import XCTest import StoreKit import StoreKitTest final class StoreKitErrorTests: XCTestCase { func test_LoadProducts_SetSimulatedError() async throws { // Arrange let session = try SKTestSession(configurationFileNamed: "storekit") session.clearTransactions() session.disableDialogs = true // Set simulated error for loadProducts API try await session.setSimulatedError( .generic(.unknown), forAPI: .loadProducts ) // Act - Attempt to load products do { let products = try await Product.products(for: ["com.example.app.testproduct"]) // This line executes - products were loaded successfully print("[TEST] FAIL: Loaded \(products.count) products") XCTFail("setSimulatedError did not work - products loaded successfully") } catch { // This should execute, but it doesn't print("[TEST] PASS: Error was thrown") } } }.storekit file Note: Showing only the product definition. File also contains settings and version info. { "products" : [ { "displayPrice" : "1.23", "familyShareable" : false, "internalID" : "5AE6F98A", "localizations" : [ { "description" : "Test app", "displayName" : "LsStorekit", "locale" : "en_US" } ], "productID" : "com.example.app.testproduct", "referenceName" : "LsStorekit", "type" : "NonConsumable" } ] }Expected Behavior The Product.products(for:) call should throw an error because setSimulatedError(.generic(.unknown), forAPI: .loadProducts) was called before the API invocation. The test should: Configure the simulated error Attempt to load products Catch an error in the catch block Test passes with: "[TEST] PASS: Error was thrown" Actual Behavior Products are loaded successfully despite the error simulation: • The do block completes without throwing • 1 product is returned from Product.products(for:) • XCTFail() is called, indicating the error simulation didn't work • Test fails with: "[TEST] FAIL: Loaded 1 products" Console Output [TEST] FAIL: Loaded 1 products Additional Testing I've tested setSimulatedError with multiple APIs, and all show the same behavior: APIError configurationResult.loadProducts.generic(.unknown)No error thrown.purchase.generic(.unknown)No error thrown.appTransaction.generic(.unknown)No error thrown.appStoreSync.generic(.unknown)No error thrownWhat I've Already Tried • Calling setSimulatedError before app launch (in UI tests) • Calling setSimulatedError after app launch but before API calls • Using different error types (.generic(.unknown), .generic(.networkError(...))) • Testing in both Unit Tests and UI Tests • Using different APIs (.loadProducts, .purchase, .appTransaction) • Clearing transactions and resetting session state • Verifying the .storekit file is correctly loaded (products load successfully) • Running the app first (⌘R) to ensure StoreKit configuration is registered with the StoreKit daemon - This was necessary to fix an initial issue where products weren't loading at all Questions Is this a known limitation of SKTestSession.setSimulatedError()? Are there additional steps required to make error simulation work? Is there an alternative approach to test StoreKit error handling? Does this work in specific Xcode/iOS SDK versions only? Any guidance would be greatly appreciated. I need to test error handling in my StoreKit implementation, but cannot find a way to simulate errors reliably.
Replies
0
Boosts
0
Views
33
Activity
3d
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
1
Boosts
0
Views
609
Activity
1w
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
3
Boosts
0
Views
1k
Activity
1w
StoreKit Testing on iOS 27.2 Simulator returns the refunded renewal when repurchasing a subscription
I'm testing auto-renewable subscriptions with a local .storekit configuration in Xcode 27.2 (27B52). With the same app and configuration on iPhone 17 simulators, I get different results on iOS 26.2 (23C54) and iOS 27.2 (24B8117). Set SKTestSession.timeRate to .oneRenewalEveryThirtySeconds, then purchase an auto-renewable subscription in the app with StoreKit 2. Wait for the original period to expire and the first automatic renewal to appear. Refund that renewal using SKTestSession.refundTransaction(identifier:) and wait for the app to receive the revocation. While the app is still running, purchase the same product again and inspect the verified transaction returned directly by Product.purchase(). Both runtimes return .success with a verified transaction. On iOS 26.2, the repurchase returns a new transaction ID with revocationDate == nil, and Transaction.currentEntitlements contains it. On iOS 27.2, the result has the same ID, purchaseDate, and non-nil revocationDate as the refunded renewal. The current entitlement check yields no verified unrevoked transaction. This reproduced for both a monthly and a three-month subscription. The monthly case also reproduced when calling Product.purchase() without an appAccountToken option. Is this a known issue in StoreKit Testing on iOS 27.2 Simulator? Is there a supported way to test the repurchase path while preserving the refunded transaction in the test history?
Replies
0
Boosts
0
Views
75
Activity
1w
SKTestSession: declined Ask to Buy now produces a purchased transaction on iOS 27.2. Expected?
Hello! I'm glad that Xcode 27.2 could fix many StoreKit testing issues (27.2 release notes). While refreshing my unit tests for Xcode 27.2, I noticed a new behavior of "Ask to Buy" transactions. Since Xcode/iOS 27.2 at least, it seems that declining an Ask to Buy request in an SKTestSession makes StoreKit 2 record a purchase. Is this the intended new behavior? To reproduce: let session = try SKTestSession(configurationFileNamed: "ConfigFile") session.askToBuyEnabled = true session.resetToDefaultState() session.disableDialogs = true session.clearTransactions() let result = try await product.purchase() // .pending let pending = session.allTransactions().first! // state .deferred try session.declineAskToBuyTransaction(identifier: pending.identifier) // a few seconds later for await t in Transaction.all { print(t.unsafePayloadValue) }In my case the purchased product is an auto-renewable subscription with a free-trial intro offer, from a local .storekit file, in a unit test run inside a host app. After the decline, I could observe the following iOS 26.2 simulator SKTestTransaction.state = .deferred Transaction.updates : nothing Transaction.all : empty iOS 27.2 simulator SKTestTransaction.state = .failed Transaction.updates : emits a transaction Transaction.all : 1 transaction: ownershipType = .purchased, reason = .purchase, no revocation, expires at the end of the trial. The test session marks the request as failed, yet StoreKit 2 reports an active subscription... My understanding was that a declined "Ask to Buy" request never produces a transaction. With the new behavior, apps relying on Transaction.all or currentEntitlements would grant access that the Apple user refused... Is the new behavior expected? Or is it a regression (and is it limited to SKTestSession) ? Thanks for your help!
Replies
0
Boosts
0
Views
66
Activity
1w
How is your team handling Privacy Manifest (PrivacyInfo.xcprivacy) audits before App Store submission?
Hey everyone, Curious how other iOS teams/indies are dealing with Apple's Privacy Manifests (PrivacyInfo.xcprivacy) and Required Reason APIs now that enforcement is active. Recently had to deal with third-party dependencies (both CocoaPods and SPM packages) where an undeclared API usage buried deep inside an embedded framework caused an App Store submission headache (ITMS-91053). I wanted to ask: What does your pre-submission workflow look like? Are you auditing privacy manifests and API reasons manually, using Xcode’s built-in report, or do you have a custom script in your CI/CD pipeline? Third-party SDK visibility: How do you catch when an updated dependency introduces an undeclared restricted API or tracking domain before pushing to TestFlight / App Store Connect? Local vs Cloud tooling: If you were checking compliance pre-flight, would your team ever be allowed to upload compiled .ipa binaries to a 3rd-party cloud service, or does security require everything to run 100% locally on your machine/CI runners? Is this painful enough to care? Is this just a one-time setup headache you ignore once it passes, or does dependency churn cause regular release friction? Would love to know how you guys handle this in production builds. Thanks!
Replies
0
Boosts
0
Views
82
Activity
1w
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
1
Boosts
1
Views
892
Activity
2w
Xcode 27.2: Deprecated API warning in Apple's SKTestTransaction.h
After updating to the public release of Xcode 27.2 (27B52), I'm seeing this warning in Apple's StoreKitTest framework: **File**: `SKTestTransaction.h`, line 34 **Warning**: `'SKPaymentTransactionState' is deprecated: first deprecated in iOS 18.0` The warning recommends using `PurchaseResult` from `Product.purchase(confirmIn:options:)`. Is this a known issue?
Replies
0
Boosts
0
Views
151
Activity
3w
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
2
Boosts
0
Views
951
Activity
3w
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
1
Boosts
0
Views
752
Activity
3w
"StoreKit Testing in Xcode" certificate is not trusted on iOS 26
Hello. I have setup a StoreKit testing in the app that was and still is perfectly working on iOS 18. Unfortunately when run on iOS 26 the following error gets printed in the console after calling Transaction.currentEntitlement(for:) method: Failed to verify certificate chain due to client recoverable failure: Error Domain=NSOSStatusErrorDomain Code=-67843 "“StoreKit Testing in Xcode” certificate is not trusted" UserInfo={NSLocalizedDescription=“StoreKit Testing in Xcode” certificate is not trusted, NSUnderlyingError=0x109de7e10 {Error Domain=NSOSStatusErrorDomain Code=-67843 "Certificate 0 “StoreKit Testing in Xcode” has errors: Root is not trusted;" UserInfo={NSLocalizedDescription=Certificate 0 “StoreKit Testing in Xcode” has errors: Root is not trusted;}}} I'm not seeting any StoreKit Testing certificates in phone's certificate trust settings. This test was performed on iOS 26.0 (23A341) with app built in Xcode 16.4. FB20339145
Replies
8
Boosts
2
Views
1.4k
Activity
3w
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
1
Boosts
0
Views
658
Activity
3w
Sandbox returns invalid product identifier for correctly configured auto-renewable subscription
I’m unable to retrieve a newly configured auto-renewable subscription from the Apple Sandbox environment. Product information Bundle ID: com.reynaga.Imoox Product ID: com.reynaga.Imoox.subscription.monthly Subscription status: Prepare for Submission Price: USD 1.99 per month Introductory offer: one-week free trial Result The app requests the product using StoreKit 2: let products = try await Product.products( for: ["com.reynaga.Imoox.subscription.monthly"] ) The request doesn’t throw an error, but the returned products array is empty. I also tested with SKProductsRequest. The Sandbox response is: Valid products: [] Invalid product identifiers: ["com.reynaga.Imoox.subscription.monthly"] Configuration already verified The Bundle ID and Product ID match App Store Connect exactly. The app uses an explicit App ID, not a wildcard. In-App Purchase is enabled for the App ID. The development certificate and provisioning profile are valid. There is no StoreKit Configuration file active in the Run scheme. The Apple Developer Program membership is active. The Paid Applications Agreement is active. Banking and all required tax forms show an Active status. The subscription has a price, localizations, tax category, and availability. Mexico and the United States are included in its availability. The Sandbox Apple Account belongs to the same developer team. The app is development-signed and installed from Xcode 26.2 on a physical iPhone. I signed out and back into the Sandbox account, deleted and reinstalled the app, restarted the device, and cleaned the Xcode build. The issue has persisted well beyond the documented metadata propagation period. Apple Developer Support reviewed the administrative configuration and referred me to the Developer Forums. According to Apple’s documentation, an In-App Purchase doesn’t require prior App Review approval to work in Sandbox. Could an Apple StoreKit or App Store Connect Commerce engineer verify whether the app-to-subscription catalog association is correctly provisioned in Sandbox and refresh or reprocess it if necessary?
Replies
0
Boosts
0
Views
361
Activity
Oct ’26
StoreKit 2 Product.products(for:) returns empty array without error on device and TestFlight
Hello, I’m investigating subscription product discovery in my iOS app, BiteTempo. StoreKit 2 completes the product request successfully but returns an empty array for both auto-renewable subscriptions. The issue occurs on a physical iPhone running through Xcode and also in TestFlight. App and products Bundle ID: shehan.NouriJournal App version: 1.0 (4) Monthly: shehan.NouriJournal.plus.monthly Annual: shehan.NouriJournal.plus.annual Reported storefront: USA Device system version reported in diagnostics: 26.6.1 (23G83) Reproduction Run the app on a physical iPhone through Xcode with StoreKit Configuration set to None. Open the subscription paywall. Request both products using Product.products(for:). Inspect the returned array immediately after the awaited call, before filtering. At that breakpoint, returnedProducts contains 0 values. The empty result is not created by application filtering or by converting a caught error into an empty array. Errors are reported separately. Diagnostic output from the Xcode device run Date: 2026-09-26T10:06:24Z App: shehan.NouriJournal 1.0 (4) Storefront: USA Requested: shehan.NouriJournal.plus.monthly, shehan.NouriJournal.plus.annual Returned: 0 Products: Lookup: completed I also see unavailable plans in TestFlight, although the diagnostic output above is specifically from the Xcode device run. Configuration checked Product IDs match App Store Connect exactly. Both subscriptions have pricing and all-country availability. Both products and their subscription group have English (U.S.) localization. Paid Apps Agreement is Active. Other apps under my developer account have working live subscriptions. Debug and Release use the same bundle identifier and signing team. No local StoreKit configuration file is selected. A Sandbox Apple Account is signed in on the test device. These are the first subscriptions for this app and have not yet been submitted for review. I have retried after completing the missing localization, but the result remains empty. The failure occurs during product discovery, before any purchase or server-side transaction verification. What additional checks or diagnostics would help distinguish an app/signing configuration issue from a sandbox product-catalog availability issue? Is there any additional product state or configuration required for these subscriptions to appear in sandbox? I have also submitted a support request to Apple and can provide a minimal reproduction project through the appropriate support channel. Thank you.
Replies
1
Boosts
1
Views
428
Activity
Oct ’26
StoreKit testing not working on iOS26.5 simulator
Hi, I'm trying to run our StoreKit unit tests with Xcode26.5 on an iOS26.5 simulator. Host computer has macOS26.5. All tests are failing and in the console I see logs such as [SKTestSession] Error saving configuration file: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error deleting all transactions: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error clearing overrides: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error setting value to 1 for identifier 2 for jp.unext.mediaplayer: Error Domain=SKInternalErrorDomain Code=3 "(null)" And the simulator asks me to provide my AppleID. Tests have been broken since at least 26.4 The release notes claims that it has been fixed but not for me. https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-26_5-release-notes#StoreKit-Testing-in-Xcode Does anyone else have the same issue? Reported FB22774836 just in case.
Replies
9
Boosts
11
Views
1.7k
Activity
Sep ’26
ExternalPurchaseCustomLink.isEligible always returns false in Japan Sandbox
ExternalPurchaseCustomLink.isEligible always returns false although the documented Japan requirements are satisfied. Environment: iPhone, iOS 26.7 Bundle ID: com.audio.yoho.ios Storefront: JPN (143462) Japan Sandbox account canMakePayments: true AppTransaction: Sandbox, verified Signed entitlement: com.apple.developer.storekit.custom-purchase-link.allowed-regions = ["jp"] ExternalPurchase.canPresent also returns false. Has anyone successfully tested this API in a development-signed Sandbox build? Feedback Assistant: ExternalPurchaseCustomLink.isEligible always returns false although the documented Japan requirements are satisfied. Environment: iPhone, iOS 26.7 Bundle ID: com.audio.yoho.ios Storefront: JPN (143462) Japan Sandbox account canMakePayments: true AppTransaction: Sandbox, verified Signed entitlement: com.apple.developer.storekit.custom-purchase-link.allowed-regions = ["jp"] ExternalPurchase.canPresent also returns false. Has anyone successfully tested this API in a development-signed Sandbox build? Feedback Assistant: FB24902861
Replies
0
Boosts
0
Views
448
Activity
Sep ’26
AppTransaction.refresh() fails before authentication: SKInternalErrorDomain 14 on a development-installed app
I need the supported way to obtain an Apple-signed AppTransaction for a development-installed iOS app without initiating an in-app purchase. DTS directed me to ask on the forums. Environment at the time of reproduction Physical iPhone 17e, iOS 27.0 (24A437). Xcode 27.0 (27A266a), macOS 27.0 (26A428). Swift / SwiftUI / StoreKit; version 0.1.0, build 1. Explicit bundle identifier registered with App Store Connect; development signing. The executable signature, embedded profile and installed executable hash were checked. Installed and launched using devicectl. Network access allowed. No StoreKit Configuration file or StoreKitTest session. No IAP products or TestFlight builds. App Store Connect version 1.0: Prepare for Submission. Observed behavior Call try await AppTransaction.shared once. It throws; no verified transaction is returned. From a separate visible button, the user explicitly calls try await AppTransaction.refresh() once. No Apple Account authentication prompt appears. The refresh fails immediately. The refresh error is identified by Swift pattern matching as StoreKitError.systemError: Outer NSError: StoreKit.StoreKitError, code 1 Underlying NSError: SKInternalErrorDomain, code 14 The refresh was recorded at 2026-09-20T15:40:12Z. The original shared probe recorded only the outer error, so I am not claiming its underlying error was identical. I could not find a public definition of the internal error; I am not interpreting it as SKErrorDomain code 14. A Sandbox Test Account was subsequently created, but has not been signed in on the device. The user could not find the Sandbox Apple Account entry. No purchase has been attempted to make that entry appear. The later controlled refresh is described below. The device App Store account differs from the developer account; we have not established this as a cause. Controlled follow-up on 2026-09-22 A separate instrumented copy of RefreshProbe was development-signed, installed and launched with devicectl on the same phone. The user explicitly tapped refresh once at 2026-09-22T14:35:39Z. It again returned StoreKitError.systemError, outer StoreKit.StoreKitError code 1 and underlying SKInternalErrorDomain code 14. The runtime executable SHA-256 matched the locally validated signed binary. No verified AppTransaction was returned. Bounded traversal of the typed underlying error, NSUnderlyingErrorKey and multiple underlying errors exposed only those two domain/code nodes and no allowlisted numeric service status. We did not collect arbitrary userInfo, accounts or signed transactions. App stdout confirmed the result; no storekitd/appstored system log or Xcode IDE launch comparison is claimed. The user confirmed that this attempt also showed no Apple Account login or password prompt. This instrumented copy is separate from the original source ZIP described below. No automatic retry or purchase was performed. VPN-disabled follow-up on 2026-09-22 After the earlier controlled attempt, the user reported using a VPN. For a second controlled attempt the user confirmed that the VPN was disabled and the normal Apple Account remained unchanged. At 2026-09-22T14:48:25Z, one explicit button tap again returned StoreKitError.systemError, outer StoreKit.StoreKitError code 1 and underlying SKInternalErrorDomain code 14. The bounded error tree was identical to the preceding attempt. The user confirmed that no login or password prompt appeared. No verified AppTransaction was returned. The runtime executable hash matched this signed build. The StoreKit call and diagnostic logic were unchanged; only the run identifier and UI label changed to preserve earlier records, followed by installation/relaunch. VPN and account conditions are user observations, not captured network routing. Disabling the VPN did not resolve this attempt; this is not proof that all network causes are excluded. There were no automatic retries or purchases. Questions Is an Apple-signed sandbox AppTransaction supported in this development-install scenario without an IAP product or purchase attempt? What registration and authentication prerequisites apply? What supported diagnostics or corrective steps should we use when refresh fails before presenting authentication? Is there a supported sandbox authentication path for this case without initiating a purchase or signing out of the normal Apple Account? If logs are needed, which narrowly scoped StoreKit logs should we collect? Focused sample A small project with two targets (192 Swift source lines, no dependencies) is ready to provide. The source entry points match the probes used for the observations above. Both packaged targets passed unsigned generic iOS builds, but the newly assembled focused package has NOT itself been re-signed and run on a device. It performs no purchase or photo-library access and does not include credentials, provisioning profiles, device identifiers or signed transactions. I can provide the package to DTS in the existing email request with a link to this forum post. I have not uploaded the package publicly.
Replies
1
Boosts
0
Views
397
Activity
Sep ’26
StoreKit External Purchases or Offers entitlement missing from macOS provisioning profile
Hey We are implementing EU external purchases for both our iOS and native macOS apps as it's written here: https://developer.apple.com/br/support/payment-options-on-the-app-store-in-the-eu For our App ID, we enabled StoreKit External Purchases or Offers, whose entitlement key is: com.apple.developer.storekit.custom-purchase-link.allowed-regions The capability works for iOS, but newly generated macOS provisioning profiles do not contain this entitlement. In Certificates, Identifiers & Profiles, the capability itself shows Platform Support: iOS, tvOS, watchOS, visionOS - macOS is not listed. However, the StoreKit documentation for ExternalPurchaseCustomLink and the EU alternative-payment documentation appear to describe external-purchase support more generally. Could you please clarify: Is com.apple.developer.storekit.custom-purchase-link.allowed-regions currently supported for native macOS apps distributed through the Mac App Store? If not, what entitlement and API should a native macOS app use for EU external purchases and external-purchase token reporting? Is macOS support for the StoreKit External Purchases or Offers entitlement planned or available through a separate entitlement request? At the moment, our macOS provisioning profiles cannot contain this entitlement because macOS is not listed as a supported platform for this capability. Thank you!
Replies
0
Boosts
0
Views
792
Activity
Sep ’26