I've been at this for a few days now, and can't seem to find a solution. I want to create a peer to peer network over wifi on iOS. All open source code seems to be supporting running a server or being a client, but there's no code built to support being both - a peer. Is anybody aware of a way I can do this?
The official list of current iOS Wi-Fi Management APIs. There is no Wi-Fi Direct type of connection available. The primary issue being that Apple does not allow programmatic setting of the Wi-Fi network SSID and password.
Make sure that your device (the one sharing the password) is unlocked and connected to the Wi-Fi network. Select the Wi-Fi network on the device you want to connect. On your device, tap Share Password, then tap Done.
WiFi Peer to Peer (P2P) aka WiFi Direct enables devices to communicate with each other in a peer to peer manner without requiring any Access Point at typical WiFi speed with WPA2 security.
Apple platforms support peer-to-peer Wi-Fi, which allows devices to communicate even if they're not on the same infrastructure Wi-Fi network. This technology is used by AirPlay, AirDrop, and so on.
iOS 7 adds the Multipeer Connectivity Framework for exactly this purpose.
Have you thought of using Apple's GameKit framework? I've used it in the past for some simple communication between devices. It's really simple and can get you out of the gate quickly. This looks like a good tutorial.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With