Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SiriKit

 SiriKit

Sing Jie Lee

July 22, 2016
Tweet

More Decks by Sing Jie Lee

Other Decks in Technology

Transcript

  1. “Please do me a favour and send $10 to Vincent

    by launching the AirPay app”
  2. “Hey Siri, please do me a favour and send my

    precious earned $10 by launching the AirPay app”
  3. “Hey Siri, please do me a favour and send my

    precious earned $10 by launching the AirPay app” “To whom?” “Vincent”
  4. INSearchForMessagesIntent.h INSendMessageIntent.h INSetMessageAttributeIntent.h Ride INGetRideStatusIntent.h INListRideOptionsIntent.h INRequestRideIntent.h Payment INRequestPaymentIntent.h INSendPaymentIntent.h

    VOIP INSearchCallHistoryIntent.h INStartAudioCallIntent.h INStartVideoCallIntent.h Messaging INSearchForPhotosIntent.h INStartPhotoPlaybackIntent.h Photos Workout INCancelWorkoutIntent.h INEndWorkoutIntent.h INPauseWorkoutIntent.h INResumeWorkoutIntent.h INStartWorkoutIntent.h
  5. INSearchForMessagesIntent.h INSendMessageIntent.h INSetMessageAttributeIntent.h Ride INGetRideStatusIntent.h INListRideOptionsIntent.h INRequestRideIntent.h Payment INRequestPaymentIntent.h INSendPaymentIntent.h

    VOIP INSearchCallHistoryIntent.h INStartAudioCallIntent.h INStartVideoCallIntent.h Messaging INSearchForPhotosIntent.h INStartPhotoPlaybackIntent.h Photos Workout INCancelWorkoutIntent.h INEndWorkoutIntent.h INPauseWorkoutIntent.h INResumeWorkoutIntent.h INStartWorkoutIntent.h
  6. @interface INSendMessageIntent : INIntent - (instancetype)initWithRecipients:(nullable NSArray<INPerson *> *)recipients content:(nullable

    NSString *)content groupName:(nullable NSString *)groupName serviceName:(nullable NSString *)serviceName sender:(nullable INPerson *)sender; // Contacts to whom the message should be sent. @property (readonly, copy, nonatomic) NSArray<INPerson *> *recipients; // Body text of the message. @property (readonly, copy, nonatomic) NSString *content; @property (readonly, copy, nonatomic) NSString *groupName; // Specified service for the message. @property (readonly, copy, nonatomic) NSString *serviceName; // The person, or account, sending the message. @property (readonly, copy, nonatomic) INPerson *sender; @end INSendMessageIntent.h
  7. protocol INSendMessageIntentHandling <NSObject> @required - (void)handleSendMessage:(INSendMessageIntent *)intent completion:(void (^)(INSendMessageIntentResponse *response))completion;

    @optional - (void)confirmSendMessage:(INSendMessageIntent *)intent completion:(void (^)(INSendMessageIntentResponse *response))completion; - (void)resolveRecipientsForSendMessage:(INSendMessageIntent *)intent withCompletion:(void (^)(NSArray<INPersonResolutionResult *> *resolutionResults))completion; - (void)resolveContentForSendMessage:(INSendMessageIntent *)intent withCompletion:(void (^)(INStringResolutionResult *resolutionResult))completion; - (void)resolveGroupNameForSendMessage:(INSendMessageIntent *)intent withCompletion:(void (^)(INStringResolutionResult *resolutionResult))completion; - (void)resolveServiceNameForSendMessage:(INSendMessageIntent *)intent withCompletion:(void (^)(INStringResolutionResult *resolutionResult))completion; - (void)resolveSenderForSendMessage:(INSendMessageIntent *)intent withCompletion:(void (^)(INPersonResolutionResult *resolutionResult))completion; @end INSendMessageIntentHandling.h
  8. “Message Vincent I miss him using BeeTalk.” Domain: Messaging Intent:

    sendMessage App: BeeTalk User: Vincent Content: I miss him
  9. APP VOCABULARY User-Specific Global Vocabulary Contact names Photo tags Photo

    album names Workout names Ride options Workout names
  10. Q&A