I am experiencing the same issue. Below is a minimal reproducible sample. It works on iOS 26 and 26.1 but fails on iOS 26.2.
@Test
func testSimulatedErrorForLoadProducts() async throws {
try await skSession.setSimulatedError(.generic(.unknown), forAPI: .loadProducts)
let failure = await skSession.simulatedError(forAPI: .loadProducts)
#expect(failure != nil) // ✅
await #expect(throws: Error.self) { // ❌ Expectation failed: an error was expected but none was thrown
_ = try await Product.products(for: ["product_id"])
}
}
Topic:
App & System Services
SubTopic:
StoreKit
Tags: