I cannot seem to add any simulated location to the simulator, as the corresponding menu is completely greyed out, as shown in figure:
the location works well when debugging with the actual device.
any idea?
With your iPhone or iPad plugged in, select Toolbox at the top of the program, and then VirtualLocation from that screen. Select somewhere on the map, or use the search bar, to choose where you want to fake your location. Select Modify virtual location, and then select OK when you see the confirmation prompt.
Click the location on the map you want to simulate, and then press the lowercase L key. A dialog will appear with the message, “Simulated Location Set”. After a short time, the simulated location you set in the Editor will appear as a pink dot in the Android Emulator. Click anywhere on the map, and press Shift+L.
The iOS Simulator must be running your app before that menu will be enabled. For me it appears immediately after a successful build.
If it's proving inconvenient to make a selection in that menu between build of your app and it's launch, I would recommend setting a default location via Product -> Scheme -> Edit Scheme. You can then select your preferred default in the Run / Options panel after checking the "Allow Location Simulation" box.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With