iOS socket list of hosts wlan
-
26-12-2019 - |
Question
I have some WLAN-Device, that I communicate with. At first I go to IOS Settings and connect to the device directly. Then in my App I need to input the ip and port to open a socket. Until now I knew the IP and Port, to open a socket connection to this device. But if I am already connected (Adhoc) to the device, why I can not find this stuff automatically? I already saw some solutions, but most of them need the usage of dynamic libs or just not longer available in iOS7.1. I can not use dynamic libs, because this App should go to AppStore.
Solution
There is no other way since iOS 6. You have to scan the location. "Reachability" could help you, if you know the name of the host. Also you could try to scan the posible IP's. With Thread limited by 5 Operations it could go preaty fast.