Scan for MFI products over Wi Fi
Asked Answered
L

1

7

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

Lacour answered 23/9, 2014 at 15:47 Comment(0)
L
6

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 !

Lacour answered 7/10, 2014 at 15:16 Comment(2)
Xcode 6.1 adds the capability automatically for a project that links to ExternalAccessory.framework. Quite a nuisance if you only supported Bluetooth/USB/Lightning accessories!Ciel
Good to know! I hadn't download it yetLacour

© 2022 - 2024 — McMap. All rights reserved.