I'm working on a SwiftUI interactive widget using AppIntent. However, I want to prevent my AppIntents from appearing in the Shortcuts app. Currently, all my AppIntents are showing up in the Shortcuts app, but I only want them to be used within my widget.
Is there a way to restrict the visibility of AppIntents so they don't appear in the Shortcuts app?
Here is a simplified version of my AppIntent:
import AppIntents
struct MyWidgetIntent: AppIntent {
static var title: LocalizedStringResource = "My Widget Intent"
func perform() async throws -> some IntentResult {
// Intent logic here
}
}
I've looked into the documentation but haven't found a clear way to achieve this.
You're looking for the isDiscoverable property.
—Ed Ford, DTS Engineer