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: any SITLocationInterface, didUpdate location: SITLocation)Parameters
locationManagerlocation provider
locationcurrent 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: any SITLocationInterface, didFailWithError error: (any Error)?)Parameters
locationManagerlocation provider
errorerror 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: any SITLocationInterface, didUpdate state: SITLocationState)Parameters
locationManagerlocation provider
statestate 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: any SITLocationInterface, didInitiatedWith request: SITLocationRequest)Parameters
locationManagerlocation provider
requestSITLocationRequestinstance