GuybrushThreepwood
GuybrushThreepwood

Reputation: 5616

Overriding Proxy in Device Settings for NSURLSessionConfiguration?

Is it possible to ignore the proxy settings that are in the device network settings, and instead use no proxy when using an NSURLSession ?

Basically I want to fall back on using no proxy if the connection fails.

Thanks !

Upvotes: 0

Views: 321

Answers (1)

dgatwood
dgatwood

Reputation: 10407

I'm pretty sure that providing an empty connectionProxyDictionary in a session configuration should do the trick. Note that it must be an actual empty dictionary. Setting it to nil uses the default system proxy settings.

Upvotes: 3

Related Questions