简体   繁体   English

通过可可豆荚安装AFNetworking问题

[英]AFNetworking install via cocoa pods issue

I install this framework AFNetworking using next specification pointed in Podfile as in description on git: 我使用在Podfile中指向的下一个规范来安装这个框架AFNetworking ,就像在git上的描述一样:

platform :ios, '7.0'
pod "AFNetworking", "~> 2.0"

But when I run project I had this error: 但是当我运行项目时,我遇到了这个错误:

dyld: Symbol not found: _OBJC_CLASS_$_NSURLSession Referenced from: /Users/mac/Library/Application Support/iPhone Simulator/6.1/Applications/BD91CA1D-5AC2-4187-9559-BD7F9F45866F/Test.app/Test Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation in /Users/mac/Library/Application Support/iPhone Simulator/6.1/Applications/BD91CA1D-5AC2-4187-9559-BD7F9F45866F/Test.app/Test dyld:未找到符号:_OBJC_CLASS _ $ _ NSURLSession引用自:/ Users / mac / Library / Application Support / iPhone Simulator / 6.1 / Applications / BD91CA1D-5AC2-4187-9559-BD7F9F45866F / Test.app / Test预期:/ Applications / / Users / mac / Library / Application Support / iPhone Simulator / 6.1中的Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation /Applications/BD91CA1D-5AC2-4187-9559-BD7F9F45866F/Test.app/Test

I installed AFNetworking before but there were not issues like this. 我之前安装了AFNetworking,但没有这样的问题。 I see that compiler says about NSURLSession that is supported on iOS 7 as I think, but on git I read next: 我看到编译器说的关于iOS 7支持的NSURLSession ,我认为,但是在git我接下来读到:

AFNetworking 2.0 officially supports iOS 6+, Mac OS X 10.8+, and Xcode 5. AFNetworking 2.0正式支持iOS 6 +,Mac OS X 10.8+和Xcode 5。

So how to fix this issue? 那么如何解决这个问题呢?

删除Podfile中的平台线,AFNetworking pod规范只会在iOS 6类中链接,如果您的目标需要它们

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM