There are two things that are unclear to me about TwilioVoice for iOS, after having followed the quickstart demo.
TwilioVoice.register(accessToken)
? Or something with CallKit
would be enough?ViewController
, but since I only want to be able to receive phone calls, I was thinking of fetching access token only in the AppDelegate
, but I wonder if I would have issues with the token lifetime?Thank you for your help,
application(_:didRegisterForRemoteNotificationsWithDeviceToken)
is called since that's the method that provides your application with the device token you need to pass to Twilio.I'd caution against taking Twilio's sample project as a good sample project. I had to rework most of what they did in their example when I built our implementation. There's WAY more state management that needs to be done to nicely integrate with CallKit.