Location Tracking
Netcore CE 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 Netcore CE 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 Netcore CE servers with every Netcore CE 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 flushed on every app launch. If the app is setting the location value manually, it's recommended that the new value be set as soon as the app is launched. If the value is not set, Netcore CE SDK will send the blank value to the Netcore CE server.
If SmartechAutoFetchLocation is YES, the value will be automatically updated on app launch.
Updated 6 months ago