SITLocationInterface
Objective-C
@protocol SITLocationInterface <NSObject>
Swift
protocol SITLocationInterface : NSObjectProtocol
General interface every object providing location should conform to.
-
Provides APIs for requesting users current location.
Calling this method several times in a state different to kSITLocationStopped, would have different behaviours depending on the request being passed:
If the request is equal to the previously provided wont do anything.
If the request is different would cause a restart, stopping location updates and starting it again with the new request. Starting from version 2.52.0 a nil request can be passed to this method. This means a remote configuration will be used to configure the location engine.
See
To learn more about remote configuration and how to configure each parameter go to https://situm.com/docs/07-remote-configuration/
Declaration
Objective-C
- (void)requestLocationUpdates:(SITLocationRequest *_Nullable)request;
Swift
func requestLocationUpdates(_ request: SITLocationRequest?)
Parameters
request
SITLocationRequest object
-
State of the shared instance.
Return Value
SITLocationState value that indicates the actual state of the system
-
Stops the delivery of location updates
Note
This method has no effect if the system is not running. This will stop the location updates for all listeners added with-[SITLocationManager addDelegate:]
Declaration
Objective-C
- (void)removeUpdates;
Swift
func removeUpdates()
-
Updates parameters of the positioning system. The purpose of this call is to modify parameters of the location system on the fly, when it has already been started. It does nothing if the service is stopped. In that case location system should be started with a call to {@link #requestLocationUpdates:}.
Declaration
Objective-C
- (void)updateLocationParameters:(SITLocationParametersUpdate *_Nonnull)update;
Swift
func updateLocationParameters(_ update: SITLocationParametersUpdate)
-
Adds an external Location for the SDK to process and return as a SITLocation object through the SITLocationDelegate in locationManager:didUpdateLocation:
Declaration
Objective-C
- (void)addExternalLocation:(SITExternalLocation *_Nonnull)externalLocation;
Swift
func add(_ externalLocation: SITExternalLocation)