title: Connect to the Wi-Fi network from within the app without internet access
body: <p>I am developing hotspot helper application which tries to connect to the captive network after connecting to it, I need to handle the authentication within the app.</p>
  <h1>Approach 1</h1>
  <p>I used NEHotspotConfigurationManager in order to programmatically connect to the WiFi network and it works great. The problem i am facing is after connecting to the captive network iOS does not send the request to the connected network until the connected network has internet access or I manually go to the settings and it pops up the web page for authentication and i click cancel and select use without internet.</p>
  <h1>Approach 2</h1>
  <p>Second approach i used is by using NEHotSpotHelper as described in <a href="https://mobiarch.wordpress.com/2016/11/02/working-with-nehotspothelper/" rel="nofollow noreferrer">this tutorial</a></p>
  <p>In this approach when I receive the commandType authenticate it does not send request to the Wi-Fi network (If the device is connected to the 4g the request goes over it otherwise it returns internet connection appears to be offline)</p>
  <p>So how can i authenticate the user from the app after connecting to the WiFi with limited access?</p>
  <p><img src="https://i.stack.imgur.com/yvM3A.png" alt="screenshot" /></p>