2016-10-03 5 views
7

プライバシーに敏感なデータにアクセスしようとしたため、クラッシュしたがい、このエラー私のXcodeの私のアプリがクラッシュを更新して与えた後:iOSの10のAppは、それは私が以前に罰金働いていた私のプロジェクトを実行している

This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data

+0

Anbu.Karthik答えが正しい。 –

答えて

13

プライバシーを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.

あなたのPLISTにNSCameraUsageDescriptionを配置する必要があります。

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

同様

例えば

enter image description here

ためのすべての使用説明hereを確認してください。

0

The new Privacy settings that are required if you build your apps with the iOS 10 SDK.A “Purpose String” MUST be provided in your Info.plist file if you’re accessing any of the privacy sensitive data.

A「目的の文字列は、」アプリが許可を要求するとき、我々はiOSのため、場所のサービスのためにやっているだけのように(ユーザーに表示される、特定のサービスにアクセスする必要がない理由を説明するだけのメッセージです8)。この "Purpose String"を指定しないと、アプリがクラッシュする可能性があります。

0

私はカメラを使用して、実際のデバイス上で上記試したhaventはinfo.plist

enter image description here

に次のエントリを追加することによって、私のシミュレータ上でこの問題を解決し、私はそれのためにあなたのように次の値を入力することがあると思いますよく、

enter image description here

私はのiOSを使用しています10.2