小编Kim*_*nny的帖子

如何使用 NEHotspotHelper(IOS,objective-c)获取可用的 WiFi 列表

我已经这样做了。

1.在Apple Developer页面添加IOS证书。

2. 在 Apple Developer 页面中添加启用 Network Extension 的标识符 App ID。

3. 在 Apple Developer 页面中添加配置文件。

4. 创建 Xcode 项目并输入在苹果开发者页面上制作的正确包 ID。并签下合适的球队。

5. 添加能力和库(网络扩展框架)。

6. 5后,在我的Xcode项目中自动生成Entitlement文件。

7.上次我写的代码是这样的。

NSLog(@"List Scan START");

NSMutableDictionary* options = [[NSMutableDictionary alloc] init];
    [options setObject:@"Try Here" forKey:kNEHotspotHelperOptionDisplayName];
    dispatch_queue_t queue = dispatch_queue_create("com.miro.wifilist", 0);

    BOOL isAvailable = [NEHotspotHelper registerWithOptions:options queue:queue handler: ^(NEHotspotHelperCommand * cmd) {
        if (cmd.commandType == kNEHotspotHelperCommandTypeEvaluate || cmd.commandType == kNEHotspotHelperCommandTypeFilterScanList ) {
            for (NEHotspotNetwork* network in cmd.networkList) {
                NSLog(@"%@", network.SSID);
            }
        } else {
            NSLog(@"there …
Run Code Online (Sandbox Code Playgroud)

certificate objective-c ios xcode8 nehotspothelper

5
推荐指数
1
解决办法
6920
查看次数

标签 统计

certificate ×1

ios ×1

nehotspothelper ×1

objective-c ×1

xcode8 ×1