multipeer connectivity, wifi connection works great but bluetooth seems to be dead

Hi all, I have been coding a project for a while and now that I am testing it. The multipeer connectivity seems to work great when the two devices are on a wifi connection. But nothing seems to work when I am only on bluetooth both iphones don't seem to find eachother, I have made sure both iphones are discoverable on bluetooth but nothing. Each phone just has its " searching " on the Multipeer on the app. I have no idea why. Does bluetooth not work anymore. sorry if this is a dumb question is just really don't know and can find any answers. Lastly, if bluetooth doesnt work are there any other options I can use to have two phones connect without the use of wifi. Or can I use Multipeer to have phones connect through carrier network connection like verizon and stuff idk. I really dont wan't to recode this project I spent a lot of time lol . Any help is great help. Thanks again for your replies. 🙂

Answered by DTS Engineer in 329129022

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. You shouldn’t notice any difference between this and peer-to-peer Bluetooth (except that it’s faster, and has longer range :-).

I’d advise you try this out for yourself:

  1. Take your existing Multipeer Connectivity app and run it on two devices.

  2. On both devices, turn off Bluetooth (in Settings, not Control Center).

  3. Then go to Settings > Wi-Fi > YourNetwork>, and tap Forget This Network.

  4. Repeat step 3 as long as iOS keeps auto joining networks.

  5. Run your app on both devices and wonder at the fabulosity that is peer-to-peer Wi-Fi!

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Does bluetooth not work anymore.

In iOS 11 we disabled peer-to-peer networking over Bluetooth [1]. See this post, and the mailing list post it references, for details.

if bluetooth doesnt work are there any other options I can use to have two phones connect without the use of wifi.

Is your concern Wi-Fi in general, or infrastructure Wi-Fi. Multipeer Connectivity continues to work just fine over peer-to-peer Wi-Fi.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

[1] At the

NSNetService
level, which affects Multipeer Connectivity as well. The underlying support is still present, accessible via the
<dns_sd.h>
API, but it’s not hard to imagine it go away at some point in the future.

Hello @eskimo,

Thank you for your reply. Well, I have a few concerns I guess. If bluetooth doesn't work is there any way I can use network connection in multipeer? if so, How? I haven't tried it. Is there any other solution. Becasue Wifi limits the use because to my understanding and I could be wrong. For peer-to-peer under multipeer to work over Wifi don't both iphone devices have to be connected to the same network or no?. And if there is any way I could just use network connection it would solve the issue. I just don't know if that is possible under multipeer but again I have not tried it. What are my possible alternatives? I really like multipeer connectivity.


Thank you

Accepted Answer

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. You shouldn’t notice any difference between this and peer-to-peer Bluetooth (except that it’s faster, and has longer range :-).

I’d advise you try this out for yourself:

  1. Take your existing Multipeer Connectivity app and run it on two devices.

  2. On both devices, turn off Bluetooth (in Settings, not Control Center).

  3. Then go to Settings > Wi-Fi > YourNetwork>, and tap Forget This Network.

  4. Repeat step 3 as long as iOS keeps auto joining networks.

  5. Run your app on both devices and wonder at the fabulosity that is peer-to-peer Wi-Fi!

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi, @eskimo ,


thanks for all your help. I have one last question. Is there any work around to use network connection? or any alternatives, that allow both wifi and network connection to allow two devices to connection?


Thanks 🙂

@eskimo,

Also just for my understanding. Two devices can be on two different wifi networks and still work on multipeer connectivity such as device 1 on johnswifi and device 2 on savannahswifi?


thanks

One case scenario when MultiPeer Connectivity doesn't work:


- On iPhone, enable Personal Hotspot

- On iPad, connect to Personal Hotspot

- Try to connect via MultiPeer Connectivity


Result:


2018-10-24 13:31:09.142264-0400 MyApp[8841:3514757]  [ERROR] ICEStopConnectivityCheck:2688 ICEStopConnectivityCheck() found no ICE check with call id (1336709656)
peer <MCPeerID: 0x281ad83b0 DisplayName = iPad Pro> didChangeState: Connecting
2018-10-24 13:31:09.261354-0400 MyApp[8841:3514757] [MCNearbyServiceBrowser] Browser got invite response with nil connectionData.
2018-10-24 13:31:19.301376-0400 MyApp[8841:3514844] [GCKSession] Not in connected state, so giving up for participant [4FAC9218] on channel [0].
2018-10-24 13:31:19.301648-0400 MyApp[8841:3514844]  [ERROR] ICEStopConnectivityCheck:2688 ICEStopConnectivityCheck() found no ICE check with call id (1336709656)
2018-10-24 13:31:19.301930-0400 MyApp[8841:3514844] [GCKSession] Not in connected state, so giving up for participant [4FAC9218] on channel [1].
2018-10-24 13:31:19.302219-0400 MyApp[8841:3514844]  [ERROR] ICEStopConnectivityCheck:2688 ICEStopConnectivityCheck() found no ICE check with call id (1336709656)
2018-10-24 13:31:19.302405-0400 MyApp[8841:3514844] [GCKSession] Not in connected state, so giving up for participant [4FAC9218] on channel [2].
2018-10-24 13:31:19.302594-0400 MyApp[8841:3514844]  [ERROR] ICEStopConnectivityCheck:2688 ICEStopConnectivityCheck() found no ICE check with call id (1336709656)
peer <MCPeerID: 0x281ad83b0 DisplayName = iPad Pro> didChangeState: NotConnected

The same app works fine when wi-fi is enabled on both devices. The app runs on iOS 12.

My MultiPeer Connectivity works fine on wifi but when using Personal Hotspot it cant connect.

- On iPhone, enable Personal Hotspot

- On iPhone, connect to Personal Hotspot

- Try to connect via MultiPeer Connectivity


1. InvitePeer gets called

2. DidReceiveInvitationFromPeer is called and invitationHandler(true, session) is called

3.Session DidChangeState gets called with connecting

4. Session DidChangeState gets called with NotConnected and connection failes.


Everything works as expected on WIFI is there somthing else i need to do on Personal Hotspot ?

Sorry for opening this question again but I thought it would be a good idea together with the relaunch of this forum.

Can someone confirm that Bluetooth is disabled since iOS 11 and hasn't been turned on ever since?
I am currently building an App using MultipeerConnectivity and for me Bluetooth doesn't work at all.

If Bluetooth has been disabled permanently, the documentation should definitely be updated.

Can someone confirm that Bluetooth is disabled since iOS 11 and hasn't been turned on ever since?

That’s correct.

If Bluetooth has been disabled permanently, the documentation should definitely be updated.

Quite. I’d appreciate you filing a bug against any (non-archived) docs you encounter that make this mistake.

Share and Enjoy

Quinn “The Eskimo!” @ DTS @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"

WWDC runs Mon, 22 Jun through to Fri, 26 Jun. During that time all of DTS will be busy with conference duties.
Thank you very much vor your response @eskimo.

Is there any chance that you can help here too? It's also related to MultipeerConnectivity and is currently driving me crazy.
multipeer connectivity, wifi connection works great but bluetooth seems to be dead
 
 
Q