Implemented AppIntent doesn't show in Shortcuts app

I'm trying to test out the new AppIntents API that is currently on iOS16 Beta. Looking at the documentation, the implementation seems pretty straight forward, but after implementing it, I'm not seeing my AppIntent in the Shortcuts app. The device is running iOS 16.0.

This is how I implemented the AppIntent:

import AppIntents

struct DoSomethingIntent: AppIntent {
    
    static var title: LocalizedStringResource = "This will do something"
    
    static var description = IntentDescription("Does something")
    
    func perform() async throws -> some PerformResult {
        return .finished(value: "Done")
    }
}

According to the documentation the Shortcuts app should be able to find my AppIntent after my app gets installed, but I see that's not the case. Does anybody know what my implementation is missing or have I misunderstood the whole thing?

I had the same issue. I could fix it by setting the Xcode-select to the Xcode-beta version. Now for me all the AppIntents appear in the shortcuts app. When you want to create an AppShortcut, you should omit custom AppEntity based parameters from the phrases. Otherwise, they don't appear in the shortcuts app and are not usable by Siri. This is likely a bug and I already filed feedback for it.

Hi I also had the same issue. You can also try by setting Command Line Tool to Xcode 14.0 (Xcode->Preference->Locations->Command Line Tools.). Also implement AppShortcutsProvider protocol. It worked for me.

struct StartMeditationIntent: AppIntent {

    static let title: LocalizedStringResource = "Start Meditation Session"

    func perform() async throws -> some IntentPerformResult  {

        let answer: LocalizedStringResource = "Session Started"

        let dialogIntent  = IntentDialog(answer)

        return .finished(dialog: dialogIntent)

    }

}



struct LibraryAutoShortCuts: AppShortcutsProvider {

    static var appShortcuts: [AppShortcut] {

        AppShortcut(intent: StartMeditationIntent(), phrases: ["Start Meditation"])

    }
}

To have the shortcut added to the Shortcuts app on install, you must include the app name in the shortcut phrase. Otherwise the shortcut must be added manually. A bit on the kludgy side IMHO, the app name could be a separate property... The "Dive Into App Shortcuts" video explains this briefly. They use the interpolated method of adding the app name a la: "(.applicationName) the rest of the shortcut phrase". And if you have more than one phrase they all must have the app name embedded. HTH

Implemented AppIntent doesn't show in Shortcuts app
 
 
Q