Can anybody help me with this, its driving me crazy. I looked at every post I could find with a similar issue, and none of it worked.
I installed AFNetworking 3.0 in my project with Cocoapods, it installed, I see the AFNetworking pod in my project.Set built Architure only :YES Whenever I try to build I get the following error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AFHTTPSessionManager", referenced from:
objc-class-ref in EFServer.o
"_OBJC_CLASS_$_AFJSONRequestSerializer", referenced from:
objc-class-ref in EFServer.o
"_OBJC_CLASS_$_AFJSONResponseSerializer", referenced from:
objc-class-ref in EFServer.o
"_OBJC_CLASS_$_MBProgressHUD", referenced from:
objc-class-ref in EFServer.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I had the same problem after installing pods to my old project. In my case there where custom linker flags added to the Build Settings of the target, but the $(inherited) was removed so the pods flags were missing (not inherited) therefore no AFNetworking framework were linked.
I suggest to check out is there a $(inherited) row added to the Other Linker Flags section of Build Settings for the target.
Just delete the DerivedData
folder and re-try.
rm -rf ~/Library/Developer/Xcode/DerivedData
add below lines to your podfile and reinstall it and add your project name to target.
target 'your project name' do
use_frameworks!
pod 'AFNetworking', '~> 3.0'
end
hope your problem will be solved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With