Skip to content

Commit

Permalink
Update HyperTrack SDK iOS to 5.5.2 and Android to 7.5.3 (#30)
Browse files Browse the repository at this point in the history
Fix order handle serialization.
  • Loading branch information
pavel-kuznetsov-hypertrack authored Apr 23, 2024
1 parent 05ae2ce commit 9044d99
Show file tree
Hide file tree
Showing 25 changed files with 198 additions and 144 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.2.1] - 2024-04-23

### Changed

- Updated HyperTrack SDK iOS to [5.5.2](https://github.com/hypertrack/sdk-ios/releases/tag/5.5.2)
- Updated HyperTrack SDK Android to [7.5.3](https://github.com/hypertrack/sdk-android/releases/tag/7.5.3)

## [3.2.0] - 2024-04-19

### Added

- New `addGeotag` method that have `orderHandle` and `orderStatus` parameters. You can use this API when users need to clock in/out of work in your app to honor their work time (see [Clock in/out Tagging](https://hypertrack.com/docs/clock-inout-tracking#add-clock-inout-events-to-a-shift-timeline) guide for more info)

### Fixed

- Added `kotlinOptions.jvmTarget` to fix the build error when updating to Gradle 8 and setting `compileOptions.targetCompatibility` to `17`
Expand Down Expand Up @@ -172,3 +183,4 @@ We are excited to announce the release of HyperTrack Ionic Capacitor SDK 2.0.0,
[3.1.2]: https://github.com/hypertrack/sdk-ionic-capacitor/releases/tag/3.1.2
[3.1.3]: https://github.com/hypertrack/sdk-ionic-capacitor/releases/tag/3.1.3
[3.2.0]: https://github.com/hypertrack/sdk-ionic-capacitor/releases/tag/3.2.0
[3.2.1]: https://github.com/hypertrack/sdk-ionic-capacitor/releases/tag/3.2.1
2 changes: 1 addition & 1 deletion HypertrackSdkIonicCapacitor.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '12.0'
s.dependency 'Capacitor'
s.swift_version = '5.1'
s.dependency 'HyperTrack','5.5.1'
s.dependency 'HyperTrack','5.5.2'
end
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

[![GitHub](https://img.shields.io/github/license/hypertrack/sdk-ionic-capacitor.svg?color=orange)](./LICENSE)
[![npm](https://img.shields.io/npm/v/hypertrack-sdk-ionic-capacitor.svg)](https://www.npmjs.com/package/hypertrack-sdk-ionic-capacitor)
[![iOS SDK](https://img.shields.io/badge/iOS%20SDK-5.5.1-brightgreen.svg)](https://github.com/hypertrack/sdk-ios)
[![Android SDK](https://img.shields.io/badge/Android%20SDK-7.5.2-brightgreen.svg)](https://github.com/hypertrack/sdk-android)
[![iOS SDK](https://img.shields.io/badge/iOS%20SDK-5.5.2-brightgreen.svg)](https://github.com/hypertrack/sdk-ios)
[![Android SDK](https://img.shields.io/badge/Android%20SDK-7.5.3-brightgreen.svg)](https://github.com/hypertrack/sdk-android)

[HyperTrack](https://www.hypertrack.com) lets you add live location tracking to your mobile app. Live location is made available along with ongoing activity, tracking controls and tracking outage with reasons.

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {

buildscript {
ext.kotlin_version = "1.7.21"
ext.hypertrack_sdk_version = "7.5.2"
ext.hypertrack_sdk_version = "7.5.3"
ext.firebase_messaging_version = "23.1.1"

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ typealias Serialized = Map<String, Any?>
* It receives serialized params.
*/
internal object HyperTrackSdkWrapper {

fun addGeotag(args: Serialized): WrapperResult<Serialized> {
return deserializeGeotagData(args)
.flatMapSuccess { geotag ->
// TODO: return proper error if JSON is wrong
val geotagMetadata = Json.fromMap(geotag.data)!!
val expectedLocation = geotag
.expectedLocation
?.let {
HyperTrack.Location(
latitude = it.latitude,
longitude = it.longitude
)
}
val expectedLocation =
geotag
.expectedLocation
?.let {
HyperTrack.Location(
latitude = it.latitude,
longitude = it.longitude,
)
}
val orderHandle = geotag.orderHandle
val orderStatus = geotag.orderStatus
if (expectedLocation != null) {
Expand All @@ -53,7 +53,7 @@ internal object HyperTrackSdkWrapper {
orderHandle = orderHandle,
orderStatus = orderStatus,
expectedLocation = expectedLocation,
metadata = geotagMetadata
metadata = geotagMetadata,
)
} else {
HyperTrack.addGeotag(geotagMetadata, expectedLocation)
Expand All @@ -77,7 +77,7 @@ internal object HyperTrackSdkWrapper {
HyperTrack.addGeotag(
orderHandle = orderHandle,
orderStatus = orderStatus,
metadata = geotagMetadata
metadata = geotagMetadata,
)
} else {
HyperTrack.addGeotag(geotagMetadata)
Expand All @@ -103,13 +103,13 @@ internal object HyperTrackSdkWrapper {

fun getIsAvailable(): WrapperResult<Serialized> {
return Success(
serializeIsAvailable(HyperTrack.isAvailable)
serializeIsAvailable(HyperTrack.isAvailable),
)
}

fun getIsTracking(): WrapperResult<Serialized> {
return Success(
serializeIsTracking(HyperTrack.isTracking)
serializeIsTracking(HyperTrack.isTracking),
)
}

Expand All @@ -127,13 +127,13 @@ internal object HyperTrackSdkWrapper {

fun getMetadata(): WrapperResult<Serialized> {
return Success(
serializeMetadata(HyperTrack.metadata.toMap())
serializeMetadata(HyperTrack.metadata.toMap()),
)
}

fun getName(): WrapperResult<Serialized> {
return Success(
serializeName(HyperTrack.name)
serializeName(HyperTrack.name),
)
}

Expand Down Expand Up @@ -174,5 +174,4 @@ internal object HyperTrackSdkWrapper {
HyperTrack.name = name
}
}

}
Loading

0 comments on commit 9044d99

Please sign in to comment.