Update Current Location (iOS)

Call the method to update the current location of a user.

Using the updateCurrentLocation method, you can update the user's current location. You can set the accuracy between 5 and 100 meters (default is 10).

You can now send custom meta-data JSON values along with updateCurrentLocation method.

// update current location without meta-data
Roam.updateCurrentLocation(accuracy)

// update the current location with meta-data
// Declare meta-data
let publish = RoamPublish()
let metaData:Dictionary<String,Any> = ["key":value]
publish.meta_data = metaData
Roam.updateCurrentLocation(accuracy, publish)

This method should be used only if you need to update the current location of the device with better accuracy. Using this method consistently will consume more battery. The higher the accuracy, the longer the response time. In some cases, it can take up to 30 seconds depending on the GPS signal strength.

Last updated