INSendMessageAttachment docs, sample code, or suggestions

Has anyone seen any docs, sample code, or have suggestions on how to support INSendMessageAttachment and the Siri vocabulary to attach the file?

Answered by Zaid in 616274022
In iOS/iPadOS 14 and watchOS 7, your user can send a brief audio clip through your SiriKit message app by invoking Siri with a "send audio with app" and then

Code Block
    @available(iOS 14.0, *)
    optional func resolveOutgoingMessageType(for intent: INSendMessageIntent, with completion: @escaping (INOutgoingMessageTypeResolutionResult) -> Void)

will be called. In that callback make sure to call

Code Block
        completion(.success(with: .outgoingMessageAudio))


or an appropriate response.


Much thanks to the WWDC 2020 SiriKit lab engineers for literally answering this question in person, virtually
Accepted Answer
In iOS/iPadOS 14 and watchOS 7, your user can send a brief audio clip through your SiriKit message app by invoking Siri with a "send audio with app" and then

Code Block
    @available(iOS 14.0, *)
    optional func resolveOutgoingMessageType(for intent: INSendMessageIntent, with completion: @escaping (INOutgoingMessageTypeResolutionResult) -> Void)

will be called. In that callback make sure to call

Code Block
        completion(.success(with: .outgoingMessageAudio))


or an appropriate response.


Much thanks to the WWDC 2020 SiriKit lab engineers for literally answering this question in person, virtually
INSendMessageAttachment docs, sample code, or suggestions
 
 
Q