"Access the Camera" Message Popup Once Users Launch the App - ios

My iOS app has a function that would access the camera, so every time users access that function, the app would popup a message (see attached image), I think this is nice.
But recently I found that this prompt would popup once users launch the app, I don't like this, how can I change it back? Thanks!

Check if are you creating object of AVCaptureDeviceInput?
As per Apple doc "The first time you create any AVCaptureDeviceInput objects for a media type that requires permission, the system automatically displays an alert to request recording permission."
If thats the case just create only when you are going to use.

Related

IOS Camera/Microphone constant usage message

I am having trouble understanding the description from apple to access/use the camera in Ios devices.
They wrote
iOS requires that your app provide static messages to display to the
user when the system asks for camera or microphone permission: If your
app uses device camera [...]
(Source)
So do I always need to display a symbol when using the camera? Like a recording flashing?
Or does the "static message" refers the first request for accessing the camera?
Any help appreciated.
The documentation you are referencing is referring to the key/values that you add to your Info.plist that get shown to users when requesting permission to access the calendar or microphone. This presentation is done automatically by the system when you ask for permission to access those devices (via requestAccess for example -- https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624584-requestaccess). The alert gets displayed when the app asks the user for permission and then does not get shown again.
You don't need to "display a symbol when using the camera" in any version of iOS. However, in iOS 14, you will see indicator dots in the status bar (https://support.apple.com/en-us/HT211876) that the system adds when these resources are being used.

iOS Permission - Ideal Microphone Permission Dialog Text

I have a chat app, and that has an upload function in which the user can upload photos and videos from the gallery or capture one. On iOS, to record video, one needs microphone permission separately (why? - isn't it obvious?). Now whenever I'm trying to submit to App Store, my binary is being rejected because they say:
We noticed that your app requests the user’s consent to access their microphone but does not clarify the use of the microphone in the permission modal alert.
My current permission modal alert text (after several changes) is
Enable microphone access so that you can be heard in the video
And even this latest one was rejected. Is there a better text that I can provide which may be perceived as clearer and my app may pass the review?
Try an easy statement like :
"This app requires the access to Microphone to record your voice memo."
I have this statement in one of my app and it was accepted.
You can use either of these:
1. "We need access to your microphone for adding sounds and uploading them".
2. "We need access to your microphone so that you can add sounds and upload them after choosing".
3. " 'Your ProductName/AppName' uses your microphone to capture audio which is shared with other participants".
4. "We need access to your microphone so that you can record/hear voice messages".
Just simply define the reason why your app is using microphone, i think Fourth one might help you.

permission to record audio on iOS

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.

Why user will be asked for access photo permission when first launch app?

When the app is first run it asks for permission to access the photos!
What's the reason for that?
One way is run the code one line by one line or Another way is revert code to previous version.
And find from which version, the app become to ask permission at first launch.
Previously, when we enter select photo screen, we would write code to ask the permission.
I also try to add symbolic breakpoints like:
-[UIAlertView initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles:]
And even find a class dump UIAlertView header in order to add symbolic breakpoint but not work. Add UIAlertController breakpoint also does not work.
The simulator OS is 8.3. And each time I must reset contents and setting to reproduce the issue.
Any hint or good idea will be appreciated!
Finally, I find out the following code cause the iOS system to pop up the "Allow our App to access their photo gallery" dialog. Thanks for Vijay's answer.
[[PHPhotoLibrary sharedPhotoLibrary] registerChangeObserver:self];
Starting with iOS 6, Apple now requires apps to get explicit user permission before accessing Contacts, Calendars, Reminders, and Photos. From the "Data Privacy" section in Apple's iOS 6 Release Notes:
In addition to location data, the system now asks the user’s permission before allowing third-party apps to access certain user data, including:
Contacts
Calendars
Reminders
Photo Library
For contact, calendar, and reminder data, your app needs to be prepared to be denied access to these items and to adjust its behavior accordingly. If the user has not yet been prompted to allow access, the returned structure is valid but contains no records. If the user has denied access, the app receives a NULL value or no data. If the user grants permission to the app, the system subsequently notifies the app that it needs to reload or revert the data.

iOS: Control access to camera roll new appear

in my app I use ALAssetsLibrary to load access at photos in camera roll;
The first time I start my app I see the classic message, if I want give the permission to access at the photo library or not.
But I want to test this situation in each case (allow and not allowed) but I'm not able show again this message; I tried to delete app, change number version, change bundle identifier, but nothing!
Every time I run my app it not show me this message and I have ever the permission to access in the library image; I want to test what happen if I select NO.
(I know that I can change this option in general settings, but in this case I control all in viewdidappear)
I want to know what happen If I select no with that message, then is it possible show again that alert?
thanks
Ok I think I got your question. In your simulator just goto Settings-->Privacy-->Photos-->You app.
Just off that switch each time and you will get prompted with that message..!
Once a user has allowed or disallowed you app access the message will never be shown again and iOS save this permission not to bother the user again.
For the iOS simulator you can rest the settings to get the message again.

Resources