【发布时间】:2016-11-18 09:50:23
【问题描述】:
我正在尝试集成 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
【问题讨论】:
-
请分享一些代码。
标签: ios iphone swift callkit callblocking