Skip to content

Instantly share code, notes, and snippets.

@zhgchgli0718
Last active April 27, 2019 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhgchgli0718/57da81a2e7bb28715c71854212943e04 to your computer and use it in GitHub Desktop.
Save zhgchgli0718/57da81a2e7bb28715c71854212943e04 to your computer and use it in GitHub Desktop.
import CallKit
//
//......
//
if #available(iOS 10.0, *) {
CXCallDirectoryManager.sharedInstance.getEnabledStatusForExtension(withIdentifier: "這裡輸入call directory extension的bundle identifier", completionHandler: { (status, error) in
if status == .enabled {
//啟用中
} else if status == .disabled {
//未啟用
} else {
//未知,不支援
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment