我正在尝试集成 CallDirectory Extension 以阻止某些来电。但应用程序甚至无法识别为阻止提供的数字。有没有人成功做到这一点?你可以看到我使用的格式..
private func addIdentificationPhoneNumbers(to context: CXCallDirectoryExtensionContext) throws {
let phoneNumbers: [CXCallDirectoryPhoneNumber] = [ 18775555555, 18885555555,+91949520]
let labels = [ "Telemarketer", "Local business","myPhone"]
for (phoneNumber, label) in zip(phoneNumbers, labels) {
context.addIdentificationEntry(withNextSequentialPhoneNumber: phoneNumber, label: label)
}
}
而且,我将此用于开发。http://iphoneramble.blogspot.in/2016/07/ios-10-callkit-directory-extension.html
测试设备和 iOS 版本 - iphone 5s ,iOS 10.1