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

  1. Create a SwiftUI iOS app com.example.MyApp.

  2. Add a MyApp.storekit with one auto-renewable subscription.

  3. Add a UI test target. In the xctestplan: defaultOptions.storeKitConfiguration = "MyApp.storekit".

  4. In the UI test base case:

    private var storeKitSession: SKTestSession?
    
    override func setUpWithError() throws {
        storeKitSession = try SKTestSession(configurationFileNamed: "MyApp")
        app.launch()
    }
    
  5. Boot a fresh iOS 26.5 simulator.

  6. Run via CLI:

    xcodebuild test \
      -project MyApp.xcodeproj \
      -scheme MyApp \
      -testPlan MyAppUITests \
      -destination "platform=iOS Simulator,name=iPhone 17 Pro"
    
  7. 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)

  1. No-op XCTestCase "warmup" that calls XCUIApplication.launch() + sleep — does not trigger the sync because XCUIApplication.launch() routes through XCTRunner, not IDELaunchSession.
  2. Multi-destination xcodebuild test with -parallelize-tests-among-destinations.
  3. Manually cp-ing the .storekit file into the AppGroup Octane container — storekitd only loads via the XPC channel.
  4. 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

FB22237318SKTestSession 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 unchangedSKTestSession 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?

@den2207

Thank you for filing FB22237318, which is a known issue. The team is still investigating the issue and there isn't a workaround.

xcodebuild test (CLI) does not sync .storekit to storekitd on iOS 26.5 — SKTestSession unusable in CI
 
 
Q