Scorb
Scorb

Reputation: 1870

Can I have my iOS app refuse to install until you accept a permission?

I am developing an iOS app using flutter. When I ask for notification permission, it happens when the app is first opened, and my app must check if the permission is granted, and then show an appropriate UI (eg "You can not use this app without notification permissions).

Is there a way the App Store can prompt a user to accept a mandatory permission for an app?

Upvotes: 0

Views: 243

Answers (2)

efess
efess

Reputation: 81

There is no way in AppStore to prompt a user to accept a mandatory permission for an app, all permissions are user-friendly - users can be free with granting permission for apps, as well as use apps without granting any access at all. But you can restrict the number of features in your app for users without granted permissions.. aaand you should be very resourceful to avoid app rejection on app's review stage: app shouldn't look dead wo granted permission )))

Upvotes: 0

Paulw11
Paulw11

Reputation: 114875

You cannot execute any code or impose any conditions before your app is installed (aside from the specific hardware/capability requirements you can provide in your info.plist).

Regardless, the concept of a "mandatory permission" is a non-sequitur. The very reason you need to ask permission is that the user can refuse. Also remember that the user can revoke a granted permission at any time.

You could check to see if the notification permission hasn't been granted or has been revoked and limit application functions, but if your app flat-out refuses to run unless the user grants notification permissions I would think it highly likely that it will be rejected by Apple.

Upvotes: 2

Related Questions