In U3DXT iOS SDK, does any one know how to set up the delegate for Significant-Change Location Service, so my method responds to a location change?
void Init() {
// make sure to keep it as a member variable
manager = new CLLocationManager();
manager.DidUpdateLocations += delegate(object sender, CLLocationManager.DidUpdateLocationsEventArgs e){
CLLocation location = e.locations[e.locations.Length-1] as CLLocation
Debug.Log("current location coordinates: " + location.coordinate);
};
}
void StartMonitor() {
if (!CLLocationManager.LocationServicesEnabled() || !CLLocationManager.SignificantLocationChangeMonitoringAvailable()) {
Debug.Log("Significant change monitoring not available.");
} else {
manager.StartMonitoringSignificantLocationChanges();
}
}