SPAccountManager
Objective-C
@interface SPAccountManager : NSObject
Swift
class SPAccountManager : NSObject
Used for authenticating to the Steerpath Platform.
The recommended way of providing auth credentials is to add them your application’s Info.plist.
The Steerpath API access token can be added with the key ‘SPSteerpathAccessToken’.
Need API access? Contact support@steerpath.com
-
Declaration
Objective-C
+ (nonnull instancetype)sharedInstance;
Swift
class func sharedInstance() -> Self
Return Value
singleton instance of SPAccountManager.
-
Unavailable
call sharedInstance instead
unavailable method, do not use
Declaration
Objective-C
- (nonnull instancetype)init;
-
Changes access token to use for authentication to the Steerpath Platform. It’s recommended that you define the access token in the application’s Info.plist instead of using this method. Use this only if you need to change your API key during runtime.
Need API access? Contact support@steerpath.com
Declaration
Objective-C
- (void)setSteerpathAccessToken:(nonnull NSString *)token;
Swift
func setSteerpathAccessToken(_ token: String)
Parameters
token
Steerpath access token
-
Changes access token to use for authentication to the Steerpath Platform. It’s recommended that you define the access token in the application’s Info.plist instead of using this method. Use this only if you need to change your API key during runtime. This method is different from the other method only that you specifiy a custom local config path to the config file
Need API access? Contact support@steerpath.com
Declaration
Objective-C
- (void)setSteerpathAccessToken:(nonnull NSString *)token withCustomConfigPath:(nonnull NSString *)configFilePath;
Swift
func setSteerpathAccessToken(_ token: String, withCustomConfigPath configFilePath: String)
Parameters
token
Steerpath access token
-
The recommended way to define your Steerpath access token is to add a string entry to your application Info.plist file with the key ‘SPSteerpathAccessToken’.
Declaration
Objective-C
- (nullable NSString *)steerpathAccessToken;
Swift
func steerpathAccessToken() -> String?
Return Value
access token currently in use.
-
Changes the access token to use for authentication to the Steerpath Live Services. This access token is only required if you want to track user or device locations in real-time.
Need API access? Contact support@steerpath.com
Declaration
Objective-C
- (void)setLiveAccessToken:(nonnull NSString *)token;
Swift
func setLiveAccessToken(_ token: String)
Parameters
token
Steerpath Live access token
-
Get the Steerpath Live access token currently being used. This is only required if you want to track user or device locations in real-time
Need API access? Contact support@steerpath.com
Declaration
Objective-C
- (nullable NSString *)liveAccessToken;
Swift
func liveAccessToken() -> String?
Return Value
live access token currently in use.
-
Sets region where data will be fetched from. Calling this method will change all URLs SPAccountManager is using.
By default the SDK is using EU1.
If you want to restrict your data to a certain region, contact support@steerpath.com
Declaration
Objective-C
- (void)setRegion:(SPServiceRegion)region;
Swift
func setRegion(_ region: SPServiceRegion)
Parameters
region
service region to use
-
Return Value
region that is current being used.
-
Sets the default language for the search. In future release, this will also change the language of the map. Does not change the UI language.
Declaration
Objective-C
- (void)setLanguage:(nonnull NSString *)languageCode;
Swift
func setLanguage(_ languageCode: String)
Parameters
languageCode
ISO 639-1 standard language code, followed by optional ISO-3166 country code. For example “en”, “en-GB” or “en_GB”. The country code part will be ignored. Supported languages are defined in config.json. If unsupported language is given, nothing happens. Null value will reset to the default.
-
Declaration
Objective-C
- (nonnull NSString *)language;
Swift
func language() -> String
Return Value
languageCode that is current being used.
-
URL where metadata will be fetched from. By default you don’t need to change this.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSURL *_Nonnull metadataURL;
Swift
var metadataURL: URL { get }
-
URL where route information will be fetched from. By default you don’t need to change this.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSURL *_Nonnull routeURL;
Swift
var routeURL: URL { get }
-
URL where beacon information will be fetched from. By default you don’t need to change this.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSURL *_Nonnull beaconsURL;
Swift
var beaconsURL: URL { get }
-
URL where positioning information will be fetched from. By default you don’t need to change this.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSURL *_Nonnull positioningURL;
Swift
var positioningURL: URL { get }
-
URL where vector tile information will be fetched from. By default you don’t need to change this.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSURL *_Nonnull tileURL;
Swift
var tileURL: URL { get }
-
URL where EID data will be fetched from. By default you don’t need to change this.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSURL *_Nonnull eidURL;
Swift
var eidURL: URL { get }
-
URL where offline bundles will be fetched from. By default you don’t need to change this.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSURL *_Nonnull offlineURL;
Swift
var offlineURL: URL { get }
-
URL where real-time location data is sent and fetched from. By default you don’t need to change this.
Declaration
Objective-C
@property (nonatomic, strong) NSURL *_Nonnull liveURL;
Swift
var liveURL: URL { get set }
-
Declaration
Objective-C
- (nonnull NSString *)sdkVersion;
Swift
func sdkVersion() -> String
Return Value
sdk version being used