Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AFNetworking install via cocoa pods issue

I install this framework AFNetworking using next specification pointed in Podfile as in description on 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

I installed AFNetworking before but there were not issues like this. I see that compiler says about NSURLSession that is supported on iOS 7 as I think, but on git I read next:

AFNetworking 2.0 officially supports iOS 6+, Mac OS X 10.8+, and Xcode 5.

So how to fix this issue?

like image 812
Matrosov Oleksandr Avatar asked Nov 20 '25 15:11

Matrosov Oleksandr


1 Answers

Remove the platform line in the Podfile, AFNetworking pod spec will only link in iOS 6 classes if your target requires them

like image 183
wattson12 Avatar answered Nov 22 '25 04:11

wattson12



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!