LoginSignup
22
20

More than 5 years have passed since last update.

iOS10からプライバシーアクセス周りの使用目的の記載が必須になる?

Last updated at Posted at 2016-09-07

背景

iOS10+Xcode8のベータ版で動作確認していたところフォトライブラリにアクセスできない問題に遭遇しました。
アクセスしようとすると、以下のログがでてアプリがクラッシュしました。

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

対応

iOS10からカメラ等のプライバシーアクセス周りのUsage Descriptionの定義が必須なようです。
以下Cocoa KeysのXcode Nameが“Privacy - ○○ Usage Description”のキーが該当します。
Cocoa Keys

アプリ内で利用する機能はinfo.plistにキーを追加し、使用目的を記述する必要があるようです。
今回場合、“Privacy - Photo Library Usage Description”を追加することで回避できました。

Valueは空でも動きましたが、Appleに審査出すときはちゃんと書く必要がありそうです。

22
20
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
22
20