SITLocationDelegate
Objective-C
@protocol SITLocationDelegate <NSObject>
Swift
protocol SITLocationDelegate : NSObjectProtocol
Delegate for SITLocationManager. Use this to listen for location related callbacks.
-
Called when user’s location changes.
Declaration
Objective-C
- (void)locationManager:(id<SITLocationInterface> _Nonnull)locationManager didUpdateLocation:(SITLocation *_Nonnull)location;
Swift
func locationManager(_ locationManager: SITLocationInterface, didUpdate location: SITLocation)
Parameters
locationManager
location provider
location
current location
-
Called when an error is encountered.
Note
Invoked when an error has occurred. Error types are defined in “SITLocationError.h”.Declaration
Objective-C
- (void)locationManager:(id<SITLocationInterface> _Nonnull)locationManager didFailWithError:(NSError *_Nullable)error;
Swift
func locationManager(_ locationManager: SITLocationInterface, didFailWithError error: Error?)
Parameters
locationManager
location provider
error
error description
-
Called when the system changes it’s internal state
Declaration
Objective-C
- (void)locationManager:(id<SITLocationInterface> _Nonnull)locationManager didUpdateState:(SITLocationState)state;
Swift
func locationManager(_ locationManager: SITLocationInterface, didUpdate state: SITLocationState)
Parameters
locationManager
location provider
state
state of the system (one of SITLocationState enum values)
-
Called every time the location engine is initialized with a valid
SITLocationRequest
. Optional callback that allows the developer to know the parameters that are being used to initialize the location engine. Specially important when using Remote Configuration in your app.Declaration
Objective-C
- (void)locationManager:(id<SITLocationInterface> _Nonnull)locationManager didInitiatedWithRequest:(SITLocationRequest *_Nonnull)request;
Swift
optional func locationManager(_ locationManager: SITLocationInterface, didInitiatedWith request: SITLocationRequest)
Parameters
locationManager
location provider
request
SITLocationRequest
instance