Skip to content

Commit 965a4a4

Browse files
authored
require permission to track location on iOS (#196)
1 parent ee236f3 commit 965a4a4

File tree

1 file changed

+2
-1
lines changed
  • compass-geolocation-mobile/src/iosMain/kotlin/dev/jordond/compass/geolocation/mobile

1 file changed

+2
-1
lines changed

compass-geolocation-mobile/src/iosMain/kotlin/dev/jordond/compass/geolocation/mobile/MobileLocator.ios.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ internal class IosLocator(
6767
}
6868

6969
override suspend fun track(request: LocationRequest): Flow<Location> {
70+
requirePermission()
7071
if (locationDelegate.isTracking) return locationUpdates
7172

7273
suspendCoroutine { continuation ->
@@ -92,4 +93,4 @@ internal class IosLocator(
9293
state.throwOnError()
9394
}
9495
}
95-
}
96+
}

0 commit comments

Comments
 (0)