SITServices Class Reference

Inherits from NSObject
Declared in SITServices.h

Overview

Service class for the Situm SDK for iOS

+ provideAPIKey:

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.es/accounts/profile This should be called exactly once by your application, e.g., in application: didFinishLaunchingWithOptions:.

+ (BOOL)provideAPIKey:(NSString *)APIKey

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.es/accounts/profile

Return Value

YES if the APIKey was successfully provided

Discussion

Warning: This method has been deprecated since v0.1.0-beta.

Warning: Use provideAPIKey:forEmail: instead

Declared In

SITServices.h

+ provideAPIKey:forEmail:

Provides your API key to the Situm SDK for iOS. This key is generated for your application

+ (BOOL)provideAPIKey:(NSString *)APIKey forEmail:(NSString *)email

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.es/accounts/profile

email

Email used to sign up as a developer at https://dashboard.situm.es/accounts/profile

Return Value

YES if the APIKey was successfully provided

Declared In

SITServices.h

+ SDKVersion

Returns the version for this release of the Situm SDK for iOS.

+ (NSString *)SDKVersion

Declared In

SITServices.h

+ allowsInvalidSSLCertificate

Returns the current value

+ (BOOL)allowsInvalidSSLCertificate

Return Value

BOOL value (default is NO)

Declared In

SITServices.h

+ setAllowsInvalidSSLCertificate:

Tell the system to trust the SSL certificate of the server (even though the Authority is not valid)

+ (void)setAllowsInvalidSSLCertificate:(BOOL)allowsInvalidSSLCertificate

Parameters

allowsInvalidSSLCertificate

BOOL value (if YES, communications with the server may not be secure)

Declared In

SITServices.h

+ deviceID

Identifier of the smartphone

+ (NSString *)deviceID

Return Value

Internal unique string used to identify the user’s device.

Declared In

SITServices.h

+ isValidAPIKey:

Checks whether the APIKEY is valid for use.

+ (BOOL)isValidAPIKey:(NSString *)APIKey

Parameters

APIKey

String containing the api key to be validated.

@return

Declared In

SITServices.h

+ email

Email identifying the user.

+ (NSString *)email

Return Value

String containing the email to identify the user.

Declared In

SITServices.h

+ user

Name of the user.

+ (NSString *)user

Return Value

String containing the name of the user.

Declared In

SITServices.h

+ password

Password used to access dashboard resources.

+ (NSString *)password

Return Value

String containing the password used to authorize the requests to dashboard.

Declared In

SITServices.h

+ provideUser:password:

Method used to set the user and password of the current session.

+ (BOOL)provideUser:(NSString *)user password:(NSString *)password

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.

Declared In

SITServices.h

+ parse:

Function used to parse a token to the correct format.

+ (NSString *)parse:(NSString *)token

Parameters

token

String containing the token to be parsed.

Return Value

String containing the parsed token.

Declared In

SITServices.h

+ token

Token used in the network requests.

+ (SITToken *)token

Return Value

String containing the stored token.

Declared In

SITServices.h

+ auth

Type of authentication used.

+ (SITAuth)auth

Return Value

Value of SITAuth enum indicating the type of authentication used.

Declared In

SITServices.h

+ deviceModelName

User friendly name for the device’s model.

+ (NSString *)deviceModelName

Return Value

Name of the device’s model

Declared In

SITServices.h

+ dashboardURL

URL used to access the dashboard.

+ (NSString *)dashboardURL

Return Value

String containing the url used to access the dashboard.

Declared In

SITServices.h

+ setDashboardURL:

Sets the URL used to access the dashboard.

+ (void)setDashboardURL:(NSString *)dashboardURL

Parameters

dashboardURL

String containing the url used to access the dashboard.

Declared In

SITServices.h