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
Related
This question already has answers here:
Toggling Privacy settings will kill the app
(2 answers)
Closed 4 years ago.
I am making an iOS app and I am new in iOS world. In this app, I want to access user contacts. Everything is going good and working well. But I experienced a amazing behavior which I have not seen in Android since I am android developer.
In iOS to access user contacts I am using Contacts Framework. I think it is relatively more easy and fast then anyother else in the iOS. However, I did not able to completely take advantage of that. Let me tell you what I did and what Problem did I faced.
What I have done I cask for permission on ViewController and User is prompt with Dialog asking for contacts permission. If user allow permission, everything goes well, but when user dont allow the permission here comes the trouble.
Accessing User contacts are more necessary since My app's whole working and basic business idea is upon user contacts. Now to handle this, when user Do not allow permission I am showing another dialog telling him that He must allow permission so that App can continue, So far so good.
Now I am taking user to settings where he can allow the permission or he can simply go again back. Now checkout 2 cases
CASE 1: When User come on Settings screen and go back again without
allowing permission
When I take user to Settings screen and instead of allowing permission he gets back to my app I try to show him same dialog again to enable permission in every case. This is going good. I mean for testing purpose I repeat same procedure manytimes, I mean I do not allow my self Contacts permission, It takes me to setting scree, from settings screen I get back to my app and again I am able to see same dialog that took me to settings scree. THIS IS FINE
CASE 2: When User is taken to settings screen and he permits the
permission:
Here when user allows the permission I get message in the log that is "Message from debugger: Terminated due to signal 9". And when I get back to my app, it starts over again. Looks like my app gets re-open or crashed being in background.
Important: For this I examined my memory or task anything that is being performed in background, but there is nothing going on in background. My memory size before crashing is 54.78 mb. And I do not think so it is worth worying.
Any one have idea what is going on??
Your app is not crashing its just forced to restart by iOS with new privacy settings. iOS will SIGKILL the app. (it's default behaviour of iOS). You can checkout - WWDC 2012 Session Videos: Privacy Support in iOS and OS X for more info on this.
This does not hold true for Location permissions.
It is expected behaviour. iOS terminates the app when user changes permission for Contacts, Camera, Microphone and Photos (and possibly some others).
I have two apps built that use your location similar to a run tracking app where I use the location in the background but only when you are actively tracking a run. This works in iOS 11 after only requesting WhenInUse authorization and you get the top blue bar when you leave the app. Both are in the app store but in my most recent submission I keep getting rejected with the following response:
Regarding 5.1.5, the current modal alert available to the user requests permission to access the Foreground Location. However, your app does not request and obtain the user's consent prior to accessing their background location data, which is not allowed on the App Store.
Is this something new and they just haven't noticed before? I also checked Google Maps and Strava and they both use my location when I'm actively using it even when they are in WhenInUse mode.
I would prefer to use only WhenInUse mode as I think it more clearly conveys to the user what the app is doing. We never use your location when the app isn't recording a run.
If you can link to Apple documentation about this situation it would help even more.
I am writing an app that records an audio file from the user. I noticed that when other apps that do something similar are installed, a window is displayed, warning the user that the app wants to access the microphone, and the user has to explicit give permission to the app to do so.
Does Qt have any API that tells iOS about the intention of the app to access certain devices, which would cause that warning window to be displayed?
Thanks!
You don't have to handle it manually. iOS will automatically ask for permission if the user didn't accept it before.
The very first time your app will need microphone, an alert will be displayed. If the user allows it, he will never see the alert again. If he refuses, he will have to turn it ON manually in iOS settings. Nevertheless, there's maybe a way to handle a previous refusing in-app.
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.
I am using core location framework to collect the device location in my iOS app. When i install the app for the first time in device, iOS asks for the user permission with a alert view as below.
Is there any way to disable this default alert view and display a customized message to the user?
I added screen shot where to add purpose message.
Those alerts are system generated and not editable by the developer. If they were editable, then the developer could change the meaning or make it not obvious to the end user what permissions they were asking for.
For user privacy reasons, this prompt/alert is system generated and you can't disable it if your app uses core location.
Having said that, however, you can delay the display of this alert in your app by organizing your code flow such that location services are only called when needed (lazy initialization).
As per apple docs, read notes under method -
+ (BOOL)locationServicesEnabled
Location services prompts users the first time they attempt to use location-related information in an app but does not prompt for subsequent attempts. If the user denies the use of location services and you attempt to start location updates anyway, the location manager reports an error to its delegate.