Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_AFHTTPRequestSerializer"

3.7k views Asked by At

I integrated the SDKTools via CocoaPods, with use_frameworks! and it is throwing me these errors:

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_AFHTTPRequestSerializer", referenced from: objc-class-ref in SKTDownloadObjectHelper.o "_OBJC_CLASS_$_AFNetworkReachabilityManager", referenced from: objc-class-ref in SKTDownloadManager.o "_OBJC_CLASS_$_SKAdvisorSettings", referenced from: objc-class-ref in SKTNavigationManager+Factories.o "_OBJC_CLASS_$_SKAnimationSettings", referenced from: objc-class-ref in SKTNavigationManager+UI.o "_OBJC_CLASS_$_SKAnnotation", referenced from: objc-class-ref in SKTNavigationManager+UI.o "_OBJC_CLASS_$_SKMapView", referenced from: objc-class-ref in SKTNavigationManager+Styles.o "_OBJC_CLASS_$_SKMapViewStyle", referenced from: objc-class-ref in SKTNavigationConfiguration.o "_OBJC_CLASS_$_SKMapsService", referenced from: objc-class-ref in SKTDownloadManager+Additions.o objc-class-ref in SKTDownloadObjectHelper.o "_OBJC_CLASS_$_SKNavigationSettings", referenced from: objc-class-ref in SKTNavigationManager.o "_OBJC_CLASS_$_SKPositionerService", referenced from: objc-class-ref in SKTNavigationManager+BackgroundMode.o objc-class-ref in SKTNavigationManager+Factories.o objc-class-ref in SKTNavigationManager+NavigationState.o objc-class-ref in SKTNavigationManager+UI.o objc-class-ref in SKTNavigationManager.o objc-class-ref in SKTNavigationUtils.o "_OBJC_CLASS_$_SKReverseGeocoderService", referenced from: objc-class-ref in SKTNavigationUtils.o "_OBJC_CLASS_$_SKRouteSettings", referenced from: objc-class-ref in SKTNavigationManager+Factories.o "_OBJC_CLASS_$_SKRoutingService", referenced from: objc-class-ref in SKTNavigationManager+BackgroundMode.o objc-class-ref in SKTNavigationManager+NavigationState.o objc-class-ref in SKTNavigationManager+Settings.o objc-class-ref in SKTNavigationManager+Styles.o objc-class-ref in SKTNavigationManager+UI.o objc-class-ref in SKTNavigationManager.o "_OBJC_CLASS_$_SKTrailSettings", referenced from: objc-class-ref in SKTNavigationManager.o "_OBJC_CLASS_$_SKVisualAdviceConfiguration", referenced from: objc-class-ref in SKTNavigationManager+Factories.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Without the use_frameworks! flag, everything works fine. But I have to use this flag in order to use other pods. This is a swift project btw.

Any help is highly appreciated since I've been trying to solve this for days now.

2

There are 2 answers

0
Politta On

Old question, but I had the same issue and what solved for me was to run:

pod integrate
pod install

Basically a new install of the pods.

0
Francisco Corrales Morales On

You need to add AFNetworking.

I did it using cocoapods like this:

cd /project/path
touch myPodfile

Now open your Podfile and add:

pod "AFNetworking", "~> 2.0"

Then:

pod setup

pod install