IOS – lock the app until user give me a permission (like location permission)

developmentiospermissionswift

I am developing an app and I am highly in need of location services and without that my app is not working. Can I block users from using my app (showing a page to them) until they go to settings and give me needed permission?

Best Answer

Technically it is no problem to "block" the user by for example showing a page with instructions to give permissions for location services to proceed.

Legally, it is not so simple. You should read through Apple's App Store Review Guidelines for detailed instructions.

Especially they point out that the developer must not arbitrarily block the user from using the app, if they haven't given permissions for locations for example. If at all possible, the app should allow the user to use the app without giving the permission - for example by entering an address or position manually. However, if the entire purpose of the app is defeated by not having access to location services, then it is okay to tell the user that the app is not usable until permission is given.

Note however that it is not permitted to restrict access to the app based on the actual location. I.e. you cannot make an app that works in Washington, but automatically shuts down when in Houston.