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

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.

Related

react-native-intercom throws cryptic error - Undefined symbols for architecture x86_64

I am using react-native-intercom plugin along with latest intercom ios library using manual linking.
The project is building fine till linking stage and then throws this error.
I have done all the steps described in the intercom manual linking process including adding the strip frameworks script as run script phase in build settings.
This is the error message it throws.
undef: _OBJC_CLASS_$_ICMCompany
undef: _OBJC_CLASS_$_ICMUserAttributes
undef: _IntercomUnreadConversationCountDidChangeNotification
undef: _OBJC_CLASS_$_Intercom
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ICMCompany", referenced from:
objc-class-ref in libRNIntercom.a(IntercomUserAttributesBuilder.o)
"_OBJC_CLASS_$_ICMUserAttributes", referenced from:
objc-class-ref in libRNIntercom.a(IntercomUserAttributesBuilder.o)
"_IntercomUnreadConversationCountDidChangeNotification", referenced
from:
___48-[IntercomEventEmitter handleUpdateUnreadCount:]_block_invoke in libRNIntercom.a(IntercomEventEmitter.o)
-[IntercomEventEmitter constantsToExport] in libRNIntercom.a(IntercomEventEmitter.o)
-[IntercomEventEmitter supportedEvents] in libRNIntercom.a(IntercomEventEmitter.o)
-[IntercomEventEmitter startObserving] in libRNIntercom.a(IntercomEventEmitter.o)
"_OBJC_CLASS_$_Intercom", referenced from:
objc-class-ref in AppDelegate.o
(maybe you meant: _OBJC_CLASS_$_IntercomUserAttributesBuilder,
_OBJC_CLASS_$_IntercomWrapper , _OBJC_CLASS_$_IntercomEventEmitter )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
I presume its something do with the framework architectures supported by the project but I am a novice on iOS builds and don't have a clue as to how to fix this.
During the Intercom installation there is a step to add a "Run Script Phase":
bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Intercom.framework/strip-frameworks.sh"
You need to make sure this phase is actually being executed.
Try using an invalid path e.g. /Intercom.framework/foo/strip-frameworks.sh, and if the build process does not error due to the above change, then there are issues elsewhere and you need make sure you have followed the other installation steps correctly.
As long as this script runs it will strip the framework correctly.
Took me a while too but I was able to debug it this way and eventually got it working with 12.3.0.
I solved the issue by deleting the Intercom framework from Xcode and installed again from pod file
target :"YourTargetName"do
pod 'Intercom'
end

Undefined symbols for architecture x86_64 in iOS project

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.

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.

Podfile error: Undefined Symbols for Architecture arm64

I updated my cocoapods version to 1.0 and am now getting a slew of errors regarding architecture. This is what my errors look like:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_Reachability", referenced from:
objc-class-ref in ReachabilityManager.o
(maybe you meant: _OBJC_CLASS_$_ReachabilityManager)
"_OBJC_CLASS_$_PBJVision", referenced from:
objc-class-ref in NewSpinViewController.o
"_PBJVisionPhotoImageKey", referenced from:
-[NewSpinViewController vision:capturedPhoto:error:] in NewSpinViewController.o
"_kReachabilityChangedNotification", referenced from:
-[NoInternetViewController viewDidLoad] in NoInternetViewController.o
"_PBJVisionPhotoThumbnailKey", referenced from:
-[NewSpinViewController vision:capturedPhoto:error:] in NewSpinViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've spent hours trying to fix this by toggling settlings under build settings but nothing is working for me.
This is what I currently have for my Architectures
Anyone have any ideas?
Try this: delete derived data and compile again. Sometimes the pod libraries simply don't get compiled even you cleaned the project, this happened to me when I updated to cocoapods 1.0.1.

iOS Paypal SDK Integration Compilation issues

I'm trying to get Paypal's iOS SDK working. I have followed the instructions in the readme but the build fails with the error below
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_NSExtensionItem", referenced from:
objc-class-ref in libPayPalMobile.a(OnePasswordExtension.o)
"_OBJC_CLASS_$_NSItemProvider", referenced from:
objc-class-ref in libPayPalMobile.a(OnePasswordExtension.o)
"_kUTTypePropertyList", referenced from:
-[OnePasswordExtension processExtensionItem:completion:] in libPayPalMobile.a(OnePasswordExtension.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This same error occurs when building the sample application, so I have ruled out my project settings.
Can anybody tell me what I've missed?
add the path of the library in the "Library Search Path"
$(PROJECT_DIR)/XXXX/MyFramework/GoogleAdWords
EDIT : Maybe the sample is wrong ...
This was down to the new version of the Paypal API requiring Xcode 6, while I was attempting to compile on Xcode 5.

Resources