Location Tracking
CEE SDK automatically tracks the location of the user unless you have set NO
as the value for the key SmartechAutoFetchLocation in your apps Info.plist under SmartechKeys dictionary.
If the application is already tracking the location and you would want Smartech to use that value, then register the location with the SDK by calling setUserLocation
.
CLLocationCoordinate2D location = CLLocationCoordinate2DMake(latitude, longitude);
[[Smartech sharedInstance] setUserLocation:location];
let location = CLLocationCoordinate2DMake(latitude, longitude)
Smartech.sharedInstance().setUserLocation(location)
SmartechSDK.setUserLocation(LATITUDE_DOUBLE_VALUE, LONGITUDE_DOUBLE_VALUE);
// Sample code for reference purpose only
SmartechSDK.setUserLocation(19.0760, 72.8777);
The location collected, either explicitly or implicitly, will be sent to CEE servers with every CEE SDK event. We will continue to send the same location value to our server until it changes.
This location value is maintained in-memory and get's flushed on every app launch. If the app is setting the value of the location manually then it's recommended to set the new value as soon as the app is launched. If the value is not set CEE SDK will send the blank value to CEE server.
If SmartechAutoFetchLocation is YES then the value will be automatically updated on app launch.
Updated 4 months ago