sparrowcode / PermissionsKit

Universal API for request permission and get its statuses.
https://x.com/sparrowcode_ios
MIT License
5.64k stars 462 forks source link

Location in background permission #15

Closed rostopira closed 7 years ago

rostopira commented 7 years ago

My app needs geofencing tracking, so it requires another one permission

ivanvorobei commented 7 years ago

Describe the permission that you need, I'll try to add

rostopira commented 7 years ago

I mean permission which appears after requestAlwaysAuthorization()

let locMan = CLLocationManager()
locMan.requestAlwaysAuthorization()
if #available(iOS 9.0, *) {
    locMan.allowsBackgroundLocationUpdates = true
}
ivanvorobei commented 7 years ago

@rostopira if I added it in current location, it is ok? Or create other location permission?

rostopira commented 7 years ago

@IvanVorobei for me it's ok, but I don't think other apps need that =)

ivanvorobei commented 7 years ago

@rostopira please, describe difference between my location permission and it's?

rostopira commented 7 years ago

@IvanVorobei just checked, it requests what I need: screen shot 2017-04-17 at 14 56 37

But I'm not sure, that every app needs it

ivanvorobei commented 7 years ago

@rostopira I added it. Use SPRequestPermissionType.LocationWithBackground if need location with background mode

Thanks for your help!