I am developing one iMessage Extension in which I need to use photos from Photo Library, but here it generated one use case for which I am not getting any solution.
When OS ask for Photo permission access to user, then user set Don't allow, after that how to set permission on for iMessage Extension.
But I am not able to find settings menu for iMessage Extension app from which user set photo permission on.
NOTE: I am developing iMessage Extension without parent iOS App.
You can enable this permission later from privacy setting. Please check below path to enable that permission
Settings -> Privacy -> Photos -> < Your app >
Related
I've developed a Safari Extension for iOS and in order to use that extension, it needs to enable the permission from Safari Settings in the Settings screen. I need to know whether there is a nice way to allow the user to allow permission. Is there any way that I can enable the permissions directly from my Safari Extension iOS app so that the user doesn't get confused and end up not allowing the permission. Or if I can navigate the user to the permission screen in Settings directly? Anyone who can help me here?
The user can also give permission to the extension from Safari, without having to navigate to the settings. Like that: https://www.joinhoney.com/en/mobile/ext/enable/ (Must open on iOS safari)
In my iOS app I am accessing the user's photo gallery. The first time the user does this, it asks them for permission. Some of my users have reported getting a crash this first time due to the permission request, but it works fine on subsequent tries.
To be able to test this on my own, I need to be able remove the permission from my iPad and have it prompt again. Is there a way to do this either through the iPad/iPhone itself or through code?
Run the Settings app. Go to General, then Reset. Tap on Reset Location & Privacy. This will reset all of your location and privacy settings, not just for your test app. But you are doing this on a development device so that should be OK. This works in the Simulator too.
In iOS 7+, you can go into Settings > Privacy > Photos and explicitly enable or disable access for individual apps.
This is much better than resetting your entire device privacy settings!
Another way is to temporary change Bundle Identifier (CFBundleIdentifier) in Info.plist.
System will treat such app as a new separate app and will display "would like to access your Photos" alert.
Don't forget to revert CFBundleIdentifier after you end testing.
In ios 11 new photo access permission called "Add photos only" introduced, to achieve this option we need to add "Privacy - Photo Library Additions Usage Description" in plist.
but in iPhone 6s even after added this option in plist , i am not able to see the permission option("Add photos only") under photos privacy settings
(i am using iPhone6s with 12.4.1)
To enable "Add only photos" permission option in photos-privacy settings.
step1 to add Privacy - Photo Library Additions Usage Description in info.plist
step2 The first time when you try to save any image from your app to Photogallery using UIImageWriteTOSavetoPhotoAlbum, then the os will prompt the AddPhotos only permission.
now you can see the Add only Photos permission option in Photos Privacy Settings.
This option will allow the user to save photos/videos even when there is no read/write permission(to attach photos).
How can I have my app in the list of apps so that users can share photos to my app. I have tried setting public.png Document Types in Info.plist but it doesn't show up in the list.
Please check the apps encircled in the attached photo, I want my app in that list .
You can use iOS share extension
https://www.appcoda.com/ios8-share-extension-swift/
I am not using UIImagePicker in my app and not accessing the Photo Library. I got a mail regarding add NSPhotoLibraryUsageDescription in info.plist file.
I have following questions
How to confirm my project accessing the photo library?
I already searched UIImagePicker in my project and did't get any result.
Is it mandatory to add NSPhotoLibraryUsageDescription in info.plist while i am not accessing the photo library?
Can any one help to find it out .
Thanks
UIImagePicker
An image picker controller manages user interactions and delivers the results of those interactions to a delegate object. The role and appearance of an image picker controller depend on the source type you assign to it before you present it.
whenever you used UIImagePicker, you have to give permission for that particular application
There is a list of all Cocoa Keys that you can specify in your Info.plist file:
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html
(Xcode target -> Info -> Custom iOS Target Properties)
iOS already required permissions to access microphone, camera, and media library earlier (iOS6, iOS7), but since iOS10 the apps will crash if you don't provide the description why you are asking for the permission.
UPDATE:
Summary of all privacy keys (with example description):
Useful Link
You only have to add this key-value pair to your info.plist if you are actually accessing the photos any way. If it's not added the app is going to crash.
Check if any of your added dependencies using UIImagePicker.
No it's not mandatory to add NSPhotoLibraryUsageDescription key in info.plist. If your App is not using accessing photo from library/gallery then you should remove it. But as "#Bence Pattogato" said if Your app accessing photo from library/gallery and there is no key added in info.plist then it will be crash.
For your information below are different keys that required to add info.plist if you accessing relevant features according to camera/photo library.
1) NSPhotoLibraryUsageDescription : This key lets you describe the reason your app accesses the user’s photo library. When the system prompts the user to allow access, this string is displayed as part of the alert.
2) NSCameraUsageDescription : describes the reason that the app (including an iMessage app) accesses the device’s camera. When the system prompts the user to allow access, this string is displayed as part of the alert.
3) NSPhotoLibraryAddUsageDescription : (New in iOS 11) This key lets you describe the reason your app seeks write-only access to the user’s photo library. When the system prompts the user to allow access, this string is displayed as part of the alert.
Above information get from this Appel official link.