Undefined symbols for architecture x86_64 in iOS project - ios

I'm trying to use this Spotify SDK integration for React Native in my iOS project.
I'm getting the following error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_SPTAudioStreamingController", referenced from:
objc-class-ref in libRCTSpotify.a(RCTSpotify.o)
"_OBJC_CLASS_$_SPTAuth", referenced from:
objc-class-ref in libRCTSpotify.a(RCTSpotify.o)
"_OBJC_CLASS_$_SPTDiskCache", referenced from:
objc-class-ref in libRCTSpotify.a(RCTSpotify.o)
"_OBJC_CLASS_$_SPTRequest", referenced from:
objc-class-ref in libRCTSpotify.a(RCTSpotify.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The section on Architectures in the RCTSpotify.xcodeproj in the Libraries folder looks like all the others, I can't find anything about x86_64, and this error has never previously appeared in the project.

Scroll up and check and see if there's another error right before that says something like this:
warning: skipping file '[FOLDER_PATH]/node_modules/rn-spotify-sdk/ios/external/SpotifySDK' (unexpected file type 'folder' in Frameworks & Libraries build phase)
If that's the case, you did like me and followed the README directly. What you actually want to do is add three frameworks from within that folder, not just the SpotifySDK folder.
They are SpotifyMetadata.framework, SpotifyAuthentication.framework, and SpotifyAudioPlayer.framework. If you add those three in, then it should work. They within the /node_modules/rn-spotify-sdk/ios/external/SpotifySDK/ folder.
Should end up looking like this:

Maybe the SDK you are trying to use is built for real device not simulator. Please, check.

Related

AWS IOS SDK Error Undefined symbols for architecture x86_64:

I get this error after using cocoapods with AWS SDK IOS:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AWSInfo", referenced from:
objc-class-ref in libAWSCognitoIdentityProvider.a(AWSCognitoIdentityProviderService.o)
objc-class-ref in libAWSIoT.a(AWSIoTDataManager.o)
objc-class-ref in libAWSIoT.a(AWSIoTDataService.o)
objc-class-ref in libAWSIoT.a(AWSIoTManager.o)
objc-class-ref in libAWSIoT.a(AWSIoTService.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 solved my own problem.
When i created the project i selected to include unit tests for the project.
For whatever reason this conflicted with the cocoapod installation. When i created a new project without unit tests everything compiled correctly.
This could be a conflict between the two or I did not configure something properly either way it seems like units tests and cocoapods need some extra tinkering with.

"Undefined symbols for architecture x86_64:" Error with Branch.io

I'm attempting to use the Branch.io iOS SDK in my iOS app, and I'm getting the following error when I try to compile:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_CSSearchableIndex", referenced from:
objc-class-ref in BranchCSSearchableItemAttributeSet.o "_OBJC_CLASS_$_CSSearchableItem", referenced from:
objc-class-ref in BranchCSSearchableItemAttributeSet.o "_OBJC_CLASS_$_CSSearchableItemAttributeSet", referenced from:
_OBJC_CLASS_$_BranchCSSearchableItemAttributeSet in BranchCSSearchableItemAttributeSet.o
"_OBJC_METACLASS_$_CSSearchableItemAttributeSet", referenced from:
_OBJC_METACLASS_$_BranchCSSearchableItemAttributeSet in BranchCSSearchableItemAttributeSet.o ld: symbol(s) not found for
architecture x86_64 clang: error: linker command failed with exit code
1 (use -v to see invocation)
As the tutorial described, I have the Branch-SDK folder correctly added to the project, I configured the PLST, and added all the code in the AppDelegate.m. I skipped step 3 for enabling universal links, because I won't need that yet.
What am I missing that could be causing this? For this sort of error with other frameworks, it tends to be caused by incorrect declaration of the class, but I don't see where I'm doing that incorrectly.
For me within the Podfile uncommenting the following line and rerunning the installation resolved this kind of issues in XCode:
use_frameworks!
And do a
pod install
And try cleaning and running the app in XCode once again and it should work.
It worked for me.

AWS S3 SDK Linker issue

Hi I'm using the AWS SDK for a sample application. Specifically I', trying to implement an S3 bucket and object view. I've added the necessary classes, headers, and frameworks. In addition I've checked the build settings and all necessary frameworks are linked. These are the errors I get.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_AmazonClientManager", referenced from:
objc-class-ref in AddBucketViewController.o
objc-class-ref in AddObjectViewController.o
objc-class-ref in BucketList.o
objc-class-ref in ObjectListing.o
objc-class-ref in ObjectViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am one of the maintainers of the AWS SDK for iOS.
The AmazonClientManager class is something we include our samples, so it sounds like you've copied some code from our samples into your project. You'll want to make sure those files are added to the Compile Sources of the Build Phases for your project as shown in the screen shot below.

Using Library at Xcode

I had download Xenofex-MultiColumnTableViewForiOS-0b3fa88 library and plan to use it in my iOS project.
May i know what is step to import and link this library to my project? Just drag and drop the unzipped folder to my project?
I had drag the needed file to my project and try to run it.
The compiler prompt me error below
Undefined symbols for architecture i386:
"_OBJC_METACLASS_$_CALayer", referenced from:
_OBJC_METACLASS_$_EWHeaderHighlightLayer in EWHeaderHighlightLayer.o
"_OBJC_CLASS_$_CALayer", referenced from:
_OBJC_CLASS_$_EWHeaderHighlightLayer in EWHeaderHighlightLayer.o
objc-class-ref in EWMultiColumnTableView.o
"_OBJC_CLASS_$_CATransaction", referenced from:
objc-class-ref in EWMultiColumnTableView.o
"_kCATransactionDisableActions", referenced from:
-[EWMultiColumnTableView highlightColumn:] in EWMultiColumnTableView.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone advice on this?
By the look of the linker errors, you need to add the QuartzCore framework to your project. This is where the CALayer class is implemented, along with a load of other things.
There are instructions on how to do this in the top-rated answer to this SO question: Adding quartzcore to xcode 4 for iOS.

Acapela TTS engine: "Undefined symbols" in XCode for all classes

I'm trying to get started with the Acapela TTS engine for iPhone. I'm using XCode 4 and I've been following these instructions for setup:
http://www.acapela-for-iphone.com/documentation-quick-start-how-to-add-tts-in-your-app
I've added the voice, and added all the necessary files (from the api and license folders) to a group called "TTS", added them to my project's target, and imported them into one of my view controllers in the same manner as the tutorial. However, when I build I get this message:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_AcapelaLicense", referenced from:
objc-class-ref in NavigationViewController.o
"_OBJC_CLASS_$_AcapelaSpeech", referenced from:
objc-class-ref in NavigationViewController.o
objc-class-ref in AcapelaSetup.o
"_AcapelaVoiceName", referenced from:
-[AcapelaSetup SetCurrentVoice:] in AcapelaSetup.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
There are no errors for the files not being found, and when I cmd+click on on the #import statements it takes me to the relevant source code files. So how come XCode thinks the symbols are undefined?
Did you include the files libBabTTS.a and libMobilityStatic.a to your project?
Wild guess : You may check the visibility of headers on your projects build phase.

Resources