Reputation: 234
Well, I am trying to activate Location in my iOS Simulator, but I got unaccessible greyed options. Like this:
I read about Products > Schemes > Run > Options... But there's no options for Location in there. Like this other image:
Can somebody help me? How can I do this in Xcode 11? Thanks in advance!
Upvotes: 2
Views: 6822
Reputation: 12405
Xcode 13
You can simulate location in either Xcode or Simulator. For a custom location (with custom coordinates), however, you must simulate location in Simulator, not in Xcode because Xcode does not offer this feature. And to do that you must disable location simulation in Xcode (because it will override Simulator if enabled) and enable it exclusively in Simulator.
To do that, in Xcode, go to "Product", "Scheme", "Edit Scheme" and set "Default Location" to none and uncheck "Allow Location Simulation". Then in Simulator, go to "Features", "Location", "Custom Location" and enter in coordinates.
Upvotes: 0
Reputation: 13
If you want to set/fake location for simulate with Xcode 11 or later.
Upvotes: 1
Reputation: 191
On Xcode 11 and later, you need to go to the Simulator. Open "Features" in the menu, then select "Location".
Upvotes: 5
Reputation: 478
You just need to go to the simulator open Debug menu -> Location and all set.
Upvotes: 3