iOS 10 App Crashes When Accessing Camera

ios 10 app crashes when accessing camera

Your privacy key value contains $(PRODUCT_NAME), which appears to be the reason that this error (only for iOS 10+) appears.

Change your privacy key value to a pure string like "Used to capture new image for photo effect" and it should correct it.

iOS 10 - App crashes To access photo library or device camera via UIImagePickerController

In iOS 10. You have to set privacy Setting for Camera & Photo Library.

Camera :

Key       :  Privacy - Camera Usage Description   
Value : $(PRODUCT_NAME) camera use

Photo Library:

Key       :  Privacy - Photo Library Usage Description    
Value : $(PRODUCT_NAME) photo use

iOS 10 Save to Camera Roll Bug/Crash

Add Below permission in Info.plist

<key>NSCameraUsageDescription</key>
<string>This app needs access to the camera to take photos.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app needs access to photos.</string>

More info Click here
Sample Image

Using device CAMERA ON IOS 10 causes the application to be terminated

I Solved This issue:-
Go to info.plist - Your Xcode bundle
Click the "+" and go down the resulting list until you see "Privacy - Camera Usage Description". Add this item to by clicking it inside that list.

Format
..-Info.Plist
Key :- Privacy - Camera Usage Description
Type :- string
Value :- empty - Don't enter anything

Just clean xcode project and run it ... it's worked for me.

Watch App get killed while allowing/disallowing camera permission on iPhone App

Your app is not crashing its just forced to restart by WatchOS with new privacy settings. So when you change the any permission in iPhone then it means privacy policy changed, so app will be killed if its attached to debugger else it will relaunch. its happing on both Apple Watch and iPhone. if you change the permission in Apple Watch iOS app will restart. if you change the permission in iOS app Apple Watch app will be restart.

Also, Not only camera permission If the user at some point changes the Address Book, Calendars, Reminders, Camera, or Photos permissions, WatchOS app will SIGKILL the app when change App permission in iPhone. (it's default behaviour of iOS and WatchOS)

Please refer the below links

App killed by SIGKILL when changing privacy settings ,
https://developer.apple.com/forums/thread/64740,
App crashes in background while changing permission - swift,
App crashed in iOS 6 when user changes Contacts access permissions

UIImagePickerController crashes on iOS10

I solved the crash by updating to the latest Xcode version.
The problem has been discussed here as well: https://github.com/Leanplum/Leanplum-iOS-SDK/issues/12

iOS 10 App has crashed because it attempted to access privacy-sensitive data

Privacy Settings in iOS 10

A significant change in iOS 10 is that you must declare ahead of time any access to private data or your App will crash.

Once you link with iOS 10 you must declare access to any user private data types. You do this by adding a usage key to your app’s Info.plist together with a purpose string. The list of frameworks that count as private data is a long one

Contacts, Calendar, Reminders, Photos, Bluetooth Sharing, Microphone, Camera, Location, Health, HomeKit, Media Library, Motion, CallKit, Speech Recognition, SiriKit, TV Provider.

You need to put the NSCameraUsageDescription in your plist.

Like

<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) uses Cameras</string>

for e.g

Sample Image

Check all the usage descriptions here.

iOS app crash when accessing iPhone photo library even with key NSPhotoLibraryUsageDescription defined

I apologies but it was my fault, when migrating I med some mess with info.plist files.

App crashes even though I added NSCameraUsageDescription in info.plist, using iOS 10, Xcode 8

Had the same issue on iOS 10. You have to add something like this "NSCameraUsageDescription" = "Used to scan barcodes"; to your Info.Plist.string to localize the alert description for every language.



Related Topics



Leave a reply



Submit