Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

PushKit CallKit

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

֤ߏ੒ཁૉͷ֓ཁ

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

1. CallKit

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

ΞϯϩοΫ࣌ ϩοΫத Ԡ౴ޙ ண৴த ϩοΫத

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

• iOS 10 ͔Β࢖͑ΔϑϨʔϜϫʔΫ • Apple ७ਖ਼ి࿩ΞϓϦͷΑ͏ͳ UI/UX Λ ࣮ݱͰ͖Δ • ண৴࣌ʹి࿩ΞϓϦͱಉ౳ͷ UI Λදࣔ • ௨࿩ཤྺʹදࣔɺཤྺ͔Βର৅ΞϓϦΛ ࢦఆͯ͠ൃ৴ • Call Directory Extension • ண৴ڋ൱΍ൃ৴ऀͷࣝผ͕Ͱ͖Δ CallKit

Slide 17

Slide 17 text

2. PushKit

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

UserNotifications vs. PushKit 6TFS/PUJpDBUJPOT 1VTI,JU Ξϥʔτόοδ ௨஌Ի දࣔͰ͖Δ /POF ஗Ԇ ϕετΤϑΥʔτ ʢ࣮֬ʹಧ͘อূ΋ͳ͍ʣ ΑΓ௿஗Ԇ ʢ௨ৗΑΓ΋༏ઌ͞ΕΔʣ ϖΠϩʔυ௕ ,# )551 ,# ΞϓϦ͕ࢮΜͰΔ࣌ ͷڍಈ ಛʹԿ΋ͯ͘͠Εͳ͍ ΞϓϦΛόοΫάϥ΢ϯυ Ͱىಈͯ͘͠ΕΔ

Slide 20

Slide 20 text

3. Twilio

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

• ͓खܰʹ VoIP ௨࿩Λ࣮ݱͰ͖Δ Web αʔϏε • ΫϥΠΞϯτʢϒϥ΢β/iOS/Androidʣ ޲͚ʹ SDKɺαʔόʔ޲͚ʹ API ͱϔϧ ύʔϥΠϒϥϦ͕ఏڙ͞Ε͍ͯΔ Twilio

Slide 23

Slide 23 text

Programmable Voice

Slide 24

Slide 24 text

CallKit/PushKit/(Twilio) ͷ࢖͍ํ

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

Enhancing VoIP Apps with CallKit - WWDC 2016 - Videos - Apple Developer https://developer.apple.com/videos/play/wwdc2016/230/ Speakerbox ͱ͍͏αϯϓϧίʔυ͕͋Γͦ͏ʁ

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Ͳ͜ʁ

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

ඞཁ࠷௿ݶͷίʔυ αϯϓϧίʔυ͔ΒΘ͔Δ

Slide 35

Slide 35 text

ొ৔ਓ෺ • CXProvider • CXCallController • PKPushRegistry ֎෦ىҼͷཁٻΛγεςϜʹ఻͑ɺ γεςϜ͔ΒͷཁٻΛ֎෦ʹ఻͑Δਓ ΞϓϦىҼͷཁٻΛγεςϜʹ఻͑Δਓ VoIP ϓογϡ௨஌Ͱ͖ΔΑ͏ʹ͢Δਓ

Slide 36

Slide 36 text

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

Slide 37

Slide 37 text

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

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

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

Slide 40

Slide 40 text

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

Slide 41

Slide 41 text

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 ͷ४උ

Slide 42

Slide 42 text

self.callController = CXCallController() CXCallController ͷ४උ

Slide 43

Slide 43 text

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 ͷ४උ

Slide 44

Slide 44 text

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 ͷ४උ

Slide 45

Slide 45 text

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

Slide 46

Slide 46 text

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

Slide 47

Slide 47 text

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 ͷ४උ

Slide 48

Slide 48 text

extension VoiceCallManager: CXProviderDelegate { func provider(_ provider: CXProvider, perform action: CXEndCallAction) { // ੾அޙͷॲཧ action.fulfill() } func provider(_ provider: CXProvider, perform action: CXSetHeldCallAction) { // อཹON/OFFॲཧ action.fulfill() } } CXProviderDelegate ͷ४උ

Slide 49

Slide 49 text

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 ௨஌ͷొ࿥

Slide 50

Slide 50 text

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) ͕ίʔϧ͞ ΕΔ } ൃ৴͢Δ

Slide 51

Slide 51 text

let callHandle = CXHandle(type: .generic, value: "ి࿩͔ ͚͖ͯͯΔਓͷ໊લ”) let callUpdate = CXCallUpdate() callUpdate.remoteHandle = callHandle // ௨࿩ΛಛఆͰ͖ΔUUIDΛࣄલʹ෷͍ग़͓ͯ͘͠ self.provider.reportNewIncomingCall(with: uuid, update: callUpdate) { error in // Τϥʔ͕ൃੜ͍ͯ͠ͳ͚Ε͹ɺ͜͜ͰԻ੠௨࿩Λ։࢝͢Δ } ண৴ը໘Λදࣔ͢Δ

Slide 52

Slide 52 text

• 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 ৄ͘͠͸

Slide 53

Slide 53 text

Tips

Slide 54

Slide 54 text

• ֤छಈ࡞ʹ͍ͭͯͷυΩϡϝϯτ͕΄΅ͳ͍ • զʑ͸Τεύʔ͢Δ͔͠ͳ͍ʢڍಈΛ ͻͨ͢Β֬ೝʣ • ૝ఆ֎ͷڍಈ΍όάʹରॲͰ͖ͳ͍Մೳ ੑ͕͋ΔͨΊɺͻͱͭͻͱͭख࡞ۀͰ֬ ೝ͢Δඞཁ͕͋ͬͨ • ࣮૷ࣗମΑΓ΋ίί͕େ͖ͳίετ • ࣮ػͰ͔͠ UI ΛදࣔͰ͖ͳ͍ CallKit Tips

Slide 55

Slide 55 text

͋ͱͰ௨஌ Ϙλϯ • ϦϚΠϯμʔΞϓϦ ʹొ࿥͢Δػೳͳͷ Ͱ஫ҙ • ڍಈͷΧελϚΠ ζ͸Ͱ͖ͳ͍ • ඇදࣔʹ΋Ͱ͖ͳ ͍

Slide 56

Slide 56 text

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

Slide 57

Slide 57 text

ূ໌ॻ伴ͷ؅ཧ ೝূ伴Λ ൒Ӭٱతʹ࢖͑Δ ຖ೥ূ໌ॻͷߋ৽͕ඞཁ 6TFS/PUJpDBUJPOT 1VTI,JU Ξϥʔτόοδ ௨஌Ի දࣔͰ͖Δ /POF ஗Ԇ ϕετΤϑΥʔτ ʢ࣮֬ʹಧ͘อূ΋ͳ͍ʣ ΑΓ௿஗Ԇ ʢ௨ৗΑΓ΋༏ઌ͞ΕΔʣ ϖΠϩʔυ௕ ,# )551 ,# ΞϓϦ͕ࢮΜͰΔ࣌ ͷڍಈ ಛʹԿ΋ͯ͘͠Εͳ͍ ΞϓϦΛόοΫάϥ΢ϯυ Ͱىಈͯ͘͠ΕΔ

Slide 58

Slide 58 text

• ίϯιʔϧ্Ͱ͸ূ໌ॻͷظݶΛ֬ೝͰ͖ͳ ͍ • ొ࿥໊ʹ೔෇ΛೖΕΔ͜ͱͰ୭͕ݟͯ΋ ظݶ೔͕Θ͔ΔΑ͏ʹ • ߋ৽๨ΕΔͱେࢂࣄͳͷͰɺੲͷAPNs࣌୅ Λࢥ͍ग़ͯ͠ɺͦΕͧΕ͓޷Έͷํ๏ͰϦϚ ΠϯμʔΛઃఆ͠·͠ΐ͏ Twilio Tips

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

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

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

ޮ཰తͳσόοάํ๏ 2"

Slide 64

Slide 64 text

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

Slide 65

Slide 65 text

reportNewIncomingCall( with:update:completion:) A.

Slide 66

Slide 66 text

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 // Τϥʔ͕ൃੜ͠ͳ͚Ε͹ɺ࣮ࡍ͸͜͜ͰԻ੠௨࿩ Λ։࢝͢Δ }

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

• CallKit ͷண৴/௨࿩த UI Λ֬ೝ͢Δ͚ͩͳΒ ؆୯ • CXProvider ͷ͜ͷϝιουΛୟ͚ͩ͘ • reportNewIncomingCall(with:update:c ompletion:) ௨࿩ͤͣʹ CallKit ͷ UI ͸֬ೝͰ͖Δ

Slide 69

Slide 69 text

• ௨࿩த UI ͔Βͷૢ࡞ʢ͋ͱͰ௨஌ ΍ ੾அ ͳͲʣ΋͔֬ΊΒΕΔ • UI Λૢ࡞͢Δͱ֤छ delegate ϝιου ͕ίʔϧ͞ΕΔͷͰɺ࣮૷͠ͳ͍ or σόοάઐ༻ʹ͓ͯ͘͠ඞཁ͸͋Δ ௨࿩ͤͣʹ CallKit ͷ UI ͸֬ೝͰ͖Δ

Slide 70

Slide 70 text

࣮ࡍʹ௨࿩͕ඞཁͳಈ࡞֬ೝ ΊͪΌͪ͘Όେม͡Όͳ͍Ͱ͔͢ Q2.

Slide 71

Slide 71 text

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

Slide 72

Slide 72 text

ࣗಈԻ੠Λྲྀ͢ A.

Slide 73

Slide 73 text

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

Slide 74

Slide 74 text

Thanks for trying our documentation. Enjoy! http://demo.twilio.com/docs/classic.mp3 Play> TwiMLʢthe Twilio Markup Languageʣ http://demo.twilio.com/docs/voice.xml

Slide 75

Slide 75 text

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 Ͱ௨࿩Λൃ৴͢Δ

Slide 76

Slide 76 text

• ࣗ਎ʹ௨࿩͕͔͔ͬͯ͘Δ API • σόοάը໘͔Β API Λୟ͘ͱ ண৴ • ΞϓϦ͕ऴ͍ྃͯ͠Δঢ়ଶͰண ৴΋Ͱ͖ΔΑ͏ʹɺAPI ʹ͸Կ ඵޙʹண৴͢Δ͔ࢦఆͰ͖Δύ ϥϝʔλΛ༻ҙ ண৴ϦΫΤετ API Λ༻ҙ

Slide 77

Slide 77 text

No content

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

• ୺຤2୆༻ҙ͢Δඞཁͳ͠ • ϋ΢Ϧϯάͷ৺഑ͳ͠ • CallKit ͷڍಈΛௐ΂Δͷ΋͓खܰ ࣗ෼ͷ੠͕ಧ͘ͷ͔Ͳ͏͔ɺϛϡʔτͰ͖͍ͯΔ͔ Ͳ͏͔ͳͲ͸ɺ͕͢͞ʹ2୆Ͱ͓ࢼ͍ͩ͘͠͞ ௨࿩֬ೝ͍ͨ͠ͳΒࣗಈԻ੠Λྲྀ͢

Slide 80

Slide 80 text

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

Slide 81

Slide 81 text

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

Slide 82

Slide 82 text

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

Slide 83

Slide 83 text

͝ΊΜ੔ཧͤͯ͞

Slide 84

Slide 84 text

1. ௨࿩தʹి࿩΍ผͷ CallKit ରԠΞϓϦ͕ ண৴͠ɺׂΓࠐΈ௨࿩Λ։࢝͢Δʢ΋ͱ΋ ͱ௨࿩͍ͯͨ͠ΞϓϦ͸͜ͷλΠϛϯάͰ อཹʹͳΔʣ 2. ૬ख͔Β௨࿩Λ੾ͬͯ΋Β͏ 3. ͳ͔ͥอཹ͕ղআ͞Εͳ͍ • ࣗ෼Ͱ੾ͬͨ৔߹͸อཹ͕ղআ͞ΕΔ ঢ়گ೺Ѳ

Slide 85

Slide 85 text

ͳΜ΍ͯ

Slide 86

Slide 86 text

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

Slide 87

Slide 87 text

• provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) => อཹON • provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession) => อཹOFF อཹ ON/OFF ͷτϦΨʔ

Slide 88

Slide 88 text

1. MOV௨࿩தʹి࿩΍ผͷCallKitରԠΞϓ Ϧ͕ண৴͠ɺׂΓࠐΈ௨࿩Λ։࢝͢Δ 2. ૬ख͔Β௨࿩Λ੾ͬͯ΋Β͏ ໰୊ൃੜͷৄࡉ

Slide 89

Slide 89 text

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

Slide 90

Slide 90 text

ͳΜͰ

Slide 91

Slide 91 text

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

Slide 92

Slide 92 text

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

Slide 93

Slide 93 text

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 // Τϥʔ͕ൃੜ͠ͳ͚Ε͹ɺ࣮ࡍ͸͜͜ͰԻ੠௨࿩ Λ։࢝͢Δ }

Slide 94

Slide 94 text

• ׂΓࠐΈ௨࿩͕੾ΕɺΞϓϦ͕ϑΥΞάϥ΢ϯυ ʹͳͬͨΒڧ੍తʹอཹΛղআ͍ͯ͠ΔʢΑ͏ʹ ݟ͑Δʣ • ୺຤ϩοΫதͩͱ΍͸Γอཹͷ··ʹͳΔ • ϩοΫத͸ CallKit ͷ UI ͕ग़ͯ͘ΔͷͰը ໘͑͞ݟΕ͹อཹதͰ͋Δ͜ͱ͸Θ͔Δ ͠ɺղআ΋Ͱ͖Δ LINE

Slide 95

Slide 95 text

ରࡦ

Slide 96

Slide 96 text

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

Slide 97

Slide 97 text

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

Slide 98

Slide 98 text

No content

Slide 99

Slide 99 text

88%$Ͱฉ͍ͯΈΔ

Slide 100

Slide 100 text

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

Slide 101

Slide 101 text

ฉ͍ͯΈͨ

Slide 102

Slide 102 text

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

Slide 103

Slide 103 text

.ʮ࢓༷ͳͷʁʯ ʮͦΜͳ͜ͱͳ͍ʯ .ʮόάͳͷ…ʁʯ ʮόάͩͶʯ .ʮόάͳΜ͔͍ʯ ࢓༷ʁόάʁ

Slide 104

Slide 104 text

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

Slide 105

Slide 105 text

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

Slide 106

Slide 106 text

·ͱΊ

Slide 107

Slide 107 text

• CallKit/PushKit Λ࢖͏ͱ७ਖ਼ి࿩ΞϓϦͷ Α͏ͳ UI/UX͕࣮ݱͰ͖Δ • ެࣜαϯϓϧίʔυ͸ͳ͍ͷͰɺTwilio ͷ αϯϓϧίʔυݟΔͷΦεεϝ • σόοά͠΍͍͢؀ڥΛ͓ͭͬͯ͘͘ͱḿΔ • CallKit ͷׂࠐ௨࿩όάʢ࢓༷ʣ͸ରॲͯ͠ ͓͘͜ͱ ·ͱΊ

Slide 108

Slide 108 text

J04Ͱ1VTI,JU੍͕ݶ͞ΕΔʁ ͓·͚

Slide 109

Slide 109 text

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/

Slide 110

Slide 110 text

• ϓογϡ௨஌͕དྷͨΒ CallKit ͷ UI Λදࣔ͠ ͳ͍ͱΞϓϦ͕ࡴ͞ΕΔ • CallKit UI දࣔʹ܁Γฦࣦ͠ഊ͢ΔͱɺVoIP ϓογϡ௨஌ͰΞϓϦ͕ىಈ͢Β͠ͳ͘ͳΔ WWDCͰͷקࠂ

Slide 111

Slide 111 text

ͳΜͰ͜Μͳ࢓༷ʹʁ

Slide 112

Slide 112 text

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

Slide 113

Slide 113 text

• WhatsApp ͳͲɺΤϯυπʔΤϯυ҉߸ԽͷͨΊ ʹ PushKit Λ࢖͍ͬͯΔΞϓϦ΋͋ͬͨ໛༷ • όφʔग़͍ͨ͠ʁ Notification Service Extension ࢖͍ͳΑ Prefer a banner? Use standard pushes Notification Service Extension to modify content ϝοηʔδϯάΞϓϦ΁ͷݗ੍ʁ

Slide 114

Slide 114 text

ฐࣾΞϓϦ΁ͷӨڹ ͪͳΈʹ

Slide 115

Slide 115 text

• 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 ແࣄࢮ๢

Slide 116

Slide 116 text

"QQFOEJY

Slide 117

Slide 117 text

• 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

Slide 118

Slide 118 text

• 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

Slide 119

Slide 119 text

• 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

Slide 120

Slide 120 text

• 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