5.7.0
Added
- Support for on-device geofencing via new
HyperTrack.orders["my_order"].isInsideGeofence
property- To learn more about how to best use this new feature see our guide here: https://developer.hypertrack.com/docs/clock-in-out-tagging#verify-shift-presence-before-starting-work
Example use for worker clock in:
func handlePresence(
_ isInsideResult: Result<Bool, HyperTrackLocationError>
) {
switch isInsideResult {
case .success(let isInside):
if isInside {
// allow worker to clock in for the shift
} else {
// "to clock in you must be at order destination"
}
case .failure(let error):
// resolve any tracking errors to obtain geofence presence
}
// check if a worker is inside an order's geofence
handlePresence(HyperTrack.orders["my_order"].isInsideGeofence)
// or, listen to order.isInsideGeofence changes
HyperTrack.subscribeToOrders { orders in
handlePresence(orders["my_order"].isInsideGeofence)
}
- Added partial support for Motion Activity
- Our SDK doesn’t ask for motion permission
- For SDK 5.7.0 and above,
NSMotionUsageDescription
in yourInfo.plist
is required (even if permission is not asked).
Changed
- Changed the
OrderStatus
enum to a struct to support future cases without introducing API breaking changes