问题
Iam using cocoapods with AFNetwork. When I compile the followig error appears:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_AFHTTPClient", referenced from:
It happens for the cocoapod classes either with 64 bits or 32. Tried solutions from here:
AFNetworking Library failing in iOS 7
And here:
Undefined symbols for architecture arm64
but they don't work, am I missing something?
I included the project, but do I have to link it in some other way?
回答1:
The problem arises because there is a syntax issue with a deprecation on the source files of JSONKIT, the auto fix apparently prevents the class from being accessed as mentioned here https://stackoverflow.com/a/14191829/2394901. This is in turn is because the pod file specifies:
pod 'AFNetworking', '~> 1.2'
I removed the pod (see How to remove CocoaPods from a project?) and then reinstalled:
$ pod install
With:
pod "AFNetworking", "~> 2.0"
来源:https://stackoverflow.com/questions/23188359/undefined-symbol-for-architecture-objc-class-afhttpclient