My app has different screen for allow location. So I don't want to ask location permission alert. Without asking alert Is there any way to allow location?
Apps that do not notify and obtain user consent before collecting, transmitting, or using location data will be rejected
https://developer.apple.com/app-store/review/guidelines/#location
Related
I am working on an app that requires location access. I created a view controller asking the user to allow or not with 2 buttons. But when I click the allow button, device is generating it's own popup asking the user for location access. Can I avoid the popup and just add the functionality of allow in popup into my code for the allow button in my app itself?
No you cannot avoid system popup. As per apple
Always request authorization at the point where you actually plan to
use location services to perform a task. Requesting authorization may
display an alert to the user. If it is not clear to the user that your
app is using location services for a useful purpose, the user may deny
your request to use those services.
Also, It is safe to start location services before the authorization status of your app is determined. Although you can start location services, those services do not deliver any data until the authorization status changes to authorizedAlways or authorizedWhenInUse. To be notified when the authorization status changes, implement the locationManager(_:didChangeAuthorization:) method in your location manager delegate.
Sorce
No, Not possible in Apple device yet.
I get a pop-up saying that so and so app is continuously tracking your location. How do I prevent this from appearing on screen? When the user is using the app for the first time, I have no problem with this message. But I get it later on after some days. How do I prevent it?
You cannot prevent it. It is part of the privacy and location functionality in iOS. It reminds the user that they have granted your app permission to use location in the background and that your app has been doing so. It gives the user an opportunity to change their mind about your apps location permissions
Just a quick question here.
I am displaying the the alert for the user to allow the app to access location data, and I have this triggered from a switch.
When the user turns the switch on, the alert will be displayed.
If the user clicks disallow, is there a time restriction that Apple has before you can show that alert again?
Thanks in advance!
Once the user chooses not to give your app permission to access their location data, the user will not be able to grant your app that permission from within your app. Instead, the user must enter the Settings app and grant the permission from there. This is to prevent the app from bombarding the user with requests to use location data.
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?
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.
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.
I'm requesting know the user location (in an iOS App), but if he Deny it, I'm redirecting to other page, but this preference is stored in some place and the app is not requesting any more his location.
Exist a way to show again the popup requesting know the location again?
No, you only get one chance to ask for the users location.
Once that is done the user has to toggle it in the phone settings under "Location Services".