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

実践 CallKit/PushKit ときどき🐛退治 / iOSDC 2019

monoqlo
September 07, 2019

実践 CallKit/PushKit ときどき🐛退治 / iOSDC 2019

iOSDC JAPAN 2019 2019/09/07 13:30〜 Track E レギュラートーク(30分)

monoqlo

September 07, 2019
Tweet

More Decks by monoqlo

Other Decks in Technology

Transcript

  1. @monoqloʢ΋ͷ͘Ζʣ ࣮ફ CallKit/PushKit ͱ͖Ͳ͖ୀ࣏ iOSDC TOKYO 2019

  2. PushKit CallKit

  3. None
  4. ※ Πϥετ͸ΠϝʔδͰ͢

  5. ※ Πϥετ͸ΠϝʔδͰ͢

  6. ※ Πϥετ͸ΠϝʔδͰ͢

  7. ※ Πϥετ͸ΠϝʔδͰ͢

  8. ֤ߏ੒ཁૉͷ֓ཁ

  9. 1.CallKit 2.PushKit 3.Twilio ߏ੒ཁૉ

  10. 1. CallKit

  11. None
  12. None
  13. ΞϯϩοΫ࣌ ϩοΫத Ԡ౴ޙ ண৴த ϩοΫத

  14. ͜ͷϘλϯ͔Β ΞϓϦΛىಈͰ͖Δ

  15. ϩοΫதͰͳ͚Ε͹ɺ App Switcher Ͱ ੾Γସ͑΋Մೳ

  16. • iOS 10 ͔Β࢖͑ΔϑϨʔϜϫʔΫ • Apple ७ਖ਼ి࿩ΞϓϦͷΑ͏ͳ UI/UX Λ ࣮ݱͰ͖Δ

    • ண৴࣌ʹి࿩ΞϓϦͱಉ౳ͷ UI Λදࣔ • ௨࿩ཤྺʹදࣔɺཤྺ͔Βର৅ΞϓϦΛ ࢦఆͯ͠ൃ৴ • Call Directory Extension • ண৴ڋ൱΍ൃ৴ऀͷࣝผ͕Ͱ͖Δ CallKit
  17. 2. PushKit

  18. • iOS 8 ͔Β࢖͑ΔϑϨʔϜϫʔΫ • VoIPʹ࠷దͳϓογϡ௨஌͕Ͱ͖Δ • ௨ৗͷϓογϡ௨஌ʹൺ΂ɺ͍͔ͭ͘ ϝϦοτ༗Γ PushKit

  19. UserNotifications vs. PushKit 6TFS/PUJpDBUJPOT 1VTI,JU Ξϥʔτόοδ ௨஌Ի දࣔͰ͖Δ /POF ஗Ԇ

    ϕετΤϑΥʔτ ʢ࣮֬ʹಧ͘อূ΋ͳ͍ʣ ΑΓ௿஗Ԇ ʢ௨ৗΑΓ΋༏ઌ͞ΕΔʣ ϖΠϩʔυ௕ ,# )551 ,# ΞϓϦ͕ࢮΜͰΔ࣌ ͷڍಈ ಛʹԿ΋ͯ͘͠Εͳ͍ ΞϓϦΛόοΫάϥ΢ϯυ Ͱىಈͯ͘͠ΕΔ
  20. 3. Twilio

  21. None
  22. • ͓खܰʹ VoIP ௨࿩Λ࣮ݱͰ͖Δ Web αʔϏε • ΫϥΠΞϯτʢϒϥ΢β/iOS/Androidʣ ޲͚ʹ SDKɺαʔόʔ޲͚ʹ

    API ͱϔϧ ύʔϥΠϒϥϦ͕ఏڙ͞Ε͍ͯΔ Twilio
  23. Programmable Voice

  24. CallKit/PushKit/(Twilio) ͷ࢖͍ํ

  25. • WWDC Video • υΩϡϝϯτ • αϯϓϧίʔυ CallKit/PushKit ʹ͍ͭͯௐ΂ͯΈΔ

  26. งғؾ͸ WWDC Video ΛݟΕ͹ͳΜͱͳ͘Θ͔Δ https://developer.apple.com/videos/play/wwdc2016/230/

  27. Apple ͷαϯϓϧίʔυ ͋ͬͨΑ͏ͳ

  28. Enhancing VoIP Apps with CallKit - WWDC 2016 - Videos

    - Apple Developer https://developer.apple.com/videos/play/wwdc2016/230/ Speakerbox ͱ͍͏αϯϓϧίʔυ͕͋Γͦ͏ʁ
  29. None
  30. Ͳ͜ʁ

  31. ͍ͭͷ·ʹ͔ ͳ͘ͳͬͯͨ githubʹ্͛ͯΔਓ͸͍ͨ…

  32. Twilioͷαϯϓϧίʔυ զʑ͕ਅʹݟΔ΂͖͸

  33. • https://github.com/twilio/voice- quickstart-swift • ࠷௿ݶͷίʔυ͸͜ΕΛࢀߟʹ͓͚ͯ͠͹ OK ͩͬͨ • README ΋ॆ࣮ͯ͠Δ

    Twilio Voice Quickstart for iOS
  34. ඞཁ࠷௿ݶͷίʔυ αϯϓϧίʔυ͔ΒΘ͔Δ

  35. ొ৔ਓ෺ • CXProvider • CXCallController • PKPushRegistry ֎෦ىҼͷཁٻΛγεςϜʹ఻͑ɺ γεςϜ͔ΒͷཁٻΛ֎෦ʹ఻͑Δਓ ΞϓϦىҼͷཁٻΛγεςϜʹ఻͑Δਓ

    VoIP ϓογϡ௨஌Ͱ͖ΔΑ͏ʹ͢Δਓ
  36. https://developer.apple.com/videos/play/wwdc2016/230/

  37. ண৴=>Ԡ౴=>௨࿩ऴྃ ͷྫ

  38. https://developer.apple.com/videos/play/wwdc2016/230/

  39. https://developer.apple.com/videos/play/wwdc2016/230/

  40. https://developer.apple.com/videos/play/wwdc2016/230/

  41. let configuration = CXProviderConfiguration(localizedName: “App Name”) configuration.includesCallsInRecents = false configuration.maximumCallGroups

    = 1 configuration.maximumCallsPerCallGroup = 1 configuration.iconTemplateImageData = UIImage(named: “AppLogo")!.pngData() self.provider = CXProvider(configuration: configuration) self.provider.setDelegate(self, queue: nil) CXProvider ͷ४උ
  42. self.callController = CXCallController() CXCallController ͷ४උ

  43. extension VoiceCallManager: PKPushRegistryDelegate { func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials:

    PKPushCredentials, for type: PKPushType) { guard type == .voIP else { return } let deviceToken = (pushCredentials.token as NSData).description // ϓογϡ௨஌ड͚औΕΔΑ͏ʹαʔόʔ౉͢ } } } PKPushRegistryDelegate ͷ४උ
  44. extension VoiceCallManager: PKPushRegistryDelegate { func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload:

    PKPushPayload, for type: PKPushType, completion: @escaping () -> Void) { if type == .voIP { // ண৴ը໘Λදࣔ͢Δ // reportNewIncomingCall(with:update:completion:) Λίʔϧ } completion() } } PKPushRegistryDelegate ͷ४උ
  45. extension VoiceCallManager: CXProviderDelegate { func providerDidReset(_ provider: CXProvider) { //

    Ի੠༗ޮԽ } func provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession) { // Ի੠༗ޮԽ } func provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) { // Ի੠ແޮԽ } } CXProviderDelegate ͷ४උ
  46. extension VoiceCallManager: CXProviderDelegate { func provider(_ provider: CXProvider, perform action:

    CXSetMutedCallAction) { // ϛϡʔτON/OFFॲཧ action.fulfill() } func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) { // Ԡ౴ޙͷॲཧ.͜ͷλΠϛϯάͰ͸·ͩԻ੠ΛແޮԽ͓ͯ͘͠ action.fulfill() } } CXProviderDelegate ͷ४උ
  47. extension VoiceCallManager: CXProviderDelegate { func provider(_ provider: CXProvider, perform action:

    CXStartCallAction) { // ൃ৴ॲཧΛͯ͠CallKitʹ఻͑Δ provider.reportOutgoingCall(with: action.callUUID, startedConnectingAt: Date()) provider.reportOutgoingCall(with: action.callUUID, connectedAt: Date()) action.fulfill() } } CXProviderDelegate ͷ४උ
  48. extension VoiceCallManager: CXProviderDelegate { func provider(_ provider: CXProvider, perform action:

    CXEndCallAction) { // ੾அޙͷॲཧ action.fulfill() } func provider(_ provider: CXProvider, perform action: CXSetHeldCallAction) { // อཹON/OFFॲཧ action.fulfill() } } CXProviderDelegate ͷ४උ
  49. let voipRegistry = PKPushRegistry(queue: .main) voipRegistry.delegate = self voipRegistry.desiredPushTypes =

    Set([.voIP]) self.voIPPushRegistry = voipRegistry // ௨ৗ਺ඵҎ಺ʹҎԼͷσϦήʔτϝιου͕ίʔϧ͞ΕΔ // func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials: PKPushCredentials, for type: PKPushType) VoIP Push ௨஌ͷొ࿥
  50. let callHandle = CXHandle(type: .generic, value: "໊લ") let startCallAction =

    CXStartCallAction(call: uuid, handle: callHandle) let transaction = CXTransaction(action: startCallAction) self.callController.request(transaction) { error in if let error = error { return } let callUpdate = CXCallUpdate() callUpdate.remoteHandle = callHandle self.provider.reportCall(with: uuid, updated: callUpdate) // CXProviderDelegate ͷ provider(_ provider: CXProvider, perform action: CXStartCallAction) ͕ίʔϧ͞ ΕΔ } ൃ৴͢Δ
  51. let callHandle = CXHandle(type: .generic, value: "ి࿩͔ ͚͖ͯͯΔਓͷ໊લ”) let callUpdate

    = CXCallUpdate() callUpdate.remoteHandle = callHandle // ௨࿩ΛಛఆͰ͖ΔUUIDΛࣄલʹ෷͍ग़͓ͯ͘͠ self.provider.reportNewIncomingCall(with: uuid, update: callUpdate) { error in // Τϥʔ͕ൃੜ͍ͯ͠ͳ͚Ε͹ɺ͜͜ͰԻ੠௨࿩Λ։࢝͢Δ } ண৴ը໘Λදࣔ͢Δ
  52. • Enhancing VoIP Apps with CallKit - WWDC 2016 -

    Videos - Apple Developer https://developer.apple.com/videos/play/wwdc2016/230/ • twilio/voice-quickstart-swift: Twilio Voice Quickstart for iOS with Swift https://github.com/twilio/voice-quickstart-swift ৄ͘͠͸
  53. Tips

  54. • ֤छಈ࡞ʹ͍ͭͯͷυΩϡϝϯτ͕΄΅ͳ͍ • զʑ͸Τεύʔ͢Δ͔͠ͳ͍ʢڍಈΛ ͻͨ͢Β֬ೝʣ • ૝ఆ֎ͷڍಈ΍όάʹରॲͰ͖ͳ͍Մೳ ੑ͕͋ΔͨΊɺͻͱͭͻͱͭख࡞ۀͰ֬ ೝ͢Δඞཁ͕͋ͬͨ •

    ࣮૷ࣗମΑΓ΋ίί͕େ͖ͳίετ • ࣮ػͰ͔͠ UI ΛදࣔͰ͖ͳ͍ CallKit Tips
  55. ͋ͱͰ௨஌ Ϙλϯ • ϦϚΠϯμʔΞϓϦ ʹొ࿥͢Δػೳͳͷ Ͱ஫ҙ • ڍಈͷΧελϚΠ ζ͸Ͱ͖ͳ͍ •

    ඇදࣔʹ΋Ͱ͖ͳ ͍
  56. • VoIP Push௨஌ূ໌ॻ͸ຊ൪؀ڥͱαϯυ ϘοΫεڞ௨ • VoIP Push௨஌͸ೝূΩʔະରԠͷͨΊɺ ຖ೥ূ໌ॻΛߋ৽͢Δඞཁ͕͋Δ PushKit Tips

  57. ূ໌ॻ伴ͷ؅ཧ ೝূ伴Λ ൒Ӭٱతʹ࢖͑Δ ຖ೥ূ໌ॻͷߋ৽͕ඞཁ 6TFS/PUJpDBUJPOT 1VTI,JU Ξϥʔτόοδ ௨஌Ի දࣔͰ͖Δ /POF

    ஗Ԇ ϕετΤϑΥʔτ ʢ࣮֬ʹಧ͘อূ΋ͳ͍ʣ ΑΓ௿஗Ԇ ʢ௨ৗΑΓ΋༏ઌ͞ΕΔʣ ϖΠϩʔυ௕ ,# )551 ,# ΞϓϦ͕ࢮΜͰΔ࣌ ͷڍಈ ಛʹԿ΋ͯ͘͠Εͳ͍ ΞϓϦΛόοΫάϥ΢ϯυ Ͱىಈͯ͘͠ΕΔ
  58. • ίϯιʔϧ্Ͱ͸ূ໌ॻͷظݶΛ֬ೝͰ͖ͳ ͍ • ొ࿥໊ʹ೔෇ΛೖΕΔ͜ͱͰ୭͕ݟͯ΋ ظݶ೔͕Θ͔ΔΑ͏ʹ • ߋ৽๨ΕΔͱେࢂࣄͳͷͰɺੲͷAPNs࣌୅ Λࢥ͍ग़ͯ͠ɺͦΕͧΕ͓޷Έͷํ๏ͰϦϚ ΠϯμʔΛઃఆ͠·͠ΐ͏

    Twilio Tips
  59. None
  60. None
  61. • VoIP Push௨஌ূ໌ॻΛຊ൪؀ڥͰ࢖͏͔α ϯυϘοΫεͰ࢖͏͔બ୒Λؒҧ͑ͳ͍͜ͱ • ίϯιʔϧ্ͰνΣοΫΛೖΕؒҧ͑Δ ͱϓογϡ௨஌ඈΜͰ͜ͳ͍ͷͰ஫ҙ • ಧ͔ͳ͍࣌͸·ͣ͸͜͜Λٙ͏ Twilio

    Tips
  62. None
  63. ޮ཰తͳσόοάํ๏ 2"

  64. CallKit ͷ UI Λ खܰʹ֬ೝ͍ͨ͠ΜͰ͕͢ Q1.

  65. reportNewIncomingCall( with:update:completion:) A.

  66. let callHandle = CXHandle(type: .generic, value: "͔͚͖ͯͯΔਓͷ໊લ”) let callUpdate =

    CXCallUpdate() callUpdate.remoteHandle = callHandle callUpdate.supportsDTMF = false callUpdate.supportsHolding = true callUpdate.supportsGrouping = false callUpdate.supportsUngrouping = false callUpdate.hasVideo = false self.provider.reportNewIncomingCall(with: UUID(), update: callUpdate) { error in // Τϥʔ͕ൃੜ͠ͳ͚Ε͹ɺ࣮ࡍ͸͜͜ͰԻ੠௨࿩ Λ։࢝͢Δ }
  67. None
  68. • CallKit ͷண৴/௨࿩த UI Λ֬ೝ͢Δ͚ͩͳΒ ؆୯ • CXProvider ͷ͜ͷϝιουΛୟ͚ͩ͘ •

    reportNewIncomingCall(with:update:c ompletion:) ௨࿩ͤͣʹ CallKit ͷ UI ͸֬ೝͰ͖Δ
  69. • ௨࿩த UI ͔Βͷૢ࡞ʢ͋ͱͰ௨஌ ΍ ੾அ ͳͲʣ΋͔֬ΊΒΕΔ • UI Λૢ࡞͢Δͱ֤छ

    delegate ϝιου ͕ίʔϧ͞ΕΔͷͰɺ࣮૷͠ͳ͍ or σόοάઐ༻ʹ͓ͯ͘͠ඞཁ͸͋Δ ௨࿩ͤͣʹ CallKit ͷ UI ͸֬ೝͰ͖Δ
  70. ࣮ࡍʹ௨࿩͕ඞཁͳಈ࡞֬ೝ ΊͪΌͪ͘Όେม͡Όͳ͍Ͱ͔͢ Q2.

  71. • ೋ୆ඞཁͱ͍͏࣌఺ͰͭΒ͍( • ผΞϓϦͰׂࠐ௨࿩ࢼ͢ʹ͸ߋʹΞΧ΢ϯτ ͕2ͭඞཁ… • ͻͱΓ͝ͱ΍͹͍ਓʹͳΔͷͰڧ͍৺͕ඞཁ • ϋ΢Ϧϯά໰୊΋͋Δ ࣮ࡍʹ௨࿩͕ඞཁͳέʔε͸Ͳ͏͢Δʁ

  72. ࣗಈԻ੠Λྲྀ͢ A.

  73. • Twilioʹ͸ࣗಈͰԻ੠Λྲྀ͢ػೳ͕͋Δ • ࢦఆͷ࿈བྷઌʹ௨࿩Λൃ৴͠ɺ૬ख͕௨࿩ʹ ग़ͨΒࣗಈԻ੠΍༧Ί༻ҙͨ͠Ի੠ϑΝΠϧ Λ࠶ੜͰ͖Δ Twilio Programmable Voice

  74. <?xml version="1.0" encoding="UTF-8"?> <Response> <Say voice="alice">Thanks for trying our documentation.

    Enjoy!</Say> <Play>http://demo.twilio.com/docs/classic.mp3</ Play> </Response> TwiMLʢthe Twilio Markup Languageʣ http://demo.twilio.com/docs/voice.xml
  75. from twilio.rest import Client account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' auth_token = 'your_auth_token'

    client = Client(account_sid, auth_token) call = client.calls.create( url='http://demo.twilio.com/docs/voice.xml', to=‘client:xxxxxxxxx’, from_='client:debug_call' ) Python Ͱ௨࿩Λൃ৴͢Δ
  76. • ࣗ਎ʹ௨࿩͕͔͔ͬͯ͘Δ API • σόοάը໘͔Β API Λୟ͘ͱ ண৴ • ΞϓϦ͕ऴ͍ྃͯ͠Δঢ়ଶͰண

    ৴΋Ͱ͖ΔΑ͏ʹɺAPI ʹ͸Կ ඵޙʹண৴͢Δ͔ࢦఆͰ͖Δύ ϥϝʔλΛ༻ҙ ண৴ϦΫΤετ API Λ༻ҙ
  77. None
  78. None
  79. • ୺຤2୆༻ҙ͢Δඞཁͳ͠ • ϋ΢Ϧϯάͷ৺഑ͳ͠ • CallKit ͷڍಈΛௐ΂Δͷ΋͓खܰ ࣗ෼ͷ੠͕ಧ͘ͷ͔Ͳ͏͔ɺϛϡʔτͰ͖͍ͯΔ͔ Ͳ͏͔ͳͲ͸ɺ͕͢͞ʹ2୆Ͱ͓ࢼ͍ͩ͘͠͞ ௨࿩֬ೝ͍ͨ͠ͳΒࣗಈԻ੠Λྲྀ͢

  80. Α͠Α͠ɺྑ͍ײ͡ʹ ࣮૷Ͱ͖͖ͯͨͧ☺

  81. ݺΜͩʁ ͓ؼΓ͍͖͍ͨͩͨ

  82. ʮ௨࿩தʹผͷΞϓϦ͕ண৴͠ɺอཹʹͯ͠ผ ΞϓϦͰ௨࿩ͨ͠ޙɺ௨࿩ऴྃͯ͠΋อཹ͕ղ আ͞Εͳ͍ʯ QA தʹͱ͋Δใࠂ…

  83. ͝ΊΜ੔ཧͤͯ͞

  84. 1. ௨࿩தʹి࿩΍ผͷ CallKit ରԠΞϓϦ͕ ண৴͠ɺׂΓࠐΈ௨࿩Λ։࢝͢Δʢ΋ͱ΋ ͱ௨࿩͍ͯͨ͠ΞϓϦ͸͜ͷλΠϛϯάͰ อཹʹͳΔʣ 2. ૬ख͔Β௨࿩Λ੾ͬͯ΋Β͏ 3.

    ͳ͔ͥอཹ͕ղআ͞Εͳ͍ • ࣗ෼Ͱ੾ͬͨ৔߹͸อཹ͕ղআ͞ΕΔ ঢ়گ೺Ѳ
  85. ͳΜ΍ͯ

  86. • ͦ΋ͦ΋อཹͷ ON/OFF ͸ iOS ͕ࣗಈͰߦͬͯ ͍ΔͷͰ͸ͳ͘ɺΞϓϦͰ੍ޚ͍ͯ͠Δ • CXProviderDelegate ͕ͳΜ͔͓͔͍͠ʁ

    ݪҼΛ୳Δ
  87. • provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) => อཹON •

    provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession) => อཹOFF อཹ ON/OFF ͷτϦΨʔ
  88. 1. MOV௨࿩தʹి࿩΍ผͷCallKitରԠΞϓ Ϧ͕ண৴͠ɺׂΓࠐΈ௨࿩Λ։࢝͢Δ 2. ૬ख͔Β௨࿩Λ੾ͬͯ΋Β͏ ໰୊ൃੜͷৄࡉ

  89. 3. ͳ͔ͥ provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) ͕࣮ߦ͞Εɺอཹ͕ղআ ͞Εͳ͍

    • ࣗ෼Ͱ੾ͬͨ৔߹͸ provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession) ͕࣮ߦ͞ΕΔͷͰอཹ͕ղআ͞ ΕΔ ໰୊ൃੜͷৄࡉ
  90. ͳΜͰ

  91. ଞͷΞϓϦΛݟͯΈΔ Facebook Messenger ͱ͔ LINE ͱ͔

  92. • ͦ΋ͦ΋อཹΛڐՄ͍ͯ͠ͳ͍ • CXCallUpdate ͷ supportsHolding Λ false ʹ͍ͯ͠Δ Facebook

    Messenger
  93. let callHandle = CXHandle(type: .generic, value: "͔͚͖ͯͯΔਓͷ໊લ”) let callUpdate =

    CXCallUpdate() callUpdate.remoteHandle = callHandle callUpdate.supportsDTMF = false callUpdate.supportsHolding = true callUpdate.supportsGrouping = false callUpdate.supportsUngrouping = false callUpdate.hasVideo = false self.provider.reportNewIncomingCall(with: UUID(), update: callUpdate) { error in // Τϥʔ͕ൃੜ͠ͳ͚Ε͹ɺ࣮ࡍ͸͜͜ͰԻ੠௨࿩ Λ։࢝͢Δ }
  94. • ׂΓࠐΈ௨࿩͕੾ΕɺΞϓϦ͕ϑΥΞάϥ΢ϯυ ʹͳͬͨΒڧ੍తʹอཹΛղআ͍ͯ͠ΔʢΑ͏ʹ ݟ͑Δʣ • ୺຤ϩοΫதͩͱ΍͸Γอཹͷ··ʹͳΔ • ϩοΫத͸ CallKit ͷ

    UI ͕ग़ͯ͘ΔͷͰը ໘͑͞ݟΕ͹อཹதͰ͋Δ͜ͱ͸Θ͔Δ ͠ɺղআ΋Ͱ͖Δ LINE
  95. ରࡦ

  96. 1. Facebook MessengerํࣜɿอཹΛڐՄ͠ͳ͍ 2. LINEํࣜɿΞϓϦ͕ϑΥΞάϥ΢ϯυʹͳͬͨ Βڧ੍తʹอཹΛղআ͢Δ 3. ͦͷଞɿ௨࿩ը໘ʹอཹON/OFFϘλϯΛஔ͘ ରࡦҊ

  97. • ࠓճͷΞϓϦͰ͸LINEํࣜΛ࠾༻ • ΘΓ͖ΔͳΒFacebook MessengerํࣜͰ ΋ྑ͔͔ͬͨ΋͠Εͳ͍ • ࠓճͷΞϓϦ͸௨࿩͕ϝΠϯػೳͰ͸ͳ ͘ɺը໘ͷཁૉΛ૿΍ͨ͘͠ͳ͍ҙਤ΋͋Γ อཹϘλϯҊ͸ෆ࠾༻

    ݁ہͲ͏ͨ͠ʁ
  98. None
  99. 88%$Ͱฉ͍ͯΈΔ

  100. • ࣮૷͔Β਺Χ݄ޙɺWWDC19ࢀՃ • LabͰฉ͘νϟϯε όάͳͷ͔ɺ࢓༷ͳͷ͔

  101. ฉ͍ͯΈͨ

  102. આ໌͢Δ => Apple୲౰ऀࠔ࿭ => ผͷਓΛݺΜͰΔ => ·ͨઆ໌͢Δ => ҎԼ3ճ͘Β͍ϧʔϓ શһࠔ࿭

    ฉ͍ͯΈ͚ͨͲ…
  103. .ʮ࢓༷ͳͷʁʯ ʮͦΜͳ͜ͱͳ͍ʯ .ʮόάͳͷ…ʁʯ ʮόάͩͶʯ .ʮόάͳΜ͔͍ʯ ࢓༷ʁόάʁ

  104. ͱΓ͋͑ͣϑΟʔυόοΫϨϙʔτग़͠·ͨ͠ ௚Δͷ͔ͳ… ͦ͜ʹ͍ͨਓ͕ͨͪ஌Βͳ͍͚ͩͰ࢓༷ͳΜ ͡Όͳ͍ͷ όάΒ͍͠ͷͰ

  105. ͱΓ͋͑ͣϑΟʔυόοΫϨϙʔτग़͠·ͨ͠ ௚Δͷ͔ͳ… ͦ͜ʹ͍ͨਓ͕ͨͪ஌Βͳ͍͚ͩͰ࢓༷ͳΜ ͡Όͳ͍ͷ όάΒ͍͠ͷͰ

  106. ·ͱΊ

  107. • CallKit/PushKit Λ࢖͏ͱ७ਖ਼ి࿩ΞϓϦͷ Α͏ͳ UI/UX͕࣮ݱͰ͖Δ • ެࣜαϯϓϧίʔυ͸ͳ͍ͷͰɺTwilio ͷ αϯϓϧίʔυݟΔͷΦεεϝ •

    σόοά͠΍͍͢؀ڥΛ͓ͭͬͯ͘͘ͱḿΔ • CallKit ͷׂࠐ௨࿩όάʢ࢓༷ʣ͸ରॲͯ͠ ͓͘͜ͱ ·ͱΊ
  108. J04Ͱ1VTI,JU੍͕ݶ͞ΕΔʁ ͓·͚

  109. And new this year, it's very important that you know

    that you must report incoming calls with CallKit in the didReceiveIncomingPush callback or your app will be terminated. And, if you repeatedly do this, or if you repeatedly fail not to report an incoming call, the system may stop launching your app for VoIP pushes altogether. WWDCͰͷקࠂ https://developer.apple.com/videos/play/wwdc2019/707/
  110. • ϓογϡ௨஌͕དྷͨΒ CallKit ͷ UI Λදࣔ͠ ͳ͍ͱΞϓϦ͕ࡴ͞ΕΔ • CallKit UI

    දࣔʹ܁Γฦࣦ͠ഊ͢ΔͱɺVoIP ϓογϡ௨஌ͰΞϓϦ͕ىಈ͢Β͠ͳ͘ͳΔ WWDCͰͷקࠂ
  111. ͳΜͰ͜Μͳ࢓༷ʹʁ

  112. • VoIP Ҏ֎ͷ໨తʹ PushKit Λ࢖͏ΞϓϦ ͕͋ͬͨͨΊ੍ݶ͕ೖͬͨ໛༷ • ΞϓϦΛόοΫάϥ΢ϯυͰىಈͰ͖ͯ ͠·͏ͨΊɺҐஔ৘ใऔಘͳͲϢʔβʔͷ ݸਓ৘ใऩू໨తͰ࢖ΘΕΔ͜ͱ΋͋Δͱ

    ͔ͳ͍ͱ͔ ੍ݶ͕ՃΘͬͨཧ༝
  113. • WhatsApp ͳͲɺΤϯυπʔΤϯυ҉߸ԽͷͨΊ ʹ PushKit Λ࢖͍ͬͯΔΞϓϦ΋͋ͬͨ໛༷ • όφʔग़͍ͨ͠ʁ Notification Service

    Extension ࢖͍ͳΑ Prefer a banner? Use standard pushes Notification Service Extension to modify content ϝοηʔδϯάΞϓϦ΁ͷݗ੍ʁ
  114. ฐࣾΞϓϦ΁ͷӨڹ ͪͳΈʹ

  115. • Twilio SDK ͸ਖ਼نͷखஈͰ࢖͍ͬͯΔ͚ͲӨڹ ड͚͍ͯΔ • PushKit Λண৴͚ͩͰ͸ͳ͘ɺ௨࿩ΩϟϯηϧͰ ΋࢖͍ͬͯͨͷ͕ݪҼ iOS

    13 & Xcode 11 Breaking Changes – Twilio Support https://support.twilio.com/hc/en-us/articles/ 360035005593-iOS-13-Xcode-11-Breaking-Changes Twilio ແࣄࢮ๢
  116. "QQFOEJY

  117. • Enhancing VoIP Apps with CallKit - WWDC 2016 -

    Videos - Apple Developer https://developer.apple.com/videos/play/wwdc2016/230/ • CallKit | Apple Developer Documentation https://developer.apple.com/documentation/callkit • PushKit | Apple Developer Documentation https://developer.apple.com/documentation/pushkit • Energy Efficiency Guide for iOS Apps: Voice Over IP (VoIP) Best Practices https://developer.apple.com/library/archive/documentation/Performance/ Conceptual/EnergyGuide-iOS/OptimizeVoIP.html References
  118. • Twilio - Communication APIs for SMS, Voice, Video and

    Authentication https://www.twilio.com • Twilioͱ͸ | Twilio for KDDI Web Communications https://twilio.kddi-web.com/availability/ References
  119. • twilio/twilio-voice-ios: Programmable Voice SDK by Twilio https://github.com/twilio/twilio-voice-ios • twilio/voice-quickstart-swift:

    Twilio Voice Quickstart for iOS with Swift https://github.com/twilio/voice-quickstart-swift • PushKit | Apple Developer Documentation https://developer.apple.com/documentation/pushkit • Energy Efficiency Guide for iOS Apps: Voice Over IP (VoIP) Best Practices https://developer.apple.com/library/archive/documentation/Performance/ Conceptual/EnergyGuide-iOS/OptimizeVoIP.html References
  120. • Local and Remote Notification Programming Guide: Creating the Remote

    Notification Payload https://developer.apple.com/library/archive/documentation/ NetworkingInternet/Conceptual/RemoteNotificationsPG/ CreatingtheNotificationPayload.html • Advances in App Background Execution - WWDC 2019 - Videos - Apple Developer https://developer.apple.com/videos/play/wwdc2019/707/ • iOS 13 & Xcode 11 Breaking Changes – Twilio Support https://support.twilio.com/hc/en-us/articles/360035005593-iOS-13-Xcode-11- Breaking-Changes References