27

The first time I try using geocodeAddressString:inRegion:completionHandler after a reset of the iOS simulator I get this error:

PBRequester failed with Error Error Domain=NSURLErrorDomain Code=-1000 "bad URL" UserInfo=0x113bba860 {NSLocalizedDescription=bad URL, NSUnderlyingError=0x113bbf2b0 "bad URL"}

This doesn't happen on the device, or on subsequent runs on the simulator (something gets cached, I'm assuming.) Does anyone know what it is or how to prevent it?

Robert Atkins
  • 23,528
  • 15
  • 68
  • 97

2 Answers2

0

i had the same problem (error on simulator but not on device) but i fixed it by cleaning the project, resetting the simulator and restarting xcode.

Radu Ursache
  • 1,230
  • 1
  • 22
  • 35
0

1) Uninstall your app from the iOS simulator (just like you'd do on a real device, click and hold on the app icon...)
2) Xcode > Window > Organizer > (your project) > Derived Data > Delete...
3) Rebuild and you should be good to go.
That's what worked for me.

Gobe
  • 2,559
  • 1
  • 25
  • 24