gpt4 book ai didi

ios - CNContactPickerViewController 即使在禁用设置访问后也会显示

转载 作者:行者123 更新时间:2023-11-29 00:56:53 26 4
gpt4 key购买 nike

我正在显示一个CNContactPickerViewController。假设如果我从设置中禁用访问,则它不应该允许打开 Controller ,或者应该弹出窗口说“联系人访问已禁用”。但反过来它又打开了视野。为什么会这样呢?任何人都对此有想法。这是框架错误,还是应该使用 CNContactStore requestAccessForEntityType: 方法强制检查?

self.mContactBookController = [[CNContactPickerViewController alloc] init];
mContactBookController.displayedPropertyKeys = @[CNContactEmailAddressesKey];
mContactBookController.predicateForEnablingContact = [NSPredicate predicateWithFormat:@"emailAddresses.@count > 0"];
[app.window.rootViewController presentViewController:mContactBookController animated:YES completion:NULL];

最佳答案

来自documentation :

The app using contact picker view does not need access to the user’s contacts and the user will not be prompted for “grant permission” access. The app has access only to the user’s final selection.

所以,不,这不是错误,您不需要检查。

关于ios - CNContactPickerViewController 即使在禁用设置访问后也会显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37536337/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com