关于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.
// 这个是相机的
<key>NSCameraUsageDescription</key>
<string>cameraDesciption</string>
// 通讯录
<key>NSContactsUsageDescription</key>
<string>contactsDesciption</string>
// 相册
<key>NSMicrophoneUsageDescription</key>
<string>microphoneDesciption</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>此 App 需要您的同意才能读取媒体资料库</string>
网友评论