On https://developer.apple.com/documentation/AppIntentsTesting/testing-your-app-intents-code
Apple showcases the following example using AppIntentsTesting to query entities indexed in spotlight. For me, calling .spotlightQuery on any entity definition causes a crash.
func testAllEventsIndexed() async throws {
let eventDef = definitions.entities["EventEntity"]
let allIndexed = try await eventDef
.spotlightQuery(nil)
XCTAssertGreaterThanOrEqual(allIndexed.count, 3)
}
Crash:
expression unexpectedly raised an error: Failed to obtain the result of the distributed invocation after it was executed. Remote threw executionPermissionDenied(requestBundleID:
Is anyone else seeing this crash, or is it just me?
Thanks!