Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TCC __TCCAccessRequest_block_invoke

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....

enter image description here

Can any one help me...

like image 274
Naresh Avatar asked Feb 08 '18 06:02

Naresh


2 Answers

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.

like image 78
Skyler Lauren Avatar answered Nov 01 '22 20:11

Skyler Lauren


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
like image 6
Manoj Avatar answered Nov 01 '22 19:11

Manoj