gpt4 book ai didi

objective-c - 沙盒核心WLAN?

转载 作者:太空狗 更新时间:2023-10-30 03:55:21 25 4
gpt4 key购买 nike

我正在编写一个依赖于确定无线信号强度的能力的 OS X 应用程序,但我无法弄清楚要使用什么权利来对其进行沙盒处理。

每当我使用

NSMutableArray *scanResults;
CWInterface *currentInterface = [CWInterface interface];
NSLog(@"currInterface: %@\n", currentInterface);
NSMutableDictionary *signalsDict = [[NSMutableDictionary alloc] init];
NSError *err = nil;
scanResults = [NSMutableSet setWithSet:[currentInterface scanForNetworksWithSSID:nil error:&err]];

我收到错误 操作无法完成。 (com.apple.coreWLAN.error 错误 1.) 尽管已在 XCode 中检查所有权利。我缺少哪些权利?

CoreWLANWirelessManager 样例工程也存在同样的问题。

最佳答案

CoreWLAN 似乎根本不适用于沙盒应用。

Apple 的开发者文档指出“使用 App Sandbox,您的应用程序无法修改系统的网络配置(无论是使用系统配置框架、CoreWLAN 框架还是其他类似的 API)”,这似乎暗示读取而不是写入设置可能可以,但这在实践中似乎不起作用,Apple DTS 的帖子证实了这一点:https://forums.developer.apple.com/thread/11307

关于objective-c - 沙盒核心WLAN?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13119260/

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