SITServices
Objective-C
@interface SITServices : NSObject
Swift
class SITServices : NSObject
Service class for the Situm SDK for iOS
-
Deprecated
Use +setAPIKey: instead; the email parameter is ignored and will be generated automatically.
Provides your API key to the Situm SDK for iOS.
@discussion This method is deprecated. The
emailparameter is ignored and an internal, deterministic email will be generated automatically based on the API key. Calling this method is equivalent to usingprovideAPIKey:without specifying an email.Note
Use
provideAPIKey:instead. This method is only kept for backward compatibility.Declaration
Objective-C
+ (BOOL)provideAPIKey:(NSString *_Nonnull)APIKey forEmail:(NSString *_Nonnull)email;Swift
class func provideAPIKey(_ APIKey: String, forEmail email: String) -> BoolParameters
APIKeyAPI key string as provided in your developer dashboard: https://dashboard.situm.com/accounts/profile
emailEmail used to sign up as a developer. Ignored in this method.
Return Value
YES if the API key was successfully provided.
-
Deprecated
Use +setAPIKey: instead; the email parameter is ignored and will be generated automatically.
Provides your API key to the Situm SDK for iOS. This key is generated for your application via the Situm APIs Console at https://dashboard.situm.com/accounts/profile This should be called exactly once by your application, e.g., in application: didFinishLaunchingWithOptions:.
Declaration
Objective-C
+ (BOOL)provideAPIKey:(NSString *_Nonnull)APIKey;Swift
class func provideAPIKey(_ APIKey: String) -> BoolParameters
APIKeyAPI key string as provided in your developer dashboard: https://dashboard.situm.com/accounts/profile
Return Value
YES if the APIKey was successfully provided
-
Provides your API key to the Situm SDK for iOS. This key is generated for your application via the Situm APIs Console at https://dashboard.situm.com/accounts/profile This should be called exactly once by your application, e.g., in application: didFinishLaunchingWithOptions:.
Declaration
Objective-C
+ (BOOL)setApiKey:(NSString *_Nonnull)APIKey;Swift
class func set(apikey APIKey: String) -> BoolParameters
APIKeyAPI key string as provided in your developer dashboard: https://dashboard.situm.com/accounts/profile
Return Value
YES if the APIKey was successfully provided
-
Returns the version for this release of the Situm SDK for iOS.
Declaration
Objective-C
+ (NSString *_Nonnull)SDKVersion;Swift
class func sdkVersion() -> String -
Returns the current value
Declaration
Objective-C
+ (BOOL)allowsInvalidSSLCertificate;Swift
class func allowsInvalidSSLCertificate() -> BoolReturn Value
BOOL value (default is NO)
-
Tell the system to trust the SSL certificate of the server (even though the Authority is not valid)
Declaration
Objective-C
+ (void)setAllowsInvalidSSLCertificate:(BOOL)allowsInvalidSSLCertificate;Swift
class func setAllowsInvalidSSLCertificate(_ allowsInvalidSSLCertificate: Bool)Parameters
allowsInvalidSSLCertificateBOOL value (if YES, communications with the server may not be secure)
-
Define if you want to use external locations instead of the positions generated by Situm indoor positioning system. To inject your own locations use the method addExternalLocation: in SITLocationInterface.
- - parameter: useExternalLocations BOOL value. If YES, the sdk wont generate locations and will use the injected ones. The default value is NO
Declaration
Objective-C
+ (void)setUseExternalLocations:(BOOL)useExternalLocations;Swift
class func setUseExternalLocations(_ useExternalLocations: Bool) -
Check if the sdk is using external locations
Declaration
Objective-C
+ (BOOL)useExternalLocations;Swift
class func useExternalLocations() -> Bool -
Returns the license information for Situm SDK for iOS.
Note
This information must be made available within the application.Declaration
Objective-C
+ (NSString *_Nonnull)licenseInfo;Swift
class func licenseInfo() -> StringReturn Value
String containing the licence informacion of this realease of the Situm SDK for iOS.
-
Identifier of the smartphone
Declaration
Objective-C
+ (NSString *_Nonnull)deviceID;Swift
class func deviceID() -> StringReturn Value
Internal unique string used to identify the user’s device.
-
Checks whether the APIKEY is valid for use.
Declaration
Objective-C
+ (BOOL)isValidAPIKey:(NSString *_Nonnull)APIKey;Swift
class func isValidAPIKey(_ APIKey: String) -> BoolParameters
APIKeyString containing the api key to be validated.
Return Value
BOOL
-
API key used to access dashboard resources.
Declaration
Objective-C
+ (NSString *_Nullable)APIKey;Swift
class func apiKey() -> String?Return Value
String containing the api key used to authorize the requests to dashboard.
-
Email identifying the user.
Declaration
Objective-C
+ (NSString *_Nullable)email;Swift
class func email() -> String?Return Value
String containing the email to identify the user.
-
Name of the user.
Declaration
Objective-C
+ (NSString *_Nullable)user;Swift
class func user() -> String?Return Value
String containing the name of the user.
-
Password used to access dashboard resources.
Declaration
Objective-C
+ (NSString *_Nullable)password;Swift
class func password() -> String?Return Value
String containing the password used to authorize the requests to dashboard.
-
Deprecated
Use +setUser:pass: instead; the email parameter is ignored and will be generated automatically.
Method used to set the user and password of the current session.
Declaration
Objective-C
+ (BOOL)provideUser:(NSString *_Nonnull)user password:(NSString *_Nonnull)password;Swift
class func provideUser(_ user: String, password: String) -> BoolParameters
userString with the name of the user.
passwordString with the password associated with the user.
Return Value
Boolean indicating the result of the auth operation.
-
Method used to set the user and password of the current session.
Declaration
Objective-C
+ (BOOL)setUser:(NSString *_Nonnull)user pass:(NSString *_Nonnull)password;Swift
class func set(user: String, pass password: String) -> BoolParameters
userString with the name of the user.
passwordString with the password associated with the user.
Return Value
Boolean indicating the result of the auth operation.
-
URL used to access the dashboard.
Declaration
Objective-C
+ (NSString *_Nonnull)dashboardURL;Swift
class func dashboardURL() -> StringReturn Value
String containing the url used to access the dashboard.
-
Clears authentication data
Declaration
Objective-C
+ (void)clearData;Swift
class func clearData() -
Clears all user data
Declaration
Objective-C
+ (void)clearAllData;Swift
class func clearAllData() -
Provide user token
Declaration
Objective-C
+ (BOOL)provideToken:(SITToken *_Nonnull)token;Swift
class func provideToken(_ token: SITToken) -> BoolParameters
tokenThe token that will be used to perform network calls
Return Value
BOOL Flag that indicates whether the token has been set (YES) or not (NO)
-
Provides your token to the Situm SDK for iOS. Any previously configured credentials will be replaced. To obtain the token use this reference https://developers.situm.com/pages/rest/openapi/#tag/jwt/POST/api/v1/auth/access_tokens
The SDK does not cryptographically validate the token signature, nor does it verify the token against Situm servers when this method is called. The token is parsed locally only to obtain the account information needed by the SDK, and it will be sent as a Bearer token in subsequent authenticated network requests.
If the provided token is expired, has an invalid signature, or is otherwise rejected by Situm servers, network operations that require server authentication will fail. However, features that can operate with already cached local data may continue to work, such as visualizing cached resources or positioning with previously downloaded positioning data.
User-provided tokens cannot be renewed automatically by the SDK. To recover from an expired or rejected token, provide a new token by calling this method again.
Declaration
Objective-C
+ (BOOL)setToken:(NSString *_Nonnull)base64Token;Swift
class func set(base64Token: String) -> BoolParameters
base64TokenString representing the token used for authentication; must not be nil or empty.
Return Value
BOOL Flag that indicates whether the token has been set (YES) or not (NO)
-
Indicates whether the SDK is configured with valid credentials or not
Declaration
Objective-C
+ (BOOL)isConfigured;Swift
class func isConfigured() -> BoolReturn Value
BOOL Flag that indicates whether the SDK is configured with valid credentials (YES) or not (NO)
-
Sets the URL used to access the dashboard.
Declaration
Objective-C
+ (void)setDashboardURL:(NSString *_Nonnull)dashboardURL;Swift
class func setDashboardURL(_ dashboardURL: String)Parameters
dashboardURLString containing the url used to access the dashboard.
-
Check if remote configuration is enabled. Default NO.
Use {@link #setUseRemoteConfig} to change this value.
Declaration
Objective-C
+ (BOOL)isUsingRemoteConfig;Swift
class func isUsingRemoteConfig() -> Bool -
Establish whether using remote configuration is allowed (YES) or not (NO)
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)setUseRemoteConfig:(BOOL)useRemoteConfig;Swift
class func setUseRemoteConfig(_ useRemoteConfig: Bool)