SPLive

@interface SPLive : NSObject

SPLive

This class is used to enable real-time tracking of assets. Assets may include for example: People, mobile devices, bluetooth beacons or anything else that can send location information to the Steerpath Live Service.

Additionally you can choose to view the real-time locations of other registered devices on the SPMapView.

You can find an example of how to use the Steerpath Live Service at https://bitbucket.org/nimbledevices/steerpath-ios-examples/src/b9a1b96a86412a8690ac5c2168209f095a9af18e/ObjCExamples/ObjCExamples/MapWithLiveUsersViewController.m

Note! To use this class you need to have the Live access token and provide it to the app according to the instructions in SPAccountManager.h.

Need API access? Contact support@steerpath.com

  • Declaration

    Objective-C

    + (nonnull instancetype)sharedInstance;

    Swift

    class func sharedInstance() -> Self

    Return Value

    Singleton instance of SPLive

  • Unavailable

    call sharedInstance instead

    unavailable method, do not use

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Starts sending shared location data according to configuration. See SPLiveUserConfig class documentation on how to configure user properties. Starting location sharing requires an internet connection

    Declaration

    Objective-C

    - (void)shareLocationWithConfig:(nonnull SPLiveUserConfig *)liveUserConfig
                         completion:(nullable void (^)(NSError *_Nullable,
                                                       BOOL))completionBlock;

    Swift

    func shareLocation(with liveUserConfig: SPLiveUserConfig, completion completionBlock: ((Error?, Bool) -> Void)? = nil)

    Parameters

    liveUserConfig

    configuration that is used for sending location data.

    completionBlock

    called when connection to Steerpath Live Services is established or failed.

  • Stops sharing location data.

    Declaration

    Objective-C

    - (void)stop;

    Swift

    func stop()
  • Declaration

    Objective-C

    - (BOOL)enabled;

    Swift

    func enabled() -> Bool

    Return Value

    true if real-time location sharing is enabled.

  • Declaration

    Objective-C

    - (nullable NSString *)sessionIdentifier;

    Swift

    func sessionIdentifier() -> String?

    Return Value

    live session identifier.

  • Declaration

    Objective-C

    - (NSTimeInterval)locationUpdateInterval;

    Swift

    func locationUpdateInterval() -> TimeInterval

    Return Value

    interval (seconds) how often a location is shared

  • Declaration

    Objective-C

    - (NSTimeInterval)mapUpdateInterval;

    Swift

    func mapUpdateInterval() -> TimeInterval

    Return Value

    interval (seconds) how often real-time location data is updated on the map

  • Declaration

    Objective-C

    - (NSTimeInterval)keepAliveDuration;

    Swift

    func keepAliveDuration() -> TimeInterval

    Return Value

    duration (seconds) how long the device will attempt to maintain a ‘connected’ status to the server even if location can not be determined.