get phone call states in iOS 10
问题 I want to get phone call states in my app. After some search I found CoreTelephony framework. But that is deprecated in iOS 10. SO is there any other alternative available? I also found CallKit . A new framework in iOS 10. But didn't getting call states from same as I searched. 回答1: import CallKit into your AppDelegate and add the following code: // AppDelegate var callObserver: CXCallObserver! // add property // in applicationDidFinishLaunching... callObserver = CXCallObserver() callObserver