I am facing problem in loading photos on simulator but it is working on devices. Even it is working on other mac. I have added the NSPhotoLibraryUsageDescription key into the plist file. But the permission message is not loading while I am going to access the photo library.
Instead I am getting the following scenario on simulator:
I have also checked the settings on simulator and my app is not showing on Photos privacy:
You need to add permission
Please read this link to load photos in iOS 10
https://iosdevcenters.blogspot.com/2016/09/infoplist-privacy-settings-in-ios-10.html
You need to give permission to your app to access photos. For this you need to do following steps:
Open settings in your simulator
Look for your App name and then tap on it.
Then turn on the switch to access photo's.
Related
I have an ionic-Cordova app, now I have a requirement to prevent a user(of an ios device)from taking a screenshot into my app. I wanted to take gallery access of the ios device and immediately after capturing the screenshot, wanted to delete that screenshot from the user's photo library.
To implement that:-
1.What Cordova permission do I need to get access to the user's photo library in ios?
2.Which Cordova plugin do I need to delete the last taken screenshot from the user's photo library in ios.
I don't know how I can fulfill this requirement. Please help, your help is much appreciated. Thanks. :)
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.
I'm getting this error frequently in Crashlytics.
TCC __TCCAccessRequest_block_invoke_2.80 + 222
TCC __CRASHING_DUE_TO_PRIVACY_VIOLATION__ + 682
In my app i'm downloading images and stored that images in photo gallery directly, i'm not creating suppurate folder to store these images. For this in plist i added access permission.
Privacy - Photo Library Additions Usage Description - Save downloaded photos in gallary
Privacy - Camera Usage Description - This app not access your Camera
Privacy - Microphone Usage Description - This app not access your Microphone
But i'm getting lot of crashes. See the below screen shot....
Can any one help me...
Ok this has been driving me nuts for the last couple of weeks. In my case I was missing: NSPhotoLibraryAddUsageDescription Which is apparently needed if the user tries to use the "save to camera roll" in the share controller. This appears to be new to iOS 11.
I already had this
NSPhotoLibraryUsageDescription
Which I used when user wanted to import. This gives me read/write permissions. However if the user went to export and used share controller prior to importing it would crash the app if NSPhotoLibraryAddUsageDescription wasn't in the plist. Hopefully this helps you and if not someone else.
Do you really need to save the photos?
If yes, the above answer works.
But if you have an app like mine which should NOT ALLOW user to save photos and the app still is crashing, then
Check all of your WKWebView that is are loading images.
If you long press on Webview it shows an option to save photos in app.
Fix for the crash:
webView?.allowsLinkPreview = false
Our app needs to access user's album.
NSPhotoLibraryUsageDescription is already set in Info.plist.
Works ok in ipad mini 1(ios 9.3.5), promote access to user's album and can access to user's album.
But not ok in iphones(iphone 6,ios 10), does not promote needs access to album and can not open user's album.
And there is no such setting as access to album in setting -> privacy.
Here is our info.plist:
edit:
It is a bug in our app.
Setting a wrong app route. ImagePicker library does not work correctly. Nothing to do with this plist. Has been fixed
It is a bug in our app.
Setting a wrong app root.
ImagePicker library does not work correctly.
Nothing to do with this plist. Has been fixed
I have been trying to access the PhotoLibrary in a Messages Extension app I am creating. I know that since iOS10, you need to include the NSPhotoLibraryUsageDescription in your info.plist, and I have done it. In fact, I created a test app that isn't a Messages Extension app, just a single view app, and it works fine: when the UIImagePickerController is called, the app asks for access to pictures, like it should. However, in my Messages Extension app, the code crashes before the app can ask for permission, even though the info.plist is exactly the same as for the test app.
Is there something specific about Messages Extension apps that could be the reason?
Thanks
This works fine in my Messages extension by just adding NSPhotoLibraryUsageDescription to the Info.plist file for the app itself--not the Info.plist for the extension.