title: How to programmatically connect to a WiFi network given the SSID and password
body: <p>I am trying to replicate an existing Android Application that I made to iOS. In my application, I should be able to connect to a WiFi network given the SSID and the Password. The SSID and the Password can be hardcoded or can be inputted by the user. I was going through the internet to research how this can be done on iOS, however, it seems that this behavior is highly discouraged and that there's no way on doing this using public/documented libraries that won't get your application rejected by the App Store.</p>
  <p>The thing is I'll be using this application personally and I don't plan on submitting it to the App Store so it's okay if I use external libraries. If my friends would want to use it, I could export an enterprise ipa and give them instructions on how to install it.</p>
  <p>Upon searching, it seemed that <a href="http://iphonedevwiki.net/index.php/MobileWiFi.framework" rel="nofollow noreferrer">MobileWifi.framework</a> was a good candidate. However, it does not seem that there's a straightforward way of using this library to connect to a WiFi network given the SSID and the Password.</p>
  <p>Is there anyone who has successfully tried to connect to a Wifi Network given the SSID and Password?</p>