Search code examples
iosuiwebviewnsurlconnection

Specify Network Type for NSURLConnection & UIWebView


I realize I can determine what type of connection the app has access to within iOS (I have WiFi access; I have Cellular access). However, if I have access to both can I inform a NSURLConnection or UIWebView to use one or the other?

Ideally, a few specific calls I make with NSURLConnection would use cellular network, and a few calls and webview loads would use WiFi.

I don't believe this is possible, but I would like to know concretely.


Solution

  • This isn't something you can specify. It's entirely down to the OS as to which connection to use (cellular vs WiFi) and it will choose the best available based on a number of things like connection strength, WiFi assist etc.