Cocoapods ld: symbol(s) not found for architecture armv7s - ios

After updating my pods and xcode, I've come across problems in the last phase of the build process (linking). I've tried switching up the architectures as well as setting the build active architecture to on and off, but it doesn't seem to be doing anything.
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_SRWebSocket", referenced from:
objc-class-ref in BLYClient.o
"_OBJC_CLASS_$_Reachability", referenced from:
objc-class-ref in BLYClient.o
"_kReachabilityChangedNotification", referenced from:
-[BLYClient initWithAppKey:delegate:hostName:] in BLYClient.o
"_OBJC_CLASS_$_FBRequestConnection", referenced from:
objc-class-ref in LCAccountRegistrationViewController.o
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in LCAccountRegistrationViewController.o
"_OBJC_CLASS_$_JASidePanelController", referenced from:
_OBJC_CLASS_$_LCMainRevealController in LCMainRevealController.o
"_OBJC_CLASS_$_SEEPhoneNumberFormatter", referenced from:
objc-class-ref in LCPhoneFormatter.o
"_OBJC_CLASS_$_SKInnerShadowLayer", referenced from:
objc-class-ref in LCInnerShadowView.o
"_OBJC_CLASS_$_AFHTTPClient", referenced from:
_OBJC_CLASS_$_LCHTTPClient in LCHTTPClient.o
"_OBJC_METACLASS_$_JASidePanelController", referenced from:
_OBJC_METACLASS_$_LCMainRevealController in LCMainRevealController.o
"_OBJC_CLASS_$_BITHockeyManager", referenced from:
objc-class-ref in LCAppDelegate.o
"_OBJC_CLASS_$_AFNetworkActivityIndicatorManager", referenced from:
objc-class-ref in LCHTTPClient.o
"_OBJC_CLASS_$_Lockbox", referenced from:
objc-class-ref in LCKey.o
objc-class-ref in LCSettings.o
"_OBJC_CLASS_$_AFHTTPRequestOperation", referenced from:
objc-class-ref in LCApi+Internal.o
"_OBJC_CLASS_$_AFHTTPRequestOperationLogger", referenced from:
objc-class-ref in LCAppDelegate.o
"_OBJC_CLASS_$_AFJSONRequestOperation", referenced from:
objc-class-ref in LCHTTPClient.o
"_OBJC_METACLASS_$_AFHTTPClient", referenced from:
_OBJC_METACLASS_$_LCHTTPClient in LCHTTPClient.o
"_OBJC_CLASS_$_RHDisplayLinkStepper", referenced from:
objc-class-ref in LCLockSwipeView.o
objc-class-ref in LCLockUpdatingProgressView.o
"_OBJC_CLASS_$_MagicalRecord", referenced from:
objc-class-ref in LCAppDelegate.o
objc-class-ref in LCApi+Locks.o
objc-class-ref in LCApi+Keys.o
objc-class-ref in LCBTLockScanner.o
objc-class-ref in LCBTLockForegroundScanner.o
objc-class-ref in LCBTLock.o
objc-class-ref in LCRootViewController.o
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any ideas?

I just had the same issue. The "Other Linker Flags" was overriding the flags from CocoaPods. In fact I got a warning about it-
[!] The `sftest [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-sftest/Pods-sftest.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
Changing "Other Linker Flags" to $(inherited) did indeed solve the problem.

Related

iOS Undefined symbols for architecture x86_64 Xcode

I have installed some third party frameworks in my app. Every thing was working fine and suddenly one day i started to get the following errors. Please note that these linker errors appear only when i try to run my app on iOS Simulator.
Undefined symbols for architecture x86_64:
"_AFNetworkingOperationFailingURLResponseDataErrorKey", referenced from:
___61-[DataManager signupWithEmail:password:name:success:failure:]_block_invoke.127 in DataManager.o
___46-[DataManager favoriteLesson:success:failure:]_block_invoke.311 in DataManager.o
___48-[DataManager unfavoriteLesson:success:failure:]_block_invoke.345 in DataManager.o
"_AFStringFromNetworkReachabilityStatus", referenced from:
___41-[DataManager startObservingReachability]_block_invoke in DataManager.o
"_OBJC_CLASS_$_ADJConfig", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_ADJEvent", referenced from:
objc-class-ref in TrackingHelper.o
"_OBJC_CLASS_$_AFCompoundResponseSerializer", referenced from:
objc-class-ref in DataManager.o
"_OBJC_CLASS_$_AFHTTPRequestSerializer", referenced from:
objc-class-ref in DataManager.o
"_OBJC_CLASS_$_AFHTTPResponseSerializer", referenced from:
objc-class-ref in DataManager.o
"_OBJC_CLASS_$_AFHTTPSessionManager", referenced from:
objc-class-ref in DataManager.o
"_OBJC_CLASS_$_AFJSONRequestSerializer", referenced from:
objc-class-ref in DataManager.o
"_OBJC_CLASS_$_AFJSONResponseSerializer", referenced from:
objc-class-ref in DataManager.o
"_OBJC_CLASS_$_AFNetworkReachabilityManager", referenced from:
objc-class-ref in DataManager.o
"_OBJC_CLASS_$_AFURLSessionManager", referenced from:
objc-class-ref in DataManager.o
"_OBJC_CLASS_$_AMTagView", referenced from:
objc-class-ref in CategorySelectionViewController.o
"_OBJC_CLASS_$_Adjust", referenced from:
objc-class-ref in AppDelegate.o
objc-class-ref in TrackingHelper.o
"_OBJC_CLASS_$_CarbonTabSwipeNavigation", referenced from:
objc-class-ref in MyProfileViewController.o
objc-class-ref in SearchResultsContainerViewController.o
"_OBJC_CLASS_$_FBSDKAccessToken", referenced from:
objc-class-ref in SignUpViewController.o
objc-class-ref in MyProfileViewController.o
"_OBJC_CLASS_$_FBSDKAppEvents", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FBSDKLoginManager", referenced from:
objc-class-ref in SignUpViewController.o
objc-class-ref in DataManager.o
objc-class-ref in LoginViewController.o
"_OBJC_CLASS_$_MGSwipeButton", referenced from:
objc-class-ref in LessonsViewController.o
"_OBJC_CLASS_$_MGSwipeTableCell", referenced from:
_OBJC_CLASS_$_LessonTableViewCell in LessonTableViewCell.o
"_OBJC_CLASS_$_Mixpanel", referenced from:
objc-class-ref in AppDelegate.o
objc-class-ref in InitialViewController.o
objc-class-ref in DataManager.o
"_OBJC_CLASS_$_WYPopoverController", referenced from:
objc-class-ref in GuideViewController.o
"_OBJC_METACLASS_$_MGSwipeTableCell", referenced from:
_OBJC_METACLASS_$_LessonTableViewCell in LessonTableViewCell.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any help will be highly appreciated. I can debug, build and archive my project, if i do it on actual device but not on simulator. I have added all these frameworks via cocapods and i am using Xcode 7.3.
I had faced the same error. Like below
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AFJSONRequestSerializer", referenced from:
objc-class-ref in CuebiqSDK(BADispatcherHelper.o)
"_OBJC_CLASS_$_AFURLSessionManager", referenced from:
objc-class-ref in CuebiqSDK(BADispatcherHelper.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 haven't added the AFURLSessionManager related classes in my project as mentioned in error. So, I added all the AFNetworking classes solved the problem. Make sure they are added to project target and shown under Build phases->Compile Sources

iOS Mach-o linker error parse

Undefined symbols for architecture x86_64:
"_BFTaskMultipleExceptionsException", referenced from:
___53+[PFObject(Private) deleteAllAsync:withSessionToken:]_block_invoke226 in Parse(PFObject.o)
___65+[PFObject(Private) _deepSaveAsync:withCurrentUser:sessionToken:]_block_invoke319 in Parse(PFObject.o)
"_OBJC_CLASS_$_BFExecutor", referenced from:
objc-class-ref in Parse(PFObject.o)
objc-class-ref in Parse(PFFile.o)
objc-class-ref in Parse(PFFileManager.o)
objc-class-ref in Parse(PFInstallation.o)
objc-class-ref in Parse(PFPin.o)
objc-class-ref in Parse(PFSession.o)
objc-class-ref in Parse(PFUser.o)
...
"_OBJC_CLASS_$_BFTask", referenced from:
objc-class-ref in Parse(PFObject.o)
objc-class-ref in Parse(PFEventuallyPin.o)
objc-class-ref in Parse(PFFile.o)
objc-class-ref in Parse(PFFileManager.o)
objc-class-ref in Parse(PFInstallation.o)
objc-class-ref in Parse(PFPin.o)
objc-class-ref in Parse(PFEncoder.o)
...
"_OBJC_CLASS_$_BFTaskCompletionSource", referenced from:
objc-class-ref in Parse(PFObject.o)
objc-class-ref in Parse(PFOfflineStore.o)
objc-class-ref in Parse(BFTask+Private.o)
objc-class-ref in Parse(PFEventuallyQueue.o)
objc-class-ref in Parse(PFSQLiteDatabase.o)
objc-class-ref in Parse(PFTaskHTTPRequestOperation.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 am getting this error
I used below link as reference and I implemented all framework from that
Apple Mach-O Linker Error Parse
My code is in Swift and I can not able to find that how to solve that error.
Anyone can reply for this?
Try this ways:
1) if you use also use the Facebook SDK look at this question. The solution seems to be:
Add to your AppDelegate.m or another class following constant after
imports and before implementation section: NSString *const
BFTaskMultipleExceptionsException = #"BFMultipleExceptionsException";
2) check your Library Search Paths Flag, maybe you have old reference no more present in your project.
3) remove the -ObjC flag in Other Linker Flags on Build Settings.

Cocoa Pods failed to link libraries while running in the debug mode?

I m using pods to link libraries like AfNetworking, facebook etc. and its working great in release mode but I want to check Variables value by debugging but it shows all the variables nil in release mode. I tried to run in debug mode by editing schema but it failed to compile showing various libraries not found error.
Edit I have tried updating the architectures.....but this isn't helping out.
Error log in debug mode
ld: warning: directory not found for option '-L/Users/madept/Desktop/personally/Pods/build/Debug-iphoneos'
ld: warning: ignoring file /Users/madept/Desktop/personally/libCloudinary.a, missing required architecture x86_64 in file /Users/madept/Desktop/personally/libCloudinary.a (3 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AFHTTPRequestOperation", referenced from:
objc-class-ref in ZRAPIClient.o
"_OBJC_CLASS_$_AFHTTPRequestSerializer", referenced from:
objc-class-ref in ZRAPIClient.o
"_OBJC_CLASS_$_AFJSONResponseSerializer", referenced from:
objc-class-ref in ZRAPIClient.o
"_OBJC_CLASS_$_BITHockeyManager", referenced from:
objc-class-ref in ZRAppDelegate.o
"_OBJC_CLASS_$_CLCloudinary", referenced from:
objc-class-ref in ZRMediaManager.o
"_OBJC_CLASS_$_CLTransformation", referenced from:
objc-class-ref in ZRMediaManager.o
"_OBJC_CLASS_$_DDFileLogger", referenced from:
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_DDLog", referenced from:
objc-class-ref in Chat.o
objc-class-ref in ZRManagedObject.o
objc-class-ref in ZRTelescopingScrollView.o
objc-class-ref in ZRAddMessageBarController.o
objc-class-ref in ZRCreateAccountViewController.o
objc-class-ref in ZRAddressBookHelper.o
objc-class-ref in Zooplr.o
...
"_OBJC_CLASS_$_DDTTYLogger", referenced from:
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_ELCAlbumPickerController", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_ELCImagePickerController", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_EZAudioPlotGL", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_EZMicrophone", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_EZRecorder", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_FBAppCall", referenced from:
objc-class-ref in ZRAppDelegate.o
"_OBJC_CLASS_$_FBErrorUtility", referenced from:
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_FBRequestConnection", referenced from:
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in ZRAppDelegate.o
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_Mixpanel", referenced from:
objc-class-ref in ZRAnalyticsTracker.o
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_Reachability", referenced from:
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_SSKeychain", referenced from:
objc-class-ref in ZRAuthManager.o
"_OBJC_CLASS_$_SVProgressHUD", referenced from:
objc-class-ref in ZRAccountEditViewController.o
objc-class-ref in ZRAppDelegate.o
"_OBJC_CLASS_$_SocketIO", referenced from:
objc-class-ref in ZRChatSocketClient.o
"_OBJC_CLASS_$_TTTAttributedLabel", referenced from:
objc-class-ref in ZRBubbleViewTextMessage.o
"_kReachabilityChangedNotification", referenced from:
-[ZRAppDelegate application:didFinishLaunchingWithOptions:] in ZRAppDelegate.o
-[ZRChatSocketClient init] in ZRChatSocketClient.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any help or suggestion would be appreciated.
if the above answer didn't work for you, maybe the problem comes from when you installed the pods. Check if you had such message when running pod install
The ProjectName [Release] target overrides the OTHER_LDFLAGS build setting defined in `Pods/Target Support Files/ProjectName/Pods-ProjectName.release.xcconfig'. This can lead to problems with the CocoaPods installation
or a similar message but with debug instead of release (or both).
If so, delete the pod project in your workspace in Xcode, then follow the answer to this question The target ... overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig, I past it here :
This definitely works most of the time:
Go to your target Build Settings -> Other linker flags -> double click . Add $(inherited) to a new line.
And then run pod install again. It did it for me.
This means static libraries that you're using do not support x86_64 architecture,
So
Open "Build Settings" for "Pods" target, and add "x86_64" architecture (in "Architectures" and "Valid Architectures" section).
Set "Build Active Architectures Only" to "NO".
Clean "Pods" target.
Build your target.
Delete the .a files in /Users/YourName/Library/Developer/Xcode/DerivedData/YourProject/Build/Products/Debug-iphoneos. Then clean and build.This help me.
What worked for me is adding $(inherited) to:
OTHER_LDFLAGS
OTHER_CFLAGS
FRAMEWORK_SEARCH_PATHS
GCC_PREPROCESSOR_DEFINITIONS
Tip: Inside Build Settings -> (search bar) -> type options above and add $(inherited)
I had deleted the .a file, it won't worked for me, but when I Deleted the Project Folder in /Users/YourName/Library/Developer/Xcode/DerivedData/YourProject.
This help me.

Parse framework in Xcode project

My app that I am making requires Parse framework, but when I import Parse framework into my app, I get many errors that say the following in Apple Mach-O Linker error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_BFExecutor", referenced from:
objc-class-ref in Parse(BFTask+Private.o)
l_OBJC_$_CATEGORY_BFExecutor_$_Background in Parse(BFTask+Private.o)
"_OBJC_CLASS_$_BFTask", referenced from:
objc-class-ref in Parse(PFObject.o)
objc-class-ref in Parse(PFQuery.o)
objc-class-ref in Parse(PFCachedCommandRunner.o)
objc-class-ref in Parse(PFFile.o)
objc-class-ref in Parse(PFNetworkCommandRunner.o)
objc-class-ref in Parse(PFRetryingCommandRunner.o)
objc-class-ref in Parse(PFTaskQueue.o)
...
"_OBJC_CLASS_$_BFTaskCompletionSource", referenced from:
objc-class-ref in Parse(PFObject.o)
objc-class-ref in Parse(PFCommandCache.o)
objc-class-ref in Parse(PFNetworkCommandRunner.o)
objc-class-ref in Parse(PFTaskHTTPRequestOperation.o)
objc-class-ref in Parse(BFTask+Private.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If you know how to fix this, and make the app able to build, please let me know.
Make sure that you have the bolts.framework in your app

GPUimage framework display error in device that has iOS 7.1

I am am using the GPUImage framework in my app. Its working great, But when i tried to run app in device that has iOS 7.1 its display following error.
ld: warning: ignoring file /Users/user/Library/Developer/Xcode/DerivedData/app-fhjyuaovocdkvnfdpxllwvwplxei/Build/Products/Debug-iphoneos/libGPUImage.a, file was built for archive which is not the architecture being linked (armv7): /Users/user/Library/Developer/Xcode/DerivedData/app-fhjyuaovocdkvnfdpxllwvwplxei/Build/Products/Debug-iphoneos/libGPUImage.a
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GPUImageContrastFilter", referenced from:
objc-class-ref in ViewController.o
"_OBJC_CLASS_$_GPUImageSaturationFilter", referenced from:
objc-class-ref in ViewController.o
"_OBJC_CLASS_$_GPUImageExposureFilter", referenced from:
objc-class-ref in ViewController.o
"_OBJC_CLASS_$_GPUImageAdaptiveThresholdFilter", referenced from:
objc-class-ref in ViewController.o
objc-class-ref in WSCall.o
"_OBJC_CLASS_$_GPUImageGrayscaleFilter", referenced from:
objc-class-ref in ViewController.o
"_OBJC_CLASS_$_GPUImagePicture", referenced from:
objc-class-ref in ViewController.o
objc-class-ref in WSCall.o
"_OBJC_CLASS_$_GPUImageBrightnessFilter", referenced from:
objc-class-ref in ViewController.o
"_OBJC_CLASS_$_GPUImageSharpenFilter", referenced from:
objc-class-ref in ViewController.o
objc-class-ref in WSCall.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It is working on Simulator and my other device which has iOS 7.0.3.
Should modify valid architectures armv7 => armv7s, arm64

Resources