This article discusses the iOS Simulator, but this technique also works in the Android Emulator.
When you’re developing your app with the Meridian iOS SDK and previewing the app in the iOS Simulator, you can simulate a “current location” in the app.
The iOS Simulator doesn’t provide access to the Bluetooth hardware on your computer, which means it can’t determine location using Beacons or Wi-Fi.
Fortunately, you can simulate a location. Here’s how to do that:
Go to a map in the Meridian Editor with Placemarks.
Point your mouse at the Placemark location 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 iOS Simulator.
Simulate a Location on an Android Device
In addition to simulating a blue dot in the iOS Simulator, you can also do this on your iOS device using the following Meridian SDK code after adding the simulated pink dot in the Editor.
let config = MRConfig() config.applicationToken = "090c29d8b4cc628e4bd327abf37f62e4e3477bae" config.useSimulatedLocation = true Meridian.configure(config)
The application token above is for the iOS SDK Sample app. If you’d like to simulate a blue dot for your location, generate a token for your location in the Meridian Editor.