Donating App Intent with parameters (iOS 16 beta)

Has anybody managed to use the new IntentDonationManager to donate an intent which has a number of parameters defined with @Parameter?

For example, given this snippet:

struct MyIntent: AppIntent {
...
    @Parameter(title: "MyParameter")
    var parameter: MyParameter
...
}

When you use the constructor, the arguments are of type IntentParameter<MyParameter> rather than MyParameter. How do you actually create an instance of IntentParameter to pass into the constructor?

Answered by nachojackson in 725258022

Found the answer! https://twitter.com/DoleeYang/status/1555828067049672704?s=20&t=pIZNltvSRbBgSD1yp3gRfw

Accepted Answer

Found the answer! https://twitter.com/DoleeYang/status/1555828067049672704?s=20&t=pIZNltvSRbBgSD1yp3gRfw

Donating App Intent with parameters (iOS 16 beta)
 
 
Q