Ricardo
Ricardo

Reputation: 8291

ios - Ask for multiple permissions

My application ask for location and notification permissions. When user launch the app for first time the location request displays and after notification request displays.

Is there any way to request this better? Maybe an a list like in Android or anything better than I have right now?

Upvotes: 3

Views: 2838

Answers (2)

Shawon91
Shawon91

Reputation: 208

When your app uses push notification, it will be the first to prompt to user for notification access. Notification Access Pop-Up will prompt at the very beginning of App Launch.

You can ask for location access permission on demand using - CLLocationManager requestWhenInUseAuthorization or AlwaysInUseAuthorization.

If you need to access Camera, Photo Library Access just add privacy usage on your info.plist and iOS will ask for permission accordingly on demand.

Upvotes: 0

Sudeep
Sudeep

Reputation: 806

You should generally only ask for permissions or check for authorisation when it is required by the app, and not when the user launches the app for the first time. For example, notification permissions could be requested at launch, but location permissions should be requested only when the data is required in your app.

As far as I know, there is no Android-like way to request for permissions.

Edit: You may want to check out third party libraries like ISHPermissionKit and JLPermissions, which provide a more unified approach to asking for user permissions, which is what you might be looking for. But ultimately, I still believe that asking for permission only when it is required is still the way to go.

Upvotes: 6

Related Questions