I am running a very simple UI test on Xcode 14 beta 6 that sets up a StoreKit testing session and then attempts to bring up a purchase dialog. Unfortunately, PassbookUIService is crashing and thereby causing the purchase to be canceled. Here is the crash report:
For context, the UI test is very simple:
func testExample() throws {
_ = self.expectation(description: "Never fulfilled")
let session = try SKTestSession(configurationFileNamed: "CatsAndLlamas.storekit")
session.clearTransactions()
session.resetToDefaultState()
session.disableDialogs = false
let app = XCUIApplication()
app.launch()
let tablesQuery = app.tables
tablesQuery.staticTexts["Buy Product"].tap()
tablesQuery.cells.containing(.staticText, identifier:"Silver Llama").staticTexts["Subscribe"].tap()
waitForExpectations(timeout: 30)
}
On an iOS 15.5 simulator device, the UI test works as expected.
However, on an iOS 16 simulator device, the UI test behaves as if the purchase request were canceled before the dialog is even displayed.
This is when PassbookUIService crashes. I believe this crash is causing StoreKit (or StoreKitTest) to consider the purchase canceled.
(I have screenshots of the behavior but I’ve not been able to successfully include them in this post for some reason.)