expo-beacon 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -309,11 +309,17 @@ public class ExpoBeaconModule: Module {
309
309
  self.defaults.removeObject(forKey: EXIT_DISTANCE_KEY)
310
310
  }
311
311
  self.defaults.set(true, forKey: IS_MONITORING_KEY)
312
- self.requestLocationPermission(requireAlways: true) { granted in
312
+ self.requestLocationPermission { granted in
313
313
  guard granted else {
314
- promise.reject("PERMISSION_DENIED", "Always location permission required for background monitoring")
314
+ promise.reject("PERMISSION_DENIED", "Location permission required for monitoring")
315
315
  return
316
316
  }
317
+ // Request Always authorization non-blockingly for background support.
318
+ // On iOS 13+ requestAlwaysAuthorization() from WhenInUse may be a
319
+ // no-op if the user already made their choice — don't block on it.
320
+ if self.locationManager.authorizationStatus != .authorizedAlways {
321
+ self.locationManager.requestAlwaysAuthorization()
322
+ }
317
323
  self.requestNotificationPermission()
318
324
  self.startRegionMonitoring()
319
325
  promise.resolve(nil)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-beacon",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Expo module for scanning, pairing, and monitoring iBeacons on Android and iOS",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",