Not seeing a Default View running my intent.

The talk describes a Default View displayed whenever running my intent (7:32).

I never see any view other than the Siri interaction at the bottom. Are there other requirements for getting the Default View to display?

I have experimented with adding a custom snippet view to the result:

func perform() async throws -> some IntentResult & ProvidesDialog & ShowsSnippetView {
...
     return .result(
          dialog: "\(response)",
          view: IntentSnippetView(prompt)
)

That does display, but has way too much information. My IntentSnippetView only has a single Text("Hello World") but the view shows the entire contents of the response value as well. Is there any way to limit what actually shows up in the response snippet view?

Is there any way to get the described Default View to show while the intent is running?

The talk also suggests custom views can be shown at Intent Confirmation and Value Confirmation. In my case neither of those seem applicable since those confirmation steps are not used.

I'd really like to have at least the Default View, or be able to make the result view less overwhelming. I've looked through the documentation, but don't find much about custom widget views or intent views - any pointers would be appreciated!


Here's my code just in case its clear I'm doing something wrong:

import AppIntents

struct AskMyApp: AppIntent {
    static var title: LocalizedStringResource = "Ask"
    static var description: IntentDescription = IntentDescription("This will ask MyApp")
    static var openAppWhenRun = false

    @Parameter(title: "Prompt", description: "The prompt to send", requestValueDialog: IntentDialog("What would you like to ask?"))
    var prompt: String

    @MainActor
    func perform() async throws -> some IntentResult & ProvidesDialog & ShowsSnippetView {
        let response = ViewModel.shared.sendIntentPrompt(newPrompt: prompt)

        return .result(
            dialog: "\(response)",
            view: AskMyAppSnippetView(prompt)
        )
    }

    static var parameterSummary: some ParameterSummary {
        Summary("Ask \(\.$prompt)")
    }
}

import SwiftUI

struct AskMyAppSnippetView: View {

    var body: some View {
        Text("Hello World")
    }
}

Oops, that was an earlier version of the AskyMyAppSnippetView, I had added a prompt display:

struct AskMyAppSnippetView: View {
    var question: String

    init(_ prompt: String) {
        question = prompt
    }
    var body: some View {
        Text("Your question was: \(question)")
    }
}

I don't think it really matters, since that didn't change the way the view displayed at the intent result but this is the corrected version thats compatible with the intent code above.

Just to follow up on this in case anyone else has similar questions. I think I have found the root of my issue and it was indeed user error.

It turns out the device we were using to test had the "Always Show Siri Captions" and "Always Show Speech" options enabled in /Settings /Siri&Search /SiriResponses

Resetting those options back to the defaults gets the App Intents Views to show up without competing for screen space.

Since I cant find a way to detect in code whether the user has those options enabled, we've added settings in our app to toggle the App Intent views.

This is what it looks like on an iPhone 8 which seems to be the smallest screen for an iOS 16 device.

Not seeing a Default View running my intent.
 
 
Q