Nscamerausagedescription in iOS 10.0 Runtime Crash

NSCameraUsageDescription in iOS 10.0 runtime crash?

After iOS 10 you have to define and provide a usage description of all the system’s privacy-sensitive data accessed by your app in Info.plist as below:

Calendar

Key    :  Privacy - Calendars Usage Description    
Value : $(PRODUCT_NAME) calendar events

Reminder :

Key    :   Privacy - Reminders Usage Description    
Value : $(PRODUCT_NAME) reminder use

Contact :

Key    :   Privacy - Contacts Usage Description     
Value : $(PRODUCT_NAME) contact use

Photo :

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

Bluetooth Sharing :

Key    :  Privacy - Bluetooth Peripheral Usage Description     
Value : $(PRODUCT_NAME) Bluetooth Peripheral use

Microphone (also used for video recording) :

Key    :  Privacy - Microphone Usage Description    
Value : $(PRODUCT_NAME) microphone use

Camera (photo or video recording) :

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

Location :

Key    :  Privacy - Location Always Usage Description   
Value : $(PRODUCT_NAME) location use

Key : Privacy - Location When In Use Usage Description
Value : $(PRODUCT_NAME) location use

Heath :

Key    :  Privacy - Health Share Usage Description   
Value : $(PRODUCT_NAME) heath share use

Key : Privacy - Health Update Usage Description
Value : $(PRODUCT_NAME) heath update use

HomeKit :

Key    :  Privacy - HomeKit Usage Description   
Value : $(PRODUCT_NAME) home kit use

Media Library :

Key    :  Privacy - Media Library Usage Description   
Value : $(PRODUCT_NAME) media library use

Motion :

Key    :  Privacy - Motion Usage Description   
Value : $(PRODUCT_NAME) motion use

Speech Recognition :

Key    :  Privacy - Speech Recognition Usage Description   
Value : $(PRODUCT_NAME) speech use

SiriKit :

Key    :  Privacy - Siri Usage Description  
Value : $(PRODUCT_NAME) siri use

TV Provider :

Key    :  Privacy - TV Provider Usage Description   
Value : $(PRODUCT_NAME) tvProvider use

You can get detailed information in this link.

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.

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.

iOS10 app has crashed because it attempted to access privacy-sensitive data

In your .plist add this key: Privacy - Microphone Usage Description and your desired value.

Sample Image

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

 NSCameraUsageDescription 
$(PRODUCT_NAME) uses Cameras

for e.g

Sample Image

Check all the usage descriptions here.



Related Topics



Leave a reply



Submit