Last active
April 27, 2019 14:32
-
-
Save zhgchgli0718/57da81a2e7bb28715c71854212943e04 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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