7 Replies
      Latest reply on Sep 12, 2019 8:19 AM by hmestiri
      hmestiri Level 1 Level 1 (0 points)

        Hello,

         

        We encountered some issues with iOS 13 beta 8 when using NEHotspotConfiguration on iOS 13. Our app uses NEHotspotConfigurationManager to connect itself to an appliance using Wi-Fi with WPA2 access. The hotspot hasn't an internet connection available.

         

        In older iOS versions (iOS 12 and lower) everything worked fine but in iOS 13 the device is being disconnected after a while every single time.

         

        Is there something to configure on iOS 13 to disable this automatic disconnection ?

         

        PS: some other peole have the same issue (https://stackoverflow.com/questions/57552952/ipados-network-connected-via-nehotspotconfiguration-disconnects-after-a-while)

        • Re: iOS 13: Network connected via NEHotspotConfiguration disconnects after a while
          eskimo Apple Staff Apple Staff (11,805 points)

          Is this is a beta 8 regression?  Or has it been this way during the entire beta cycle?

          Share and Enjoy

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

          • Re: iOS 13: Network connected via NEHotspotConfiguration disconnects after a while
            mwbeatty Level 1 Level 1 (0 points)

            I came here to report the same issue.

            On iOS 12, the phone stays connected to the hotspot but on iOS 13 it disconnects after 15-20 seconds. I'm on 13.1 for what it's worth.

            • Re: iOS 13: Network connected via NEHotspotConfiguration disconnects after a while
              mwbeatty Level 1 Level 1 (0 points)

              OK, it seems I've solved this issue by changing the joinOnce setting to false.

                • Re: iOS 13: Network connected via NEHotspotConfiguration disconnects after a while
                  hmestiri Level 1 Level 1 (0 points)

                  By setting joinOnce to false, the disconnection disappears but we received an NSURLErrorNotConnectedToInternet error when we send a local request (192.168.x.x/xxxx) on the hotspot.

                   

                  So setting to false is not a good solution for us because the hotspot is not connected to the internet and we use it temporarily. We want display on the application the Wi-Fi list discovered by our appliance to let user select its WiFi network and connect the appliance on it.

                    • Re: iOS 13: Network connected via NEHotspotConfiguration disconnects after a while
                      eskimo Apple Staff Apple Staff (11,805 points)

                      Unfortenalty, we don't try it with earlier beta.

                      That is, indeed, quite unfortunate.  I’m going to recommend what I always recommend in situations like this, namely filing a bug about the change in behaviour, but this delay means that you also need to look at workarounds.


                      On the bug front, I have some suggestions for how to file that:

                      1. Install the Wi-Fi for iOS profile from our Bug Reporting > Profiles and Logs page.

                      2. Make a note of the time you start your test.  This doesn’t have to be ultra-precise — within a second or two is fine.

                      3. Join the network.

                      4. Wait until you get kicked off.

                      5. Make a note of that time.

                      6. Trigger your sysdiagnose, per the instructions associated with the profile from step 1.

                      7. File your bug, attaching the sysdiagnose log and, in the steps to reproduce, calling out the timestamps from from steps 2 and 5.

                      Please post your bug number, just for the record.


                      On the workaround front, you wrote;

                      By setting joinOnce to false, the disconnection disappears but we received an NSURLErrorNotConnectedToInternet error when we send a local request (192.168.x.x/xxxx) on the hotspot.

                      When that happens, what does getifaddrs return for the IP configuration of the Wi-Fi interface?

                      Share and Enjoy

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

                        • Re: iOS 13: Network connected via NEHotspotConfiguration disconnects after a while
                          hmestiri Level 1 Level 1 (0 points)

                          We didn't try it with ealier beta because our appliance was not ready

                           

                          I create a feedback with sysdiagnose log, the number is FB7256722.

                           

                          I do some other tests, I create a single view project with a button. When the button is triggered, the device will connect via NEHotspotConfigurationManager to an hotspot named "iPhone de Hedi" (the hotspot is an another iPhone). After 15 seconds, the device was disconnected without any reason.

                           

                          Analysing the sysdiagnose log, the disconnection seems to be caused by :

                          • "__WiFiManagerSessionBasedDisassociationTimerCallback: diassociating to iPhone de Hedi application is no longer active"

                          But we keep the application on foreground during the test.

                           

                          The disconnection appears every 15 seconds after connection, it's seems to be related to the discusion on joinOnce documentation :

                          The hotspot is disconnected and its configuration is removed when any of the following events occurs:

                          • The app stays in the background for more than 15 seconds.

                           

                          Maybe, the system wrongly thinks that the app is in background ?

                           

                          On the workaround by setting joinOnce to false, finally it works ! We found an issue with our http library but when we use URLSession directly it works fine.