Yes. The compiler is complaining because you haven't specified a title.
struct SearchIntent: ShowInAppSearchResultsIntent {
static let title: LocalizedStringResource = "Search App"
static let searchScopes: [StringSearchScope] = [.general]
static var openAppWhenRun: Bool = true
@Parameter(title: "Search Text")
var criteria: StringSearchCriteria
@MainActor func perform() async throws -> some IntentResult {
return .result()
}
}
The above should compile for you. To find out how to conform to a protocol, ⌘ + click on the protocol (ShowInAppSearchResultsIntent) to see what is required in the docs.
Topic:
App & System Services
SubTopic:
General
Tags: