spotny-sdk 0.3.3 → 0.3.4
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.
|
@@ -88,8 +88,14 @@ public class SpotnyBeaconScanner: NSObject {
|
|
|
88
88
|
|
|
89
89
|
locationManager = CLLocationManager()
|
|
90
90
|
locationManager.delegate = self
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
// allowsBackgroundLocationUpdates = true requires the app to declare the
|
|
92
|
+
// "location" UIBackgroundModes entry. Setting it without that entitlement
|
|
93
|
+
// raises NSInternalInconsistencyException and terminates the app.
|
|
94
|
+
if let modes = Bundle.main.object(forInfoDictionaryKey: "UIBackgroundModes") as? [String],
|
|
95
|
+
modes.contains("location") {
|
|
96
|
+
locationManager.allowsBackgroundLocationUpdates = true
|
|
97
|
+
locationManager.pausesLocationUpdatesAutomatically = false
|
|
98
|
+
}
|
|
93
99
|
|
|
94
100
|
beaconManager = KTKBeaconManager(delegate: self)
|
|
95
101
|
}
|