欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

iOS10 權(quán)限崩潰問題詳解及解決方案

 更新時(shí)間:2016年11月17日 11:08:31   作者:韓俊強(qiáng)  
這篇文章主要介紹了iOS10 權(quán)限崩潰問題詳解及解決方案的相關(guān)資料,需要的朋友可以參考下

iOS10 權(quán)限崩潰問題

       今天 手機(jī)升級了 iOS10 Beta,然后用正在開發(fā)的項(xiàng)目 裝了個(gè)ipa包,發(fā)現(xiàn)點(diǎn)擊有關(guān) 權(quán)限訪問 直接Crash了,并在控制臺輸出了一些信息:

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

意思是說:你需要在info.plist文件 添加一個(gè)“NSContactsUsageDescription ”的Key,Value添加一個(gè)描述。

1,在項(xiàng)目中找到info.plist文件,右擊有個(gè) Open As,以Source Code 的形式打開
2,分別復(fù)制 以下 Value 和Key,Key 一定不能錯(cuò),Value 貌似可以隨便填寫

相機(jī)權(quán)限描述: 

   <key>NSCameraUsageDescription</key>
    <string>cameraDesciption</string>

通信錄:

    <key>NSContactsUsageDescription</key>
    <string>contactsDesciption</string>

麥克風(fēng):

    <key>NSMicrophoneUsageDescription</key>
    <string>microphoneDesciption</string>

相機(jī):

    <key>NSPhotoLibraryUsageDescription</key>
    <string>photoLibraryDesciption</string>

eg:其他權(quán)限描述,debug 控制臺都會有輸出的,自行添加就OK

3,在info.plist 文件上 復(fù)制上,然后 保存,如下圖:

Source Code 的形式:


Property List 的展現(xiàn)形式:

4,Clean之后,運(yùn)行就OK了

感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

相關(guān)文章

最新評論