SKTestSession configurations seem to have been broken starting in Xcode 26.3. The release notes for iOS 26.5 indicate that it was supposed to be fixed there, but I still haven't been able to get it to work. Is there something that has changed recently about how SKTestSession configurations need to be used?
SKTestSession configurations broken?
Hello,
This issue with SKTestSession is fixed for simulators starting with iOS 26.6.
Nothing changed with SKTestSession regarding the use of different StoreKit configurations, please try again with the new beta.
@Frameworks Engineer The issue with SKTestSession is not fixed in iOS 26.6. I have reported the problem in a feedback (FB22836426).
In my unit tests, I test the product purchase with a StoreKit Configuration. My test begins by creating a testing session:
@Test
func testPurchase() async throws {
let session = try SKTestSession(configurationFileNamed: "StoreKitConfiguration")
session.disableDialogs = true
session.clearTransactions()
The test then runs my app's code that performs the purchase:
let result = try await product.purchase(confirmIn: scene)
At that moment, the user purchase dialog appears and the test hangs, waiting for the user to perform the purchase. That is wrong. I said disableDialogs = true; the user dialogs are exactly what is NOT supposed to happen!
@Frameworks Engineer
This seems to be broken in iOS 27.0 (Beta 2).
Refer: https://developer.apple.com/forums/thread/836842
Suggestion:
- It would be great if Apple could have test cases to ensure it passes for every release so that this doesn't have to be caught by developers.
Please have a look at the Feedback: FB23566876