3

I checked all the other variants of this, and don't see the answer here. It seems a lot of folks are thinking of Xcode 4.1, and the issues therein.

First of all, I am very happy with Xcode 4.2. It fixes the huge plethora of problems I was having, and, once again, makes the simulator a useful tool. I am very glad for this, because it is a MUCH faster workflow than using the devices.

Now, 4.2 introduces something in their Edit Scheme dialog (Go to the "Run" page, then "Options"). This is called "Core Location [checkbox] Allow Location Simulation". It allows you to pick from a list of pre-defined locations.

This seems to obviate the horrendous hack that I had introduced when I first encountered the issue in Lion.

However, it no workee. I'd like to find out what I am doing wrong. Has anyone gotten this working?

Remember: THIS BEGINS IN 4.2, WHICH JUST CAME OUT YESTERDAY. So the rules from 4.0 and 4.1 don't apply. It is a new capability.

Thanks!

Chris Marshall
  • 4,910
  • 8
  • 47
  • 72

2 Answers2

4

First, I created the GPX file as mentioned in this question.

In addition to updating the Run Scheme to select the Allow Location Simulation option and specifying the Default Location as you mentioned, you also need to make sure that your Scheme is set to iPhone 5.0 Simulator. This made the trick for me, when I debug my project, the app asks me if I want to allow it to use my current location, and I can see the Debug -> Location menu in the iPhone Simulator.

Community
  • 1
  • 1
rtovars
  • 440
  • 3
  • 17
1

There's a thread on this bug in the Apple developer forums. One suggestion is to reset the simulator.

progrmr
  • 75,956
  • 16
  • 112
  • 147
  • Thanks! Resetting did not work. However, I see that the IOS5 simulators work just fine. I guess I need to test my CL stuff in the IOS5 sims. Thanks! – Chris Marshall Oct 14 '11 at 10:59