iOS Build Error Using Quickblox Pod file in AWS Mobile SDK - ios

We have an iOS application that is referencing the AWS Mobile frameworks directly and several other libraries using CocoaPods. The project builds fine
But, when we add the 'Quickblox-SDK' as an additional library to reference in the PodFile and run pod install I get several build/linker errors:
Undefined symbols for architecture x86_64:
"_AWSSNSErrorDomain", referenced from:
___88-[AWSPushManager interceptApplication:didRegisterForRemoteNotificationsWithDeviceToken:]_block_invoke.239 in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNS", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSCreatePlatformEndpointInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSGetEndpointAttributesInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSSetEndpointAttributesInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSSubscribeInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSUnsubscribeInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_FBSDKAccessToken", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
"_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
"_OBJC_CLASS_$_FBSDKGraphRequest", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
"_OBJC_CLASS_$_FBSDKLoginManager", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
"_OBJC_CLASS_$_GIDSignIn", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSGoogleSignInProvider.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 we remove the $(inherited) flag from the Other Linker Flags build setting, getting below errors:-
bash: /User/..../AWSCore.framework/strip-frameworks.sh: No such file or directory
uploadDSYM[13005:219405] Fabric.framework/run 1.4.1 (160)
uploadDSYM[13005:219405] Launched uploader in validation mode
bash: /Users/..../Frameworks/Quickblox.framework/strip-framework.sh: No such file or directory
Any Help will be appreciated..
Thanks,

in your Pods-{PROJECT_NAME}.debug.xcconfig and Pods-{PROJECT_NAME}.release.xcconfig file, find this line
OTHER_LDFLAGS = $(inherited) -ObjC -l"z" ....
and remove the -ObjC
Alternatively, you can also fix this from XCode by going to Build Settings -> Other Linker Flags, and remove -ObjC from there

Related

App failing to start after adding podfile 'FMDB', related to Amazon web services

So I've been building a project using Amazon Web Services, and I decided I wanted to add local storage, so I added the podfile 'FMDB' (Using the instructional video found here: https://www.youtube.com/watch?v=D5tE61gzIVs). After adding the podfile, I get the following errors:
Undefined symbols for architecture x86_64:
"_AWSSNSErrorDomain", referenced from:
___88-[AWSPushManager interceptApplication:didRegisterForRemoteNotificationsWithDeviceToken:]_block_invoke.239 in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSLambdaInvoker", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSCloudLogic.o)
"_OBJC_CLASS_$_AWSS3", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)
(maybe you meant: _OBJC_CLASS_$_AWSS3ContentProvider)
"_OBJC_CLASS_$_AWSS3GetPreSignedURLRequest", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)
"_OBJC_CLASS_$_AWSS3ListObjectsOutput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)
"_OBJC_CLASS_$_AWSS3ListObjectsRequest", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)
"_OBJC_CLASS_$_AWSS3PreSignedURLBuilder", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)
"_OBJC_CLASS_$_AWSSNS", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSCreatePlatformEndpointInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSGetEndpointAttributesInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSSetEndpointAttributesInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSSubscribeInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSUnsubscribeInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_GIDSignIn", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSGoogleSignInProvider.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
A lot of these I am not even using in my app either (such as AWSGoogleSignInProvider). I also tried to alter the content under "Other Linker Flags" by getting rid of -ObjC and adding "-force_load (Framework pathway)" for each AWS framework that I am using. When I do this however, I just get the error of linker command failed with exit code 1. I also tried to add all the podfiles found in the amazon sdk (found here: https://github.com/aws/aws-sdk-ios), but the following error still remained: "_OBJC_CLASS_$_GIDSignIn", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSGoogleSignInProvider.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation).
Does anybody know what I can do for this? Because I really need to utilize local storage along with my AWS database, but I'm not sure how I can fix these errors. Thank you.
Open the Pod file pod-projectname.debug.xcconfig and remove -ObjC from the OTHER_LDFLAGS. This fixes the issue.
This looks like a duplicate of the issue here...
https://forums.aws.amazon.com/message.jspa?messageID=754901
Please try the following...
If you are using Cocoa Pods, please make sure you have the "use_frameworks!" line in your Podfile, like this...
platform :ios, '8.1'
use_frameworks!
target 'MySampleApp' do
pod 'whateverpodyouwantgoeshere'
end
If you are not using Cocoa Pods, then please make sure your linker settings are set exactly as those are set in the AWS Mobile Hub sample app project download.

Problems building Twitter's Fabric API in Xcode

I'm trying to install Fabric and have followed the instructions (add Run Script Build Phase, Build, Drag files into project (copy off)) and all looks good.
However as soon as I try to run the app, I get a flood of errors:
ld: warning: directory not found for option '-F/Users/michael/Developer/Digicub/Mini2/MGBF2/APIs/ParseChat/Framework'
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_NSManagedObjectContext", referenced from:
objc-class-ref in TwitterKit(TFSScribe.o)
"_OBJC_CLASS_$_NSPersistentStoreCoordinator", referenced from:
objc-class-ref in TwitterKit(TFSScribe.o)
"_OBJC_CLASS_$_NSManagedObject", referenced from:
_OBJC_CLASS_$_TFSScribeEvent in TwitterKit(TFSScribeEvent.o)
_OBJC_CLASS_$_TFSScribeImpression in TwitterKit(TFSScribeImpression.o)
"_OBJC_CLASS_$_NSManagedObjectModel", referenced from:
objc-class-ref in TwitterKit(TFSScribe.o)
"_OBJC_CLASS_$_NSFetchRequest", referenced from:
objc-class-ref in TwitterKit(TFSScribe.o)
"_NSSQLitePragmasOption", referenced from:
-[TFSScribe _setupManagedObjectContext] in TwitterKit(TFSScribe.o)
"_NSInMemoryStoreType", referenced from:
-[TFSScribe _setupManagedObjectContext] in TwitterKit(TFSScribe.o)
"_OBJC_CLASS_$_NSEntityDescription", referenced from:
objc-class-ref in TwitterKit(TFSScribe.o)
"_OBJC_METACLASS_$_NSManagedObject", referenced from:
_OBJC_METACLASS_$_TFSScribeEvent in TwitterKit(TFSScribeEvent.o)
_OBJC_METACLASS_$_TFSScribeImpression in TwitterKit(TFSScribeImpression.o)
"_NSSQLiteStoreType", referenced from:
-[TFSScribe _setupManagedObjectContext] in TwitterKit(TFSScribe.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've retried a few times, uninstalling, reinstalling. Thought it might be clashing with Twitter.framework, but removing this doesn't have any effect. Any ideas how to resolve?
According to the comments by #rmaddy
Add CoreData framework worked.
Your bundle should look like this:

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.

Coreplot build failed issue in ios

I am facing the following issue while building the application with core plot library.
It was working before 2 days. But it suddenly stopped running.
libCorePlot-CocoaTouch.a (2 slices)
Undefined symbols for architecture x86_64:
"_CPTDecimalFromFloat", referenced from:
-[GraphView generateLayout] in GraphView.o
"_CPTDecimalFromInt", referenced from:
-[GraphView generateLayout] in GraphView.o
"_OBJC_CLASS_$_CPTAxisLabel", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTBarPlot", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTColor", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTConstraints", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTFill", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTGraphHostingView", referenced from:
_OBJC_CLASS_$_GraphView in GraphView.o
"_OBJC_CLASS_$_CPTMutableLineStyle", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTMutableTextStyle", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTPlotRange", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTXYGraph", referenced from:
objc-class-ref in GraphView.o
"_OBJC_METACLASS_$_CPTGraphHostingView", referenced from:
_OBJC_METACLASS_$_GraphView in GraphView.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Add new core plot library framework to your project. Remove the old library. These are the steps to follow
Download the core plot library.
open the xcode CorePlot-CocoaTouch.xcodeproj
Go to project and click on build
Now go to core plot framework folder in your mac. You can see build folder in that.
Now open the terminal and give your core plot path
cd CorePlot_1.4/Source/build/
Type lipo -create ./Debug-iphoneos/libCorePlot-CocoaTouch.a ./Debug-iphonesimulator/libCorePlot-CocoaTouch.a -output core_plot_all.a
New library created and now add this library and core headers to your project.
Now build your project.
After that add -ObjC to other linker flags

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

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.

Resources