Is there a way to trigger the .always coreLocation permission proactively in iOS13?

前端 未结 3 1538
萌比男神i
萌比男神i 2021-02-06 10:36

Under iOS13, when you request the .always permission for coreLocation (to enable background location e.g. for geofences or iBeacons), the app is only granted a \"provisional alw

3条回答
  •  滥情空心
    2021-02-06 11:06

    I am not aware of any direct way to set the permission to Always. From the WWDC videos and experiments, locationManager.requestAlwaysAuthorization() will provide a dialog that does not include the [Always Allow] option. Selecting the [Allow While Using App] puts it in "Provisional Always" mode, but to the user and the app, this is confusing. The user just set it to "Allow While Using App", but the app thinks it's "Always", but it's not yet, the App does not get events, until the second prompt. Very confusing. I was able to get the second prompt, but not right away after the event, it's up to iOS. I too have posted to Apple Feedback, and hope that they will provide some provision for Apps that need Always.

提交回复
热议问题