【问题标题】:Does AFNetworking 2.2.1 support iOS 6.0? [duplicate]AFNetworking 2.2.1 是否支持 iOS 6.0? [复制]
【发布时间】:2014-03-27 09:23:35
【问题描述】:

我使用 CocoaPods 和 AFNetworking 2.2.1,但在 ios 6.1 中出现错误“dyld: Symbol not found: _NSURLSessionTransferSizeUnknown”

我知道Does AFNetworking 2.0 support iOS 6.0?

我在 CocoaPods 中添加了 pod 'AFNetworking/NSURLSession', '~> 2.0',但在 ios 6.1 中出现错误“dyld: Symbol not found: _NSURLSessionTransferSizeUnknown”。

我能为 ios6.1 做什么? 我已经完成了一半的项目...... 请帮帮我...

【问题讨论】:

标签: ios afnetworking-2


【解决方案1】:

您是否添加了这些框架:SystemConfiguration、Security、CFNetwork?

【讨论】:

  • 这无法解决问题。基于 NSURLSession 的 API 仅在 iOS 7 中可用。
  • 此外,Cocoapods 将所需的框架链接在 .xcworkspace 中的 framework 组 Pod 中
【解决方案2】:

AFNetworking 2.X 已针对 iOS 7 和新的 NSURLSession 协议进行了更新,这些协议仅在 iOS 7 中可用。为了在早期版本的 iOS 中使用这个强大的工具带,您必须在你的 podfile 中指定。

  1. 平台版本,像这样platform :ios, '6.0'
  2. 乐观算子~>你需要的AFNetworking版本

所以你的 AFNetworking 的 podfile 应该如下所示

platform :ios, '6.0'
xcodeproj 'MyProject'
pod 'AFNetworking', '~> 1.8'

或

platform :ios, '6.0'
xcodeproj 'MyProject'
pod 'AFNetworking', '< 2.0'

希望这篇文章有所帮助!

【讨论】:

    猜你喜欢
    • 2013-10-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-03
    • 2013-07-10
    • 2020-02-26
    • 2015-09-20
    相关资源
    最近更新 更多