Xcode: Debug => The menu item "Simulate location" is unavailable (grayed out)

I cannot add any simulated location to the simulator, since the corresponding menu is completely gray, as shown in the figure:

enter image description here

location works well when debugging with the actual device.

any idea?

+8
debugging xcode geolocation
source share
1 answer

iOS Simulator must launch your application before this menu is turned on. For me, this appears immediately after a successful build.

If it turns out to be inconvenient to make a choice in this menu between building the application and launching it, I would recommend setting the default location through Product → Scheme → Edit Scheme. Then you can choose your preferred default option in the "Launch / Settings" panel after checking "Allow model placement".

Xcode: Default location option

+12
source share

All Articles