天天看點

iOS10 權限通路Crash問題

更新到iOS10後進行調試的時候,在設計到隐私權限使用的時候,出現了崩潰。類似下方的報錯:

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.

原因是蘋果需要你在使用使用者隐私權限的時候做一個說明,即你需要在 info.plist 檔案添加一個 

NSPhotoLibraryUsageDescription 

的 key,然後添加一個描述。

回想到上次提價AppStore遇到的很坑的問題,因使用位置權限說明不明确被拒絕,給予大家如下描述參考(參考的QQ):

@"請點選“允許”以允許通路。

若不允許,您将無法正常使用**等功能"

iOS