BKBlukiiCloud

open class BKBlukiiCloud

This class is the main controller for blukii cloud based actions.

You can get a BKBlukiiCloud object via BKController.instance.

With a blukii cloud object you have access to the cloud state. You can set credentials and a API key, get the user role, check if the user is authenticated and you can do the login and logout.

Note: The API key has be purchased from blukii. Please contact support@blukii.com for more information.

Public API

  • Sets the user credentials

    These are needed for sdk functions that transfers user assigned data with blukii Manager

    Declaration

    Swift

    open func setCredentials(user: String, password: String)

    Parameters

    user

    user’s username

    password

    user’s password

  • Sets the API key

    This is needed for every SDK function that needs to interact with blukii Manager

    The API Key has be purchased from blukii. Please contact support@blukii.com for more information

    Declaration

    Swift

    open func setApiKey(apiKey: String)

    Parameters

    apiKey

    developer’s API key

  • Gets the role of an authenticated user

    Declaration

    Swift

    open func getUserRole() -> BKBlukiiCloudUserRole

    Return Value

    the BKBlukiiCloudUserRole

  • Checks if the user is logged in

    Declaration

    Swift

    open func isAuthentificated() -> Bool

    Return Value

    trueif user is authenticated, otherwise false

  • Do login with before set credentials and API key

    Declaration

    Swift

    open func login()
  • Do logout.

    After this method call, user is no longer authenticated.

    Declaration

    Swift

    open func logout()