SITServices

@interface 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;

    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

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

    Declaration

    Objective-C

    + (NSString *_Nonnull)SDKVersion;
  • Returns the current value

    Declaration

    Objective-C

    + (BOOL)allowsInvalidSSLCertificate;

    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;

    Parameters

    allowsInvalidSSLCertificate

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

  • 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;

    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;

    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;

    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;

    Return Value

    String containing the api key used to authorize the requests to dashboard.

  • Email identifying the user.

    Declaration

    Objective-C

    + (NSString *_Nullable)email;

    Return Value

    String containing the email to identify the user.

  • Name of the user.

    Declaration

    Objective-C

    + (NSString *_Nullable)user;

    Return Value

    String containing the name of the user.

  • Password used to access dashboard resources.

    Declaration

    Objective-C

    + (NSString *_Nullable)password;

    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;

    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;

    Return Value

    String containing the url used to access the dashboard.

  • Clears authentication data

    Declaration

    Objective-C

    + (void)clearData;
  • Clears all user data

    Declaration

    Objective-C

    + (void)clearAllData;
  • Provide user token

    Declaration

    Objective-C

    + (BOOL)provideToken:(SITToken *_Nonnull)token;

    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;

    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;

    Parameters

    dashboardURL

    String containing the url used to access the dashboard.

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

    Declaration

    Objective-C

    + (BOOL)provideAPIKey:(NSString *_Nonnull)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