Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. # Core Location
  2.  
  3. * When an app needs always authorization, they will not receive this authorization immediately
  4. * Apps that request always authorization receive provisional access, meaning that the user allows when in use access but the app thinks it has always access.
  5. * An app can then begin doing what they must do in the background and when the time is right, iOS will prompt the user for always access and the app will then receive the "real" status (when in use / always).
  6. * This prompt does not appear immediately and the background event that triggered the location prompt is stored for a limited time.
  7. * If a user allows access, your app receives the location. This will not be realtime due to the prompt not being shown immediately. Events that are too old are dropped. Plan for this.
  8. * If you request when in use location, you don't receive the provisional always authorization.
  9. * in iOS 13 you can now _always_ use all the different location apis, like for instance region monitoring, visit tracking etc. This means that you can now implement geofencing with when in use authorization. When the app is not in use, your app simply won't receive any events. If you have requested always permission the allow always prompt might be shown and you will receive updates while in the background.
  10. * An app is considered in use when it's either in the foreground or you started location updates in the foreground with `allowsBackgroundUpdates`set to true on the location manager and then goes to the background.
  11.  
  12. > Will Core Location yield events?
  13. > | Always | WhenInUse
  14. > In use | x | x
  15. > Not in use| x |
  16.  
  17. * When a user chooses to give your app one time access to your location, you will receive the when in use access status. This status will exist as long as your app is in use. Once it goes to the background and becomes inactive the access status is reset and you have to ask for permission again.
  18. * If a user moves an app to background very briefly, your app continues to be in use. The duration of this window is short and not specified.
  19. * It's discouraged to ask for location again immediately when your app becomes active, you should instead ask at an appropriate time just like you did for the first time.
  20. * You can have background location access with temporary access just like you can with normal when in use access if you start updates in the foreground and set `allowsBackgroundUpdates` to true.
  21. * Beacon regions are now created with a `CLBeaconIdentityConstraint` that contains the UUID, major and minor. You can omit major and/or minor to have wildcards for those values and observe multiple beacons as if it's a single beacon.
  22. * Monitoring for beacons is very similar to monitoring geofences; they are both part of the region monitoring api.
  23. * When a user is near a beacon and you want to monitor proximity to the beacon, you can ask your location manager to start ranging the beacon(s) that satisfy your beacon constraint.
  24. * When you are near when or more beacons you will receive a list of beacons, ordered by proximity so the first beacon is closer.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement