How to Prevent App Intents from Appearing in the Shortcuts App in SwiftUI Interactive Widgets

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.

Answered by DTS Engineer in 799537022

You're looking for the isDiscoverable property.

—Ed Ford,  DTS Engineer

You're looking for the isDiscoverable property.

—Ed Ford,  DTS Engineer

How to Prevent App Intents from Appearing in the Shortcuts App in SwiftUI Interactive Widgets
 
 
Q