Release Notes
V3.0.1
- Fixed
VehicleStats.lightsIsOndisplaying 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.reverseGearIsActiveto 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.authKeyto indicate the terminal authentication key - Added
BleTerminal.saveAuthKey(authKey:)to save authentication key to keychain - Added
BleError.actionCodeto indicate the action code. The action code only use forCtgError, 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, andBleKeyErrortoBleError - Updated error code in
BleErrorandCtgError
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.lightsIsOndisplay an incorrect value - Added
VehicleStats.reverseGearIsActiveto 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.saveKeyFailedto 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
CtgErrorto indicate terminal action failed error types - Added
BleKeyErrorandCtgErrorerror response inBleConnectionError - Added
CtgErrorerror response inBleActionError - Added
VehicleStatsclass for vehicle stats - Added
IndicatorStatefor indicators inVehicleStats - Added a function
BleTerminal.getVehicleStats()to get vehicle stats from Ble Terminal - Added
BleAction.ignitionStateto get the current state of vehicle's ignition - Added
BleTerminal.ignitionStateto indicate current vehicle's ignition state - Receive
BleTerminal.getVehicleStats()response inBleTerminalDelegate.bleTerminalDidGetVehicleStats(terminal:vehicleStats:error:) - Updated error code and localized description for
BleConnectionError,BleActionError,BleKeyErrorandCtgError
Download 📦
V2.3
- Added a function
BleAction.unlockNoKeyFobto send an unlock commandUnlock_0that doesn't activate the key fob. The driver won't be able to start the engine. - Receive
BleAction.unlockNoKeyFobresponse inBleTerminalDelegate.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 fromBleTerminal.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
apiUrlinBleService.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
countryCodeinBleService.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.lockStateto indicate vehicle's lock state - Added
BleAction.lockStateaction to get the latest vehicle's lock state
Download 📦
V1.0
- Initial release