Client

public protocol Client

Handles communication with the biid Identity Service, manages digital certificates and provides functionality for securely signing and confirming document & authentication transactions respectively

  • Initializes the Biid client. Does nothing if the client is already initialised.

    Swift

         do {
             try SDK.getClient.initialize()
         }
         catch (let exception) {
             // Handle exception
         }
    

    ObjC

         NSError *error;
         [biidCoreSDK.getClient initialize:&error];
         if (error) {
             // Handle error
         }
    

    The client must be initialised before any other client method is called.

    Throws

    ClientException

    Declaration

    Swift

    func initialize() throws
  • Authenticates a user

    Swift

         SDK.getClient.authenticate(withUsername: username, securityProviderAccessToken: token, entity: entity,
             onSuccess: {
                 // Handle successful authentication        
             }, onNoConnection: {
                 // Handle no connection
             }, onInvalidToken: { (error) in
                 // Handle invalid token
             }, onClientError:  { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient authenticateWithUsername:userName securityProviderAccessToken:token entity:entity
             onSuccess:^{
                 // Handle Success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func authenticate(withUsername username: String, securityProviderAccessToken accessToken: String, entity: Entity?, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    username

    Username

    accessToken

    Security Provider Access Token

    entity

    Optional - the entity to select after authentication

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onClientError

    Closure called when a client error occurs

  • Re-authenticates the User’s current Entity

    Swift

         SDK.getClient.reauthenticate(
             onSuccess: {
                 // Handle Success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidToken: { (error) in
                 // Handle invalid token Error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

    
         [biidCoreSDK.getClient reauthenticateOnSuccess:^ {
                 // Handle Success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func reauthenticate(onSuccess: @escaping () -> Void,

    Parameters

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onClientError

    Closure called when a client error occurs

  • Logs the user out

    Swift

         do {
             try SDK.getClient.logout()
         }
         catch (let exception) {
             // Handle logout exception
         }
    

    ObjC

         NSError *error;
         [biidCoreSDK.getClient logout:&error];
    

    Throws

    ClientException

    Declaration

    Swift

    func logout() throws
  • Sets the device’s installation id NB The installation id should be unique per device installation

    Swift

         do {
             try SDK.getClient.setInstallationID(installationID: installationID)
         }
         catch (let exception) {
             // Handle exception
         }
    

    ObjC

         NSError *error;
         [biidCoreSDK.getClient setInstallationID:installationID error:&error];
    

    Throws

    ClientException

    Declaration

    Swift

    func setInstallationID(installationID: String) throws
  • Returns the device’s installationID

    Swift

         do {
             let installationID = try SDK.getClient.getInstallationID()
         }
         catch (let exception) {
             // Handle exception
         }
    

    ObjC

         NSError *error;
         NSString *installationID = [biidCoreSDK.getClient getInstallationID:&error];
    

    Throws

    ClientException

    Declaration

    Swift

    func getInstallationID() throws -> String
  • Returns the authenticated roles.

    Swift

         do {
             let roles = try SDK.getClient.getRoles()
         }
         catch (let exception) {
             // Handle exception
         }
    

    ObjC

         NSError *error;
         NSArray *roles = [biidCoreSDK.getClient getRoles:&error];
    

    Throws

    ClientException

    Declaration

    Swift

    func getRoles() throws -> Roles
  • Checks if an entity with a given url name exists and returns the Entity if it does. NB The multipleEntitiesNotSupported client exception is returned if the app is not configured to support multiple entities

    Swift

         SDK.getClient.checkEntityExists(withURLName: urlName,
             onSuccess: { (entity) in
                 // Handle success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient checkEntityExistsWithURLName:urlName
             onSuccess:^(Entity * _Nullable entity) {
                 // Handle success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func checkEntityExists(withURLName urlName: String, onSuccess: @escaping (_ entity: Entity?) -> Void, onNoConnection: @escaping NoConnectionCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    urlName

    the URL name of the entity. For example in an entity with a URL of the-entity.biid.com, the URL name is the-entity

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onClientError

    Closure called when a client error occurs

  • Requests an entity by url. NB Returns multipleEntitiesNotSupported client exception if the app is not configured to support multiple entities

    Swift

         SDK.getClient.requestEntity(withURLName: urlName,
             onSuccess: { (entity) in
                 // Handle success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token Error
             }, onValidationError: { (error) in
                 // Handle field validation Error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient requestEntityWithURLName:urlName
             onSuccess:^(Entity * _Nonnull entity) {
                 // Handle success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onValidationError:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestEntity(withURLName urlName: String, onSuccess: @escaping (_ entity: Entity) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onValidationError: @escaping ValidationErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    urlName

    the URL name of the entity. For example in an entity with a URL of the-entity.biid.com, the URL name is the-entity

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onValidationError

    Closure called when a parameters fails validation

    onClientError

    Closure called when a client error occurs

  • Requests a list of entities linked to the user. NB Returns multipleEntitiesNotSupported client exception if the app is not configured to support multiple entities

    Swift

         SDK.getClient.requestEntitiesForUser(
             onSuccess: { (entities) in
                 // Handle returned entities
             }, onNoConnection: {
                 // Handle no connection
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token
             }, onClientError:  { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient requestEntitiesForUserOnSuccess:^(NSArray <Entity *>* _Nonnull entities) {
                 // Handle returned entities
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestEntitiesForUser(onSuccess: @escaping (_ entities : [Entity]) -> Void,

    Parameters

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onClientError

    Closure called when a client error occurs

  • Selects an entity. If the entity was not linked to the device before, it will be after this method is called. NB Returns multipleEntitiesNotSupported client exception if the app is not configured to support multiple entities

    Swift

         SDK.getClient.selectEntity(entity: entity,
             onSuccess: {
                 // Handle success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidToken: { (error) in
                 // Handle invalid token Error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient selectEntity:entity
             onSuccess:^{
                 // Handle success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func selectEntity(entity entityToSelect: Entity, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    entityToSelect

    Entity to be selected

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onClientError

    Closure called when a client error occurs

  • Selects an entity using an Entity ID. If the entity was not linked to the device before, it will be after this method is called. NB Returns multipleEntitiesNotSupported client exception if the app is not configured to support multiple entities. On successful authentication the user is now associated with this entity. Selecting an invalid entity will result in a BiidInvalidTokenException with a ‘LOGIN’ resolution. If authentication fails, the existing entity remains selected

    Swift

         SDK.getClient.selectEntity(withID: id,
             onSuccess: {
                 // Handle success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidToken: { (error) in
                 // Handle invalid token Error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient selectEntityWithID:id
             onSuccess:^{
                 // Handle success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func selectEntity(withEntityID id: String, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    withEntityID

    Id of Entity to be selected

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onClientError

    Closure called when a client error occurs

  • Returns the User’s currently authenticated Entity

    Swift

         do {
             let entity = try SDK.getClient.getSelectedEntity()
         }
         catch (let exception) {
             // Handle exception
         }
    

    ObjC

         NSError *error;
         Entity *entity = [biidCoreSDK.getClient getSelectedEntity:&error];
    

    Throws

    ClientException

    Declaration

    Swift

    func getSelectedEntity() throws -> Entity
  • Identifies if the SDK is configured to support multiple entities as defined in the manifest

    Swift

         do {
             let isMultiEntity = try SDK.getClient.isMultiEntityConfig()
         }
         catch (let exception) {
             // Handle exception
         }
    

    ObjC

         NSError *error;
         Bool isMultiEntity = [biidCoreSDK.getClient isMultiEntityConfig:&error];
    

    Throws

    ClientException

    Declaration

    Swift

    func isMultiEntityConfig() throws -> Bool
  • Identifies if the SDK is configured to support a single entity as defined in the manifest

    Swift

         do {
             let isSingleEntity = try SDK.getClient.isMultiEntityConfig()
         }
         catch (let exception) {
             // Handle exception
         }
    

    ObjC

         NSError *error;
         Bool isSingleEntity = [biidCoreSDK.getClient isMultiEntityConfig:&error];
    

    Throws

    ClientException

    Declaration

    Swift

    func isSingleEntityConfig() throws -> Bool
  • Return details for the User’s currently authenticated entity

    Swift

         var user = User()
         SDK.getClient.requestEntityDetails(
             onSuccess: { (entityDetails) in
                 if let userFieldDefinitions = entityDetails.userFieldDefinitions {
                     // Populate the user object for each field
                     for field in userFieldDefinitions {
                         if let fieldName = field.name {
                             user[fieldName] = "XXX"
                         }
                     }
                 }
             }, onNoConnection: {
                 // Handle no connection
             }, onInvalidToken: { (error) in
                 // Handle invalid token
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
             }
         )
    

    ObjC

         User *user = [[User alloc] init];
         [biidCoreSDK.getClient requestEntityDetailsOnSuccess:^(EntityDetails * _Nonnull entityDetails) {
                 NSArray<FieldDefinition*> *userFieldDefinitions = entityDetails.userFieldDefinitions;
                 // Populate the user object for each field
                 for (FieldDefinition *field in userFieldDefinitions) {
                     user[field.name] = @"XXX";
                 }
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestEntityDetails(onSuccess: @escaping (_ entityDetails : EntityDetails) -> Void,

    Parameters

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Returns a list of Checkpoints for the current entity

    Swift

         SDK.getClient.requestCheckpoints(max: nil, offset: nil, location: location, sortOrder: .ascending
             onSuccess: { (checkpoints) in
                 // Do something with checkpoints
             }, onNoConnection: {
                 // Handle no connection
             }, onInvalidToken: { (error) in
                 // Handle invalid token
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
             }
         )
    

    ObjC

         [biidCoreSDK.getClient requestCheckpointsWithMax:100
                                           offset:0
                                           location:location
                                           sortOrder:CheckpointsSortOrderAscending
         onSuccess:^(NSArray<Checkpoint *> * _Nonnull checkpoints) {
                 // Do something with checkpoints
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestCheckpoints(max maxResults: Int?, offset resultsOffset: Int?, location somelocation: CLLocation?, sortOrder sortBy: Checkpoints.sortOrder?, onSuccess: @escaping (_ checkpoints: [Checkpoint]) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    max

    Maximum results to return - Optional (defaults to 10)

    offset

    Results offset - Optional (defaults to 0)

    location

    Location as a CLLocation.If specified only checkpoints close to this location are returned and their distance from the location to the checkpoint is computed. - Optional (defaults to showing all checkpoints)

    sortOrder

    Sort ascending or descending - Optional (defaults to ascending)

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Requests a list of Checkpoints (for the current entity) nearest to the specified location

    Swift

         SDK.getClient.requestNearestCheckpoints(max: nil, offset: nil, location: location
             onSuccess: { (checkpoints) in
                 // Do something with checkpoints
             }, onNoConnection: {
                 // Handle no connection
             }, onInvalidToken: { (error) in
                 // Handle invalid token
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
             }
         )
    

    ObjC

         [biidCoreSDK.getClient requestNearestCheckpointsWithMax:100
                                                  offset:0
                                                location:location
         onSuccess:^(NSArray<Checkpoint *> * _Nonnull checkpoints) {
                 // Do something with checkpoints
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestNearestCheckpoints(max maxResults: Int?, offset resultsOffset: Int?, location somelocation: CLLocation, onSuccess: @escaping (_ checkpoints: [Checkpoint]) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    max

    Maximum results to return - Optional (defaults to 10)

    offset

    Results offset - Optional (defaults to 0)

    location

    Location as a CLLocation. The distance from this location to the checkpoint is computed and used to order the list from nearest to furthest

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Requests checkpoint details for a checkpoint with a particular checkpoint ID

    Swift

         SDK.getClient.requestCheckpointDetails(checkpointID: "12345667", location: location,
             onSuccess: { (checkpoint) in
                 // Do something with checkpoint
             }, onNoConnection: {
                 // Handle no connection
             }, onInvalidToken: { (error) in
                 // Handle invalid token
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
             }
         )
    

    ObjC

         [biidCoreSDK.getClient requestCheckpointDetailsWithCheckpointID:12345667
                                                 location:location
         onSuccess:^(CheckpointDetails * _Nonnull checkpointDetails) {
                 // Do something with checkpoint details
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestCheckpointDetails(checkpointID id: String, location someLocation: CLLocation?, onSuccess: @escaping (_ checkpointDetails: CheckpointDetails) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    checkpointID

    CheckpointID

    location

    Location as a CLLocation - Optional (defaults to nil). If set, the distance from this location to the checkpoint is computed

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Requests a list of countries

    Swift

         SDK.getClient.requestCountries(
             onSuccess: { (countries) in
                 // Do something with country list
             }, onNoConnection: {
                 // Handle no connection
             }, onInvalidToken: { (error) in
                 // Handle invalid token
             }, onClientError:  { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient requestCountriesOnSuccess:^(NSArray <Country *>* _Nonnull countries) {
                 // Do something with country list
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestCountries(onSuccess: @escaping (_ countries : [Country]) -> Void,

    Parameters

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onClientError

    Closure called when a client error occurs

  • Request the details of the current user

    NOTE: This call always returns the status of the user even if the user is in a locked state. If the User is locked, a basic user object will be returned (without any registration fields). In a very rare case, where the server is not synced with the local certificate state on the device, and an additional request is sent, a user locked error may be returned. In these circumstances, UserLockedErrors should be caught and handled in the normal way.

    Swift

         SDK.getClient.requestUser(
             onSuccess: { (user) in
                 if user.status == User.Status.unregistered {
                     // Unregistered
                 }
             }, onNoConnection: {
                 // Handle no connection
             }, onInvalidToken: { (error) in
                 // Handle invalid token
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError:  { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient requestUserOnSuccess:^(User * _Nonnull user) {
                 if (user.status == UserStatusUnregistered) {
                     // Unregistered
                 }
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestUser(onSuccess: @escaping (_ user : User) -> Void,

    Parameters

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Register the user for the selected entity

    Swift

         SDK.getClient.registerUser(withUser: user,
             onSuccess: {
                 // Handle Success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token Error
             }, onValidationError: { (error) in
                 // Handle field validation Error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient registerUser:(User * _Nonnull)user
             onSuccess:^{
                // Handle Success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
                }
             onValidationError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
          ];
    

    Declaration

    Swift

    func registerUser(withUser user: User, onSuccess: @escaping (_ user: User) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onValidationError: @escaping ValidationErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    user

    User to register

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onValidationError

    Closure called when a parameters fails validation

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Update the user details for the selected entity

    Swift

         SDK.getClient.updateUser(withUser: user,
             onSuccess: {
                 // User successfully updated
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onValidationError: { (error) in
                 // Handle validation error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient updateUser:(User * _Nonnull)user
             onSuccess:^{
                 // User successfully updated
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onValidationError:^void(NSError * _Nonnull error) {
                 // Handle validation error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func updateUser(withUser user: User, onSuccess: @escaping (_ user: User) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onValidationError: @escaping ValidationErrorCallBack, onUserUpdateForbiddenError: @escaping UserUpdateForbiddenErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    user

    User’s updated details

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onValidationError

    Closure called when a parameters fails validation

    onUserUpdateForbiddenError

    Closure called when the user cannot be updated. Normally returned because the user is already accredited above Level 1

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Update the user’s telephone number for the selected entity

    Swift

         SDK.getClient.updateUserPhoneNumber(withPhoneNumber: telephoneNumber, withDIAC: diac,
             onSuccess: {
                 // Phone number updated successfully
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onValidationError: { (error) in
                 // Handle validation error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient updateUserPhoneNumber:telephoneNumber
                                     withDIAC:diac
             onSuccess:^{
                 // Phone number updated successfully
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onValidationError:^void(NSError * _Nonnull error) {
                 // Handle validation error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func updateUserPhoneNumber(withPhoneNumber phoneNumber: String, withDIAC diac: String, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onValidationError: @escaping ValidationErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    phoneNumber

    updated phone number

    diac

    Digital Identity Access Code the user received by different channel

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onValidationError

    Closure called when a parameters fails validation

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Requests a list of the current user’s devices and their respective status

    Swift

         SDK.getClient.requestUserDevices(
             onSuccess: { (userDevices) in
                 // Do something with returned devices list
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError:  { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient requestUserDevicesOnSuccess:^(NSArray <UserDevice *>* _Nonnull userDevices) {
                 // Do something with returned user devices list
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestUserDevices(onSuccess: @escaping (_ userDevices : [UserDevice]) -> Void,

    Parameters

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Return Transactions for current user

    Swift

         SDK.getClient.requestTransactions(max: 100, offset: nil, status: nil, type: .auth, documentType: nil,
             onSuccess: {
                 // Handle Transactions List
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient requestTransactionsWithMax:100
                                       offset:0
                            transactionStatus:TransactionStatusAll
                              transactionType:TransactionTypeAuth
                                 documentType:DocumentTypeAll
             onSuccess:^(NSArray<Transaction *> * _Nonnull transactions) {
                 // Handle Transactions List
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestTransactions(max maxResults: Int?, offset resultsOffset: Int?, status transStatus: [Transaction.Status]?, type transType: Transaction.TransactionType?, documentType docType: Document.DocumentType?, onSuccess: @escaping (_ transactions: [Transaction]) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    max

    Maximum results to return - Optional (defaults to 10)

    offset

    Results offset - Optional (defaults to 0)

    status

    Only returns transactions with these Statuses - Optional (defaults to all)

    type

    Only returns transactions of this type - Optional (defaults to all)

    documentType

    Only returns transactions with documents of this type - Optional (defaults to all)

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Extends Permissions allows a certified user to see their transactions on a secondary device without having to have certified on that device itself

    Swift

         SDK.getClient.extendPermissions(withDIAC: code,
             onSuccess: {
                 // Handle Extend Permissions Success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onValidationError: { (error) in
                 // Handle validation error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient extendPermissionsWithDIAC:code
             onSuccess:^{
                 // Handle Extend Permissions Success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onValidationError:^void(NSError * _Nonnull error) {
                 // Handle validation error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestExtendPermissions(withDIAC diac: String, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onValidationError: @escaping ValidationErrorCallBack, onDIACLimitError: @escaping DIACLimitErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    diac

    Digital Identity Access Code the user received by a different channel

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onValidationError

    Closure called when a parameters fails validation

    onDIACLimitError

    Closure called when an incorrect DIAC is entered too many times

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Request verification of the current device

    Swift

         SDK.getClient.requestUserDeviceVerification(
             onSuccess: {
                 // Verification Request Success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onVerificationRequestLimitError: { (error) in
                 // Handle device verification limit error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError:  { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient requestUserDeviceVerificationOnSuccess:^ {
                 // Verification Request Success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onVerificationRequestLimitError:^void(NSError * _Nonnull error) {
                 // Handle device verification limit error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestUserDeviceVerification(onSuccess: @escaping () -> Void,

    Parameters

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onVerificationRequestLimitError

    Closure called when device verification limit error occurs

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Verify the current device

    Swift

         SDK.getClient.verifyUserDevice(withVericationCode: code,
             onSuccess: {
                 // Handle Verification Success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onValidationError: { (error) in
                 // Handle validation error
             }, onVerificationCodeExpiredError: { (error) in
                 // Handle expired verification code error
             }, onVerificationCodeAttemptsError: { (error) in
                 // Handle verification code attempts error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient verifyUserDeviceWithVericationCode:code
             onSuccess:^{
                 // Handle Verification Success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onValidationError:^void(NSError * _Nonnull error) {
                 // Handle validation error
             }
             onVerificationCodeExpiredError:^void(NSError * _Nonnull error) {
                 // Handle expired verification code error
             }
             onVerificationCodeAttemptsError:^void(NSError * _Nonnull error) {
                 // Handle verification code attempts error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func verifyUserDevice(withVericationCode code: String, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onValidationError: @escaping ValidationErrorCallBack, onVerificationCodeExpiredError: @escaping VerificationCodeExpiredErrorCallBack, onVerificationCodeAttemptsError: @escaping VerificationCodeAttemptsErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    code

    verification code. NB The verification code is received by a different channel. The verification code format has no spaces or special characters.

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onValidationError

    Closure called when a parameters fails validation

    onVerificationCodeExpiredError

    Closure called when the verification code has expired and the user has to request a verification code again

    onVerificationCodeAttemptsError

    Closure called when the user has been locked after entering a verfication code too many times

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Certifies the user at accreditation Level 1

    Swift

         SDK.getClient.certifyUserAtLevel1(
             onSuccess: {
                 // Handle Certification Success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient SDK.getClient.certifyUserAtLevel1OnSuccess^{
                 // Handle Certification Success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func certifyUserAtLevel1(onSuccess: @escaping () -> Void,

    Parameters

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Certifies the user at accreditation Level 2 or Level 3

    Swift

         SDK.getClient.certifyUser(withDIAC: code,
             onSuccess: {
                 // Handle Certification Success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onValidationError: { [weak self] (error) in
                 // Handle user validation error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient certifyUserWithDIAC:code
             onSuccess:^{
                 // Handle Certification Success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onValidationError:^void(NSError * _Nonnull error) {
                 // Handle user validation error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func certifyUser(withDIAC diac: String, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onValidationError: @escaping ValidationErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    diac

    Digital Identity Access Code that the user received by a different channel

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onValidationError

    Closure called when a parameters fails validation

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Uncertifies the user for the current Entity

    Swift

         SDK.getClient.uncertify(
             onSuccess: {
                 // Handle Success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token Error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

    
         [biidCoreSDK.getClient uncertifyOnSuccess:^ {
                 // Handle Success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func uncertify(onSuccess: @escaping () -> Void,

    Parameters

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Creates an authentication transaction for the currently selected entity

    Swift

        SDK.getClient.createAuthenticationTransaction(withTransactionInfo: authenticationTransactionInfo,
            onSuccess: { (transaction) in
                // Authentication transaction created successfully
            }, onNoConnection: {
                // Handle no connection Error
            }, onInvalidToken: { (error) in
                // Handle invalid token error
            }, onUserLockedError: { (error) in
                // Handle locked user error
            }, onClientError: { (error) in
                // Handle client error
            }
        )
    

    ObjC

        [biidCoreSDK.getClient createAuthenticationTransactionWithTransactionInfo:authenticationTransactionInfo
             onSuccess:^(AuthenticationTransaction * _Nonnull authenticationTransaction) {
                    // Authentication transaction created successfully
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func createAuthenticationTransaction(withTransactionInfo transactionInfo: TransactionInfo, onSuccess: @escaping (_ authenticationTransaction: AuthenticationTransaction) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onValidationError: @escaping ValidationErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    transactionInfo

    Transaction Info

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Requests an authentication transaction for the selected entity

    Swift

         SDK.getClient.requestAuthenticationTransaction(forTransactionID: transactionID,
             onSuccess: { (transaction) in
                 // Do something with the transaction
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient requestAuthenticationTransactionWithID:transactionID
             onSuccess:^(AuthenticationTransaction * _Nonnull transaction) {
                 // Do something with the transaction
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestAuthenticationTransaction(forTransactionID transactionID: String, onSuccess: @escaping (_ authenticationTransaction: AuthenticationTransaction) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    transactionID

    Transaction ID of transaction to return

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Confirms an authentication transaction for the selected entity

    Swift

         SDK.getClient.confirmAuthentication(forTransaction: transaction, withLocation: location,
             onSuccess: {
                 // Handle Authentication confirmation success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onTransactionNotPendingError: { (error) in
                 // Handle Transaction not pending error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient confirmAuthenticationForTransaction:transaction withLocation:location
             onSuccess:^{
                 // Handle Authentication confirmation success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onTransactionNotPendingError:^void(NSError * _Nonnull error) {
                 // Handle Transaction not pending error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func confirmAuthentication(forTransaction transaction: AuthenticationTransaction, withLocation location: CLLocation?, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onTransactionNotPendingError: @escaping TransactionNotPendingErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    transaction

    Authentication Transaction

    location

    User’s location or nil

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onTransactionNotPendingError

    Closure called when the requested transaction is not pending

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Reject an authentication transaction for the selected entity

    Swift3
    
         SDK.getClient.rejectAuthenticationTransaction(forTransactionID: transactionID!, withLocation: location,
             onSuccess: {
                 // Handle transaction rejection success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onTransactionNotPendingError: { (error) in
                 // Handle Transaction not pending error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    
    ObjC
    
         [biidCoreSDK.getClient rejectAuthenticationTransactionWithID:transactionID withLocation:location
             onSuccess:^{
                 // Handle transaction rejection success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onTransactionNotPendingError:^void(NSError * _Nonnull error) {
                 // Handle Transaction not pending error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func rejectAuthenticationTransaction(forTransactionID transactionID: String, withLocation location: CLLocation?, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onTransactionNotPendingError: @escaping TransactionNotPendingErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    transactionID

    Transaction ID

    location

    User’s location or nil

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onTransactionNotPendingError

    Closure called when the requested transaction is not pending

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Requests a documents transaction for the selected entity

    Swift

         SDK.getClient.requestDocumentsTransaction(forTransactionID: transactionID,
             onSuccess: { (transaction) in
                 // Do something with the transaction
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient requestDocumentsTransactionWithID:transactionID
             onSuccess:^(AuthenticationTransaction * _Nonnull transaction) {
                 // Do something with the transaction
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestDocumentsTransaction(forTransactionID transactionID: String, onSuccess: @escaping (_ authenticationTransaction: DocumentsTransaction) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    transactionID

    Transaction ID of transaction to return

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Sign documents in a transaction

    Swift

         SDK.getClient.signDocuments(forTransaction: transaction, withLocation: location,
             onSuccess: {
                 // Handle Document Signing success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onTransactionNotPendingError: { (error) in
                 // Handle Transaction not pending error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient signDocuments:transaction withLocation:location
             onSuccess:^{
                 // Handle Document Signing success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onTransactionNotPendingError:^void(NSError * _Nonnull error) {
                 // Handle Transaction not pending error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func signDocuments(forTransaction transaction: DocumentsTransaction, withLocation location: CLLocation?, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onTransactionNotPendingError: @escaping TransactionNotPendingErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    transaction

    Documents Transaction

    location

    User’s location or nil

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onTransactionNotPendingError

    Closure called when the requested transaction is not pending

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Rejects the documents in a transaction for the selected entity

    Swift

         SDK.getClient.rejectDocuments(forTransactionID: transactionID!, withLocation: location,
             onSuccess: {
                 // Handle transaction rejection success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onTransactionNotPendingError: { (error) in
                 // Handle Transaction not pending error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient rejectDocumentsTransactionWithID:transactionID withLocation:location
             onSuccess:^{
                 // Handle transaction rejection success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onTransactionNotPendingError:^void(NSError * _Nonnull error) {
                 // Handle Transaction not pending error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func rejectDocuments(forTransactionID transactionID: String, withLocation location: CLLocation?, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onTransactionNotPendingError: @escaping TransactionNotPendingErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    transactionID

    Transaction ID

    location

    User’s location or nil

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onTransactionNotPendingError

    Closure called when the requested transaction is not pending

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Requests a Message transaction for the selected entity

    Swift

         SDK.getClient.requestMessageTransaction(forTransactionID: transactionID,
             onSuccess: { (transaction) in
                 // Do something with the transaction
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient requestMessageTransactionWithID:transactionID
             onSuccess:^(MessageTransaction * _Nonnull transaction) {
                 // Do something with the transaction
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestMessageTransaction(forTransactionID transactionID: String, onSuccess: @escaping (_ authenticationTransaction: MessageTransaction) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    transactionID

    Transaction ID of transaction to return

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Dismiss a Message transaction for the selected entity

    Swift

         SDK.getClient.dismissMessage(forTransaction: transaction, withLocation: location,
             onSuccess: {
                 // Handle Dismiss Message Success
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onTransactionNotPendingError: { (error) in
                 // Handle Transaction not pending error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient dismissMessageForTransaction:transaction withLocation:location
             onSuccess:^{
                 // Handle Dismiss Message Success
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onTransactionNotPendingError:^void(NSError * _Nonnull error) {
                 // Handle Transaction not pending error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func dismissMessage(forTransaction transaction: MessageTransaction, withLocation location: CLLocation?, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onTransactionNotPendingError: @escaping TransactionNotPendingErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    transaction

    Message Transaction

    location

    User’s location or nil

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onTransactionNotPendingError

    Closure called when the requested transaction is not pending

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Requests a document

    Swift

         SDK.getClient.requestDocument(forDocumentID: documentID,
             onSuccess: { (document) in
                 // Do something with the document
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient requestDocumentForDocumentID:documentID
             onSuccess:^(Document * _Nonnull document) {
                 // Do something with the document
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestDocument(forDocumentID documentID: String, onSuccess: @escaping (_ document: Document) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    documentID

    Document ID

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Requests the content of a document

    Swift

         SDK.getClient.requestDocumentContent(forDocument: document,
             onSuccess: { (url) in
                 // Do something with the downloaded content
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient requestDocumentContentForDocument:document
             onSuccess:^(NSURL * _Nonnull url) {
                 // Do something with the downloaded content
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestDocumentContent(forDocument document: Document, onSuccess: @escaping (_ fileURL: URL) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    document

    Document for which to return content

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Requests a preview of a document

    Swift

         SDK.getClient.requestDocumentPreview(forDocument: document,
             onSuccess: { (url) in
                 // Do something with the downloaded content
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient requestDocumentPreviewForDocument:document
             onSuccess:^(NSURL * _Nonnull url) {
                 // Do something with the downloaded content
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func requestDocumentPreview(forDocument document: Document, onSuccess: @escaping (_ fileURL: URL) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    document

    Document for which to return content

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onUserLockedError

    Closure called when the user is locked

    onClientError

    Closure called when a client error occurs

  • Download a publicly accessible document (hosted on the biid platform)

    Swift

         SDK.getClient.downloadPublicDocument(named: document,
             onSuccess: { (url) in
                 // Do something with the downloaded document content
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidUserStateError: { (error) in
                 // Handle incorrect user state
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient downloadPublicDocumentNamed:document
             onSuccess:^(NSURL * _Nonnull url) {
                 // Do something with the downloaded document content
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidUserStateError:^void(NSError * _Nonnull error) {
                 // Handle incorrect user state
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func downloadPublicDocument(named document: String, onSuccess: @escaping (_ fileURL: URL) -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidUserStateError: @escaping InvalidUserStateErrorCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    document

    Filename of the publicly accessible document to download

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidUserStateError

    Closure called if the user is in an incorrect state to call this method

    onInvalidToken

    Closure called when an invalid token is used

    onClientError

    Closure called when a client error occurs

  • Forces the display of an Authentication context dialog the next time the private key is accessed. Notes: this works in conjuction with apps where the manifest key NativeBiometricsRequiredForKeyAccess has been set to true (otherwise calling this function has no effect).

    Swift

         SDK.getClient.forceAuthenticationOnNextKeyAccess(withReason:"Authentication required")
    
         SDK.getClient.forceAuthenticationOnNextKeyAccess() // use default reason
    

    ObjC

         [biidCoreSDK.getClient forceAuthenticationOnNextKeyAccessWithReason:"Authentication required"];
    
         [biidCoreSDK.getClient forceAuthenticationOnNextKeyAccessWithReason:@""]; // use default reason
    

    Default Implementation

    Declaration

    Swift

    func forceAuthenticationOnNextKeyAccess(withReason reason: String)

    Parameters

    reason

    The reason to be displayed in the authentication dialog (Only available with iOS 11 and above, otherwise ignored). Defaults to Localised String with key authentication-required

  • Sets the Localized reason to be displayed in the authentication dialog. Only available with iOS 11 and above

    Swift

         SDK.getClient.setAuthenticationReason(to:"Authentication required")
    

    ObjC

         [biidCoreSDK.getClient setAuthenticationReasonTo:@"Authentication Required"];
    

    Declaration

    Swift

    @available(iOS 11.0, *)
    func setAuthenticationReason(to reason: String)

    Parameters

    reason

    Localised reason string to be shown in the presented dialog

  • Registers a device for Push Notifications NB Requires the user to be authenticated and to have a selected entity

    Swift

         SDK.getClient.registerUserDevice(withDeviceToken: deviceToken,
             onSuccess: {
                 // Handle successful registration
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onTransactionNotPendingError: { (error) in
                 // Handle Transaction not pending error
             }, onUserLockedError: { (error) in
                 // Handle locked user error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient registerUserDeviceWithDeviceToken:deviceToken
             onSuccess:^{
                 // Handle successful registration
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onTransactionNotPendingError:^void(NSError * _Nonnull error) {
                 // Handle Transaction not pending error
             }
             onUserLockedError:^void(NSError * _Nonnull error) {
                 // Handle locked user error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func registerUserDevice(withDeviceToken deviceToken: Data, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onUserLockedError: @escaping UserLockedErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    token

    Device Token

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onClientError

    Closure called when a client error occurs

  • Unregisters a device for Push Notifications

    Swift

         SDK.getClient.unregisterUserDevice(
             onSuccess: {
                 // Handle successful "unregistration"
             }, onNoConnection: {
                 // Handle no connection Error
             }, onInvalidToken: { (error) in
                 // Handle invalid token error
             }, onClientError: { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient unregisterUserDeviceOnSuccess:^{
                 // Handle successful "unregistration"
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func unregisterUserDevice(onSuccess: @escaping () -> Void,

    Parameters

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onClientError

    Closure called when a client error occurs

  • Creates and returns a biidNotification object from the userInfo payload of a Push notification

    Swift

         SDK.getClient.onPushNotificationReceived(userInfo, onSuccess: { (biidNotification) in
             // Do something with the returned biid notification object
         }) { (error) in
             // Handle client error
         }
    

    ObjC

         [biidCoreSDK.getClient onPushNotificationReceivedWithUserInfo:userinfo
             onSuccess:^(BiidNotification * _Nonnull biidNotification) {
                 // Do something with the returned biid notification object
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func onPushNotificationReceived(_ userInfo: [AnyHashable : Any], onSuccess: @escaping (BiidNotification) -> Void, onClientError: @escaping ClientErrorCallBack)

    Parameters

    userInfo

    UserInfo Dictionary payload of the Push Notification

    onSuccess

    Closure called if a BiidNotification is successfully created

    onClientError

    Closure called when a client error occurs

  • Returns language code (ISO 639-1) used for localized content (SDK and server side error messages).

    Swift

          do {
             let language = SDK.getClient.getLanguage()
         }
         catch (let exception) {
             // Handle exception
         }
    

    ObjC

         NSError *error;
         NSString *language = [biidCoreSDK.getClient getLanguage:&error];
         if (error) {
             // Handle error
         }
    
     - Throws: ClientException
    

    Declaration

    Swift

    func getLanguage() throws -> String
  • Overrides the device’s default language for localized content (SDK and server side error messages)

    Swift

         SDK.getClient.setLanguage(toLanguage: languageCode,
             onSuccess: {
                 // Handle successful language setting
             }, onNoConnection: {
                 // Handle no connection
             }, onInvalidToken: { (error) in
                 // Handle invalid token
             }, onClientError:  { (error) in
                 // Handle client error
         })
    

    ObjC

         [biidCoreSDK.getClient setLanguageToLanguage:languageCode
             onSuccess:^{
                 // Handle successful language setting
             }
             onNoConnection:^void() {
                 // Handle no connection Error
             }
             onInvalidToken:^void(NSError * _Nonnull error) {
                 // Handle invalid token error
             }
             onClientError:^void(NSError * _Nonnull error) {
                 // Handle client error
             }
         ];
    

    Declaration

    Swift

    func setLanguage(toLanguage language: String?, onSuccess: @escaping () -> Void, onNoConnection: @escaping NoConnectionCallBack, onInvalidToken: @escaping InvalidTokenErrorCallBack, onClientError: @escaping ClientErrorCallBack)

    Parameters

    language

    the language code (ISO 639-1) to use or nil to use the device’s default language

    onSuccess

    Closure called on a successful response

    onNoConnection

    Closure called when a connection issue occurs

    onInvalidToken

    Closure called when an invalid token is used

    onClientError

    Closure called when a client error occurs

  • Returns SDK Version number

    Swift

         let version = SDK.getClient.getVersion()
    

    ObjC

         NSString *version = [biidCoreSDK.getClient getVersion];
    

    Declaration

    Swift

    func getVersion() -> String