您好,欢迎来到知库网。
搜索
您的当前位置:首页iOS的plist文件适配那点事儿

iOS的plist文件适配那点事儿

来源:知库网

关于AFNetworking的网络请求失败看这里

  • 网络请求失败首先考虑一点有没有在plist文件里适配http协议,也就是看你的plist文件里有没有下边的代码:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>

iOS10也有一些需要适配的plist文件内容

  • 当你碰到一下报错:
This app attempts 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.

 This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data.

  This app attempts 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.
  • 对应的解决是缺少哪个就在plist文件加入哪个
// 这个是相机的
 <key>NSCameraUsageDescription</key> 
<string>cameraDesciption</string>
// 通讯录
 <key>NSContactsUsageDescription</key>    
  <string>contactsDesciption</string>    
// 相册
<key>NSMicrophoneUsageDescription</key>   
 <string>microphoneDesciption</string>
  <key>NSPhotoLibraryUsageDescription</key>    
<string>此 App 需要您的同意才能读取媒体资料库</string>
  • 我了解到的就这么多了,欢迎大家指正。

Copyright © 2019- zicool.com 版权所有 湘ICP备2023022495号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务