Scan for MFI products over Wi Fi

半世苍凉 提交于 2020-01-01 03:25:07

问题


In iOS 8, Apple allows us to connect to a device via Wifi direct and share wifi network credentials with it. We can do it in wifi settings page but also in an app.

I'm trying to launch a scan to find wifi MFI devices. I can see those in the wifi settings but not in app. Here is how I do this:

EAWiFiUnconfiguredAccessoryBrowser *_wifiBrowser = [[EAWiFiUnconfiguredAccessoryBrowser alloc] initWithDelegate:self queue:nil];
[_wifiBrowser startSearchingForUnconfiguredAccessoriesMatchingPredicate:nil];

So I expect to see an accessory in the delegate method

- (void)accessoryBrowser:(EAWiFiUnconfiguredAccessoryBrowser *)browser didFindUnconfiguredAccessories:(NSSet *)accessories

But nothings happens. Do you know what is missing ?

thx


回答1:


I found why it did not work well.

You need to go in your Capabilities pannel (by selecting your target) And then enable Wireless Accessory Configuration !



来源:https://stackoverflow.com/questions/25999416/scan-for-mfi-products-over-wi-fi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!