Skip to main content

Release Notes

V3.0.1

  • Fixed VehicleStats.lightsIsOn displaying an incorrect value
  • Fixed improper state handling when an invalid key is detected, ensuring the internal timer stops immediately after returning the invalidKey error (Error Code 21) to prevent subsequent timeout errors.
  • Added VehicleStats.reverseGearIsActive to get the status of reverse gear
  • Support terminal IDs up to 14 characters

Download 📦

V3.0

Notice: This version has breaking changes.

Before

From the first SDK version until version 2.4.1, the Bluetooth keys were managed by the SDK, communicating with the Cartrack servers:

  • Obtaining the key
  • Key randomisation

After

This new SDK is simpler, and the keys can be managed at Cartrack Fleet API level. Using the API, you can fetch the Bluetooth keys ahead of time and reuse them for multiple bookings. Have a look at the following endpoints:

  • GET /mikey/:registration to get the key for a given vehicle registration
  • GET /mikey, to get the keys for all your vehicles
  • POST /mikey/:registration, to randomise the key for a given vehicle registration

For improved security, you can randomise keys at your convenience. We recommend changing keys only when there is enough time between two users so the vehicle can receive the new key and the user can load it on the phone.

Release details
  • Added BleTerminal.authKey to indicate the terminal authentication key
  • Added BleTerminal.saveAuthKey(authKey:) to save authentication key to keychain
  • Added BleError.actionCode to indicate the action code. The action code only use for CtgError, for other error will return -1
  • Removed BleService.configure(vendorID:apiKey:countryCode:apiUrl:)
  • Removed BleTerminal.getAuthKey()
  • Removed BleTerminal.randomAuthKey()
  • Removed BleTerminalDelegate.bleTerminalDidGetKey(terminal:error:)
  • Removed BleTerminalDelegate.bleTerminalDidRandomAuthKey(terminal:error:)
  • Removed unused error and combine BleConnectionError, BleActionError, and BleKeyError to BleError
  • Updated error code in BleError and CtgError

Download 📦

V2.4.1

  • Support terminal IDs up to 12 characters
  • Fixed a bug affecting rare scenarios where the advertised BLE name is changed
  • Fixed VehicleStats.lightsIsOn display an incorrect value
  • Added VehicleStats.reverseGearIsActive to get the status of reverse gear

Download 📦

V2.4

  • Added upper case method in terminalID, convert the string to upper case by default
  • Added upper case method in countryCode, convert the string to upper case by default
  • Added BleKeyError.saveKeyFailed to return the error for the key when failed to save in keychain
  • Added BleKeyError.responseError(_:_:) to return the error from API
  • Added BleKeyError.serverError(_:_:) to return the error from server
  • Added BleConnectionError.bleKeyError(_:_:) to return the error from Ble key
  • Added CtgError to indicate terminal action failed error types
  • Added BleKeyError and CtgError error response in BleConnectionError
  • Added CtgError error response in BleActionError
  • Added VehicleStats class for vehicle stats
  • Added IndicatorState for indicators in VehicleStats
  • Added a function BleTerminal.getVehicleStats() to get vehicle stats from Ble Terminal
  • Added BleAction.ignitionState to get the current state of vehicle's ignition
  • Added BleTerminal.ignitionState to indicate current vehicle's ignition state
  • Receive BleTerminal.getVehicleStats() response in BleTerminalDelegate.bleTerminalDidGetVehicleStats(terminal:vehicleStats:error:)
  • Updated error code and localized description for BleConnectionError, BleActionError, BleKeyError and CtgError

Download 📦

V2.3

  • Added a function BleAction.unlockNoKeyFob to send an unlock command Unlock_0 that doesn't activate the key fob. The driver won't be able to start the engine.
  • Receive BleAction.unlockNoKeyFob response in BleTerminalDelegate.bleTerminalDidAction(terminal:action:error:)

Download 📦

V2.1.1

  • Bugfix for BleService.configure(vendorID:apiKey:countryCode:apiUrl:)
  • Added BleTerminal.randomAuthKey() to random the terminal authentication key
  • Added BleTerminalDelegate.bleTerminalDidRandomAuthKey(terminal:error:) protocol to receive a response or error from BleTerminal.randomAuthKey()
  • Updated BleTerminal.removeAuthKey() to remove the authentication key from keychain without random authentication key
  • The keychain will only save one authentication key with a static name. If wish to use another terminal id or new authentication key, must remove the current authentication key before fetching the new authentication key.

Download 📦

V2.1

  • Added a new parameter apiUrl in BleService.configure(vendorID:apiKey:countryCode:apiUrl:)
  • Use BleService.configure(vendorID:apiKey:countryCode:) for default API URL
  • Use BleService.configure(vendorID:apiKey:countryCode:apiUrl:) for custom API URL

Download 📦

V2.0

  • Add a new parameter countryCode in BleService.configure(vendorID:apiKey:countryCode:) Please refer to https://iban.com/country-codes for the country code alpha-2 format.

Download 📦

V1.2

  • Fixed intermittent CRC fail during connection

Download 📦

V1.1

  • Added BleTerminal.lockState to indicate vehicle's lock state
  • Added BleAction.lockState action to get the latest vehicle's lock state

Download 📦

V1.0

  • Initial release

Download 📦