Option to share "Precise" location
- setting on top of "when you have access
2x dimensions:
|
accuracy | |_________ when
//Replaced
`class func authorizationStatus() -> CLLauthorizationStatus`
// with
let authorizationStatus: CLAuthorizationStatus { get }
// new
let accuracyAuthorization: CLAccuracyAuthorization { get }
CLAccuracyAuthorization {
case full
case reduced
}
CLLocationManagerDelegate changes:
// deprecated
optional func locationManager(_ manager: CLLocationManager, didChangeAuthorizationStatus: CLAuthorizationStatus)
// for
optional func locationManagerDidChangeAuthorization(_ manager: CLLocationManager)
Reduced Accuracy Location Delivered
- standard delegate method
- 4x per hour
- treat it as "containing" the users true location
Referece Designing for Location Privacy
Consider indicating that precise location is off (maps banner as an example)
Asking for Full Accuracy
- send to settings (probably bad)
- temporarily grant (new CLLocationManager API)
Behavior is similiar to "Allow Once" from iOS permissions
Example:
locationManager.requestTemporaryFullAccuracyAuthorization(withPurposeKey: "someKey") { granted in
}
- Key must be in
NSLocationTemporaryUsageDescriptionDictionary
in info.plist - Can support many keys for specific uses
Region monitoring is disabled under reduced accuracy
On CLLocationManager:
locationManager.desiredAccuracy = kCLLocationAccuracyReduced
Via info.plist:
<key>NSLocationDefaultAccuracyReduced</key><true/>
- NOT just adding random noise
- Snaps to a region describing "where I am" (think city-level)
- Region can be up to 10km
Added ability to skip provisional "always" state
How:
- First request only
.authorizedWhenInUse
- Then request only
authorizedAlways
when needed
CLActivityType | Use Case |
---|---|
airborne | flying or taxiing on runway |
fitness | workout sessions (not normal nav) |
automotiveNavigation | stays on roads (cars and road cycling) |
otherNavigation | transport that may not stay on roads |
other | none of the above |
- App Clips can't get "Always"
- "When using" is only granted until next morning
NSWidgetWantsLocation
in info.plist- can't show prompts
- Inherits auth status from parent app