SPLiveUserConfig
Objective-C
@interface SPLiveUserConfig : NSObject
Swift
class SPLiveUserConfig : NSObject
SPLiveUserConfig
Use this class to configure SPLive settings for this user/device.
-
Required
Unique user identifier that is associated with location events when they are being sent from this device.
Note that this is a required property
Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nonnull userIdentifier;
Swift
var userIdentifier: String { get set }
-
Required
Password for user. You’re free to decide a password for your user. Password can not be changed once you’ve used it to start location sharing.
Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nonnull password;
Swift
var password: String { get set }
-
Optional
Title that will be displayed on top of the live user marker on the map. Note that alternatively you can override user titles via the SPMapViewDelegate ‘mapView:titleForLiveUser:’ method.
Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nonnull title;
Swift
var title: String { get set }
-
Optional
Array of group identifiers that this user should be associated with. You can add a user into multiple groups. It’s recommended that you add users into groups if you want to filter visible users on the map by group.
Examples of groups: “Employees”, “Guests”, “Customers”, “Managers” etc.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSArray<NSString *> *userGroups;
Swift
var userGroups: [String]? { get set }
-
Optional
Array of geofence identifiers that the user should be allowed to be. If a user moves inside an allowed geofence, the user will be flagged as being inside an ‘allowed’ area.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSArray<NSString *> *allowedGeofences;
Swift
var allowedGeofences: [String]? { get set }
-
Optional
Array of geofence identifiers that the user is forbidden to be. If a user moves inside a forbidden geofence, the user will be flagged as being inside an ‘forbidden’ area.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSArray<NSString *> *forbiddenGeofences;
Swift
var forbiddenGeofences: [String]? { get set }
-
Optional
Array of geofence identifiers that are neutral to the user. This means the user is not explicitly allowed or forbidden to be inside the geofences but should still be tracked while they’re inside neutral geofences. If a user moves inside a neutral geofence, the user will be flagged as being inside an ‘neutral’ area.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSArray<NSString *> *neutralGeofences;
Swift
var neutralGeofences: [String]? { get set }
-
Deprecated
This property has been deprecated. You don’t have to use this anymore as the update interval is adjusted by the service.
Deprecated
Declaration
Objective-C
@property (nonatomic) NSTimeInterval updateInterval;
Swift
var updateInterval: TimeInterval { get set }