apple开发过程中错误汇总ios+macos

  1. Signing for “BullsEye” requires a development team. Select a development team in the project editor. (in target ‘BullsEye’)
    在这里插入图片描述
  2. 测试iphone6p的 iPhone’s iOS 11.2.1 doesn’t match BullsEye.app’s iOS 12.1 deployment target. Upgrade 测试iphone6p的 iPhone’s iOS version or lower BullsEye.app’s deployment target.
    在这里插入图片描述
  3. Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value
    在这里插入图片描述

网络问题


nw_socket_connect [C1:2] connectx failed (fd 6) [1: Operation not permitted]

**解决方法:**想进行网络请求是需要权限的,看看怎么给你的应用分配网络请求权限吧


出现下面的问题说明你使用了http连接,解决方法就是在info.plist中添加NSAppTransportSecurity https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33

Optional(Error Domain=NSURLErrorDomain Code=-1022 “The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.” UserInfo={NSUnderlyingError=0x600000c4e7c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1022 “(null)”}, NSErrorFailingURLStringKey=http://www.baidu.com/, NSErrorFailingURLKey=http://www.baidu.com/, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.})


Optional(Error Domain=NSURLErrorDomain Code=-1003 “A server with the specified hostname could not be found.” UserInfo={NSUnderlyingError=0x600000c78360 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 “(null)” UserInfo={_kCFStreamErrorCodeKey=-72000, _kCFStreamErrorDomainKey=10}}, NSErrorFailingURLStringKey=https://www.baidu.com/, NSErrorFailingURLKey=https://www.baidu.com/, _kCFStreamErrorDomainKey=10, _kCFStreamErrorCodeKey=-72000, NSLocalizedDescription=A server with the specified hostname could not be found.})


Optional(Error Domain=NSURLErrorDomain Code=-1005 “The network connection was lost.” UserInfo={NSUnderlyingError=0x600000c47300 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 “(null)” UserInfo={_kCFStreamErrorCodeKey=57, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=http://127.0.0.1/, NSErrorFailingURLKey=http://127.0.0.1/, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=57, NSLocalizedDescription=The network connection was lost.})



posted @ 2022-03-06 10:38  叶常落  阅读(237)  评论(0编辑  收藏  举报