SiriKit

 SiriKit

4239ea2bf38d7178476faa8787683105?s=128

Motoki Narita

June 23, 2016
Tweet

Transcript

  1. 2.

    ࣗݾ঺հ w ੒ాݩًʢͳΓͨ΋ͱ͖ʣ w !NP@UP@ w J04ΤϯδχΞ w ݸਓͰ΋ΧϝϥΞϓϦΛ࡞ͬͨΓ w

    88%$ߦ͚ͳ͔ͬͨͷͰDBUDI88%$ͱ͍͏ே͔࣌Β 88%$ͷ৘ใަ׵Λ͢ΔษڧձΛ88%$ͷؒຖே࣌ʹ ى͖ͯ։࠵ͯ͠·ͨ͠
  2. 3.
  3. 8.

    4JSJ,JU%PNBJOT w "VEJPPSWJEFPDBMMJOH w 4UBSUBOBVEJPDBMM w 4UBSUBWJEFPDBMM w 4FBSDIUIFVTFS`TDBMMIJTUPSZ w

    .FTTBHJOH w 4FOEBNFTTBHF w 4FBSDIGPSNFTTBHFT w 1IPUP4FBSDI w 4FBSDIGPSQIPUPT w 1MBZBQIPUPTMJEFTIPX w 1BZNFOUT w 4FOEBQBZNFOUUPBOPUIFSVTFS w 3FRVFTUBQBZNFOUGSPNBOPUIFS VTFS w 8PSLPVUT w 4UBSUBXPSLPVU w 1BVTFBXPSLPVU w 3FTVNFBXPSLPVU w &OEBXPSLPVU w $BODFMBXPSLPVU w 3JEFCPPLJOH w (FUBMJTUPGBWBJMBCMFSJEFT w #PPLBSJEF w (FUUIFTUBUVTPGBCPPLFESJEF
  4. 24.
  5. 28.
  6. 29.

    import Intents import IntentsExampleKit class IntentHandler: INExtension { override func

    handler(for intent: INIntent) -> AnyObject { return IntentExampleHandler() } }
  7. 30.

    import Foundation import Intents public final class IntentExampleHandler: NSObject, INStartWorkoutIntentHandling,

    INEndWorkoutIntentHandling { public func resolveWorkoutName(forStartWorkout intent: INStartWorkoutIntent, with completion: (INStringResolutionResult) -> Void) { let resolutionResult = INStringResolutionResult.success(with: "Running") completion(resolutionResult) } public func confirm(startWorkout startWorkoutIntent: INStartWorkoutIntent, completion: (INStartWorkoutIntentResponse) -> Void) { let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartWorkoutIntent)) let response = INStartWorkoutIntentResponse(code: .success, userActivity: userActivity) completion(response) } public func handle(startWorkout startWorkoutIntent: INStartWorkoutIntent, completion: (INStartWorkoutIntentResponse) -> Void) { let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartWorkoutIntent)) let response = INStartWorkoutIntentResponse(code: .success, userActivity: userActivity) completion(response) } }
  8. 31.
  9. 32.

    ·ͱΊ w छྨͷ*OUFOUT%PNBJOΛαϙʔτ w 4JSJ͕*OUFOUΦϒδΣΫτʹม׵ͯ͘͠ΕΔ w *OGPQMJTUʹαϙʔτ͢Δ*OUFOUΛهࡌ w 3FTPMWFͰύϥϝʔλͷόϦσʔγϣϯ $POpSNͰ֬ೝɺ

    )BOEMFͰλεΫͷ࣮ߦ w *OUFOUΛϋϯυϦϯά͢ΔϩδοΫपΓ͸&NCFEEFE 'SBNFXPSLʹ࣮૷ w ͠Ό΂Βͳ͍ͱߦ͚ͳ͍ͷͰσόοά͕΍ΓͮΒ͍
 ʢஏ͔͍ͣ͠ʣ w 65Λॻ͜͏
  10. 33.

    References • https://developer.apple.com/library/prerelease/content/documentation/Intents/Conceptual/ SiriIntegrationGuide/index.html • https://developer.apple.com/library/prerelease/content/samplecode/UnicornChat/ Introduction/Intro.html#//apple_ref/doc/uid/TP40017332 • https://developer.apple.com/library/prerelease/content/documentation/Intents/Conceptual/ SiriIntegrationGuide/SiriDomains.html#//apple_ref/doc/uid/TP40016875-CH9-SW2

    • https://developer.apple.com/reference/intents • https://developer.apple.com/reference/intentsui • https://developer.apple.com/library/prerelease/content/documentation/Intents/Conceptual/ SiriIntegrationGuide/SpecifyingCustomVocabulary.html#//apple_ref/doc/uid/TP40016875- CH6-SW1 • https://developer.apple.com/videos/play/wwdc2016/217/ • https://developer.apple.com/videos/play/wwdc2016/225/
  11. 34.