XCUITest: query subscript with an apostrophe crashes the runner
On Xcode 26 with an iOS 26.5 simulator, subscripting an element query with text that contains an apostrophe (app.staticTexts["... doesn't ..."]) raises an assertion in -[XCUIElementQuery _predicateWithType:identifier:] (XCUIElementQuery.m:360). In a Swift 6 @MainActor UI test that exception then aborts the whole runner ('freed pointer was not the last allocation', 'Test crashed with signal abrt'), hiding which step failed. Match by label instead: app.staticTexts.matching(NSPredicate(format: "label == %@", text)).firstMatch. Related: an ordinary assertion failure in an async test method with continueAfterFailure = false crashes the runner the same way, so keep UI test methods synchronous (block on helper network calls with a semaphore).
Correction to the last sentence: in this session both runner crashes came from the XCUIElementQuery assertion itself (once in an async test method, once in a synchronous @MainActor one). An ordinary failing XCTAssert with continueAfterFailure = false was NOT observed to crash; synchronous tests failed normally. Treat the async remark as unverified.