Skip to content

2.15.3.0 and Later

Locking/Unlocking api changes

New variants of the TriggerLock command have been introduced that allow more finegrained control over the locking/unlocking process. Instead of CommandExecutionFacade.triggerLockAsync(...), the new method CommandExecutionFacade.executeStandardCommandAsync(...) should be used together with the TKMDefaultTriggerLockCommandBuilder class.

CommandExecutionFacade.triggerLockAsync should not be used anymore and might be removed in future.

Migration

Search for triggerLockAsync and replace it with executeStandardCommandAsync. For the command parameter should be build with the TKMDefaultTriggerLockCommandBuilder.

    self.bleLockCommunicator.executeCommandAsync(
        bluetoothAddress: bluetoothAddress,
        physicalLockId: physicalLockId,
        commandFunc: { tlcpConnection in

            // MIGRATION START
            // Replace:
            //
            //return self.commandExecutionFacade.triggerLockAsync(
            //    tlcpConnection,
            //    cancellationToken: ct
            //)
            //
            // with:

            let triggerLockCommand = TKMDefaultTriggerLockCommandBuilder()
                                        .build()

            return self.commandExecutionFacade.executeStandardCommandAsync(
                tlcpConnection,
                command: triggerLockCommand,
                cancellationToken: ct
            )
            // MIGRATION END

        },
        cancellationToken: ct)

Removed concept of incompleteLockId

Because of limited space in Bluetooth LE advertising frames, the lock id advertised by locking devices could have been incomplete. The TKBleLock class therefore had a boolean flag isLockIdComplete, which specified, whether the lock id provided in the incompleteLockId was complete or not.

Starting with this version of the Tapkey Mobile SDK, TKBleLock will always return complete lock IDs, therefore making matching of IDs much easier. The field isLockIdComplete was removed and the TKBleLock.incompleteLockId was renamed to TKBleLock.lockId.