Closed mgt-la closed 7 years ago
@mgt-la It's not posssible. If later you need use . locationAlways, you should request it. Apple allows to request location permissions only once
It works on PermissionScope which is another Pod like yours and apple has approved it. I just preferred this UX out of the box 🙂
Just tested, this works, if you press btn1, accept, then press btn2 and accept.
import UIKit
import Sparrow
import CoreLocation
class ViewController: UIViewController, CLLocationManagerDelegate {
let manager = CLLocationManager()
@IBAction func btn1(_ sender: Any) {
//SPRequestPermission.dialog.interactive.present(on: self, with: [.locationWhenInUse])
manager.requestWhenInUseAuthorization()
}
@IBAction func btn2(_ sender: Any) {
//SPRequestPermission.dialog.interactive.present(on: self, with: [.notification,.locationAlways])
manager.requestAlwaysAuthorization()
}
}
@mgt-la I find how do it, in one hour I will update pod
🙏🤞😬 😃🏆
@mgt-la please, say me, need change permission from .always to .whenInUse?
@mgt-la I am updated pod, you can use it now. Thanks for your help!
@IvanVorobei sorry for the late reply- no, will never need to de-escalate back down to .whenInUse once .always is allowed.
Thank you!! You're awesome! This is a great pod and the other parts of Sparrow are a nice addition!
If a user upon first launch authorizes .locationWhenInUse, and then later, when taking a certain action, needs to authorize .locationAlways, it shows as denied and that they need to change the settings from iPhone App settings. In fact, it is possible to upgrade from here, in-app, without going to the iPhone App Settings. (: