简体   繁体   中英

How to specify my app absolutely needs location services enabled?

There's this UIRequiredDeviceCapabilities key with the item "location-services".

The documentation is a bit vague on this:

Include this key if your app requires (or specifically prohibits) the ability to retrieve the device's current location using the Core Location framework. (This key refers to the general location services feature. If you specifically need GPS-level accuracy, you should also include the gps key.)

The purpose of this "required capabilities" key is to define what is absolutely required. But the documentation says "(or specifically prohibits)" which confuses me. Now either this key says that there must be location services, or it says that location services are prohibited? Does that make sense?

If I specify this and someone has parental controls or other out-of-self-control restrictions for location services, does that mean that they will not be able to buy the app from the App Store in the first place?

If the value of UIRequiredDeviceCapabilities is an array then it specifies required capabilities but if the value is a dictionary then the keys are the capabilities and the values are true/false for whether they are required or prohibited.

This is mentioned in the docs, but you likely overlooked it as it's hidden a bit.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM