5 Replies
      Latest reply on Jul 11, 2017 7:13 PM by NotMyName
      Alongtech Level 1 Level 1 (0 points)

        I am developing an application where I have to turn on the hotspot and get the information of client which connected to this hotspot.

        I'm trying to get a list of ip's of all connected devices on my personal hotspot on iOS but can't seem to find any documentation on it.Hope for some tips! thanks!

        • Re: How to list all devices connected to your hotspot?
          eskimo Apple Staff Apple Staff (12,475 points)

          iOS does not have any APIs for Personal Hotspot.  You might be able to make some progress by using networking APIs to discover client devices but I’m reticent to recommend that because Personal Hotspot doesn’t guarantee that sort of connectivity (Personal Hotspot was designed solely as a way to connect the client devices to the Internet).

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"

            • Re: How to list all devices connected to your hotspot?
              Alongtech Level 1 Level 1 (0 points)

              Thank you so much! My solution is check every IP(from 172.20.10.2 to 172.20.10.255),How do you think whether there another solution for find IP on this network?

                • Re: How to list all devices connected to your hotspot?
                  eskimo Apple Staff Apple Staff (12,475 points)

                  My solution is check every IP (from 172.20.10.2 to 172.20.10.255) …

                  Urgh!  There’s a bunch of things I don’t like about this solution but my main concern is something I wrote earlier:  Personal Hotspot does not guarantee connectivity between apps running on the hotspot device and apps running on the hotspot network.  That works right now, but it’s not an essential part of the Personal Hotspot product and so one could easily imagine it being blocked in the future.

                  Share and Enjoy

                  Quinn “The Eskimo!”
                  Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                  let myEmail = "eskimo" + "1" + "@apple.com"

                    • Re: How to list all devices connected to your hotspot?
                      Alongtech Level 1 Level 1 (0 points)

                      After a period of actual testing, this method has taken me too long and is not very stable. Can you give me some help? thanks!!!

                        • Re: How to list all devices connected to your hotspot?
                          NotMyName Level 4 Level 4 (875 points)

                          Most of the help available for this is going to involve telling you why what you're trying to do is a bad idea. 

                           

                          Here are some parts of the problem:

                          1.  The access point knows what devices are connected to it.  If you have an app that needs to know this, why aren't you using an access point modified to cooperate?

                          2.  If you're trying to implement a peer-to-peer networking app, so that an app running on two devices on the same network can communicate, there are already frameworks set up to do that.  You don't need to exhaustively scan the network to do that, either.

                          3.  If you try to scan the local network, paranoid devices and access point implementations are going to see that as a network attack and stop you.

                           

                          So why are you trying to do things the hard way?