WhereamI app error


#1

Hello Forum. :slight_smile:

hi :slight_smile:

Im currently going through this book and i am stuck on chapter 4, my issue being I’ve followed the book down to a comma but when i do my first build instead of getting the output showed in the book i get an error code

2011-08-12 07:13:24.595 Whereami[301:207] Could not find location: Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"
2011-08-12 07:14:10.176 Whereami[301:207] Could not find location: Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"

I guess i should say that im running this on the simulator, thou the book says nothing bout that being an issue. Ive also ran the project to see if it was an error on my part but with same results.

Thanks for the help with this one.


#2

In a lower post in this section is some code from Joe about a hack. Did you by chance implement that?

http://forums.bignerdranch.com/viewtopic.php?f=79&t=2069


#3

thanks I actually waas just gonna post back about finding it here.


#4

The problem could be that your Wi-Fi Access Point is unknown. To make sure that it is not a coding error, in the simulator start Safari and see whether it doesn’t find your location either. If so, the problem is your unknown Wi-Fi AP. The solution is to make your AP known to the outside wold. In order to do that, go to skyhookwireless.com and read the instructions. This site enables you to update your Wi-Fi Access Point information in the XPS system. Note: it took six weeks before I was hooked up, but it works now.

Good luck.


#5

I’m also stuck on chapter 4, the first build and run of the whereami app, where I should be getting some coordinates.
I’m getting no errors but also no coordinates, just a session start message:

[Session started at 2011-10-08 17:02:07 -0400.]

I tried the hack from Joe noted by PHBeagle, but that didn’t make a difference - same message.
HarryA’s comment that “The problem could be that your Wi-Fi Access Point is unknown” seems like it might be relevant so I’m posting here.
However, I’m not familiar with finding location on Safari (I use Firefox on Mac) or what that should tell me.
I’m using Xcode 3.2.5 with iOS 4.2 on a mac powerbook and snow leopard and the simulator - don’t have iPhone or iPad.
I can get websites on the simulator with its Safari browser. I have a Wi-Fi connection to my landlord’s Verizon account.
Setting up an account with Skyhookwireless.com sounds like overkill and I’m not sure what that is committing me to. I’d like to find a simpler solution.

Any help would be appreciated.


#6

In the simulator(!) find the Safari icon (it’s in the iPhone dock). Then go onto Google -> Places. You should see a pop-up menu “Set your location” that let you choose between “Use current location” and “City OR Zip …”. Choose “Use current location.” It should find your location; if not it defaults to infinite loop. If the latter is the case, your WiFi access point is unknown. This is quite common for remote places or places outside the US.
I am not aware of simpler solutions here, other than to buy yourself an iPhone that will make use of GPS.


#7

Try turning on your AirPort.
stackoverflow.com/questions/1409 … in-error-0