SITServices
Objective-C
@interface SITServices : NSObject
Swift
class SITServices : NSObject
Service class for the Situm SDK for iOS
-
Provides your API key to the Situm SDK for iOS. This key is generated for your application
Declaration
Objective-C
+ (BOOL)provideAPIKey:(NSString *_Nonnull)APIKey forEmail:(NSString *_Nonnull)email;
Swift
class func provideAPIKey(_ APIKey: String, forEmail email: String) -> Bool
Parameters
APIKey
APIKey is the string as developer you can see at the backend at the developer section like you can see on the following image. Follow the URL: https://dashboard.situm.com/accounts/profile
email
Email used to sign up as a developer at 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() -> Bool
Return 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
allowsInvalidSSLCertificate
BOOL 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() -> String
Return 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() -> String
Return 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) -> Bool
Parameters
APIKey
String 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.
-
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) -> Bool
Parameters
user
String with the name of the user.
password
String 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() -> String
Return 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) -> Bool
Parameters
token
The 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)
-
Indicates whether the SDK is configured with valid credentials or not
Declaration
Objective-C
+ (BOOL)isConfigured;
Swift
class func isConfigured() -> Bool
Return 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
dashboardURL
String 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)
-
Deprecated
Use provideAPIKey:forEmail:
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) -> Bool
Parameters
APIKey
APIKey is the string as developer you can see at the backend at the developer section like you can see on the following image. Follow the URL: https://dashboard.situm.com/accounts/profile
Return Value
YES if the APIKey was successfully provided