jshah
jshah

Reputation: 1661

Could not determine current country code: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost."

Can't load map in one of my view controllers. I checked the other stackoverflow post: NSURLConnection GET request returns -1005, "the network connection was lost" but it isnt working for me.

Here is an image of my view controller and error message:

i.imgur.com/cdaUX1z.png

I've tried resetting content settings, relaunching simulator and different wifi connections.

Do you guys have any other suggestions?

Upvotes: 0

Views: 1176

Answers (3)

gnasher729
gnasher729

Reputation: 52602

"The network connection was lost" means exactly that. Your device lost its network connection. Can happen with any device, any time. Your app should handle this gracefully.

Looking at your own reply: So if a customer runs into this problem, you are going to visit them and set up a proxy for them?

Upvotes: 2

jshah
jshah

Reputation: 1661

Using Charles or setting up a Secured Web Proxy (HTTPS) solved the problem for me.

Upvotes: 1

vishnu
vishnu

Reputation: 715

Restart your simulator and run it. Then it will works fine.

Upvotes: 1

Related Questions