HACKER Q&A
📣 redgridtactical

How do you handle peer-to-peer discovery on iOS without a server?


I'm building an app that syncs between phones over Bluetooth when there's no cell service. Android has Nearby Connections API which handles discovery and transport nicely. iOS has Multipeer Connectivity but it's flaky and Apple hasn't updated it in years. CoreBluetooth works but discovery is slow and you're limited to advertising 28 bytes. Has anyone found a reliable cross-platform approach to BLE device discovery that doesn't require a central server or pre-shared identifiers?


  👤 razingeden Accepted Answer ✓
I’m going to feel like a jerk for not reading the source to figure out if it’s done in firmware or software before I point to it but meshtastic is doing something on both platforms to find new lorawan nodes and populate them in your device cache and it’s open source.

It’s something that’s consistent across both platforms is why I mention it, I don’t currently have an esp32 laying around to see if it’s done in the UI on the client or on the esp32 itself- mostly because I disliked the heltec and moved to an area where nobody’s using them now. I’m stuck on this question of trying other makes and models or giving up on the lorawan thing. For the moment I’m pegged out on how far I wanted to go with it.