I am trying to add Square Reader SDK to the project. The valid architectures are arm64, armv7, armv7s, armv6 and x86. I can run the application on the simulators and physical devices, but when i try to archive the project i am facing with this error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_SQRDCheckoutParameters", referenced from:
objc-class-ref in PaymentMethodsViewController-817472c7033dfbe61688dbd48500041c161a14c9d0f9a59a4ed634edaa3b0f80.o
"_OBJC_CLASS_$_SQRDCheckoutController", referenced from:
objc-class-ref in PaymentMethodsViewController-817472c7033dfbe61688dbd48500041c161a14c9d0f9a59a4ed634edaa3b0f80.o
"_OBJC_CLASS_$_SQRDReaderSettingsController", referenced from:
objc-class-ref in SettingsViewController.o
"_OBJC_CLASS_$_SQRDMoney", referenced from:
objc-class-ref in PaymentMethodsViewController-817472c7033dfbe61688dbd48500041c161a14c9d0f9a59a4ed634edaa3b0f80.o
"_OBJC_CLASS_$_SQRDReaderSDK", referenced from:
objc-class-ref in Helper.o
objc-class-ref in AppDelegate.o
objc-class-ref in SettingsViewController.o
objc-class-ref in PaymentMethodsViewController-817472c7033dfbe61688dbd48500041c161a14c9d0f9a59a4ed634edaa3b0f80.o
objc-class-ref in SplashViewController.o
ld: symbol(s) not found for architecture armv7
I added libraries in the Link Binary With Libraries section of the Build Phases.
What worked for me is to set the target (General > Deployment info) to 11.x
Related
This question already has answers here:
Getting "ld: symbol(s) not found for architecture x86_64 clang" on one of nearly identicals machines
(2 answers)
Closed 5 months ago.
I have built a react native app that runs fine in android.....but when I try to build in ios I get the following error: Undefined symbols for architecture x86_64
It appears to be linked in some way to flipper, as the detailed errors are as below:
link with file built for iOS Simulator-arm64
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FlipperKitNetworkPlugin", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FlipperKitReactPlugin", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_SKDescriptorMapper", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FlipperClient", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_RNCPushNotificationIOS", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FlipperKitLayoutPlugin", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_RCTRootView", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_RCTBridge", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_SKIOSNetworkAdapter", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_RCTBundleURLProvider", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FIRApp", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FKUserDefaultsPlugin", referenced from:
objc-class-ref in AppDelegate.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 had the same problem on m1, doing this helped me solve the problem:
Modify the Build Settings -> Excluded Architectures option, add the Any iOS Simulator SDK option, and set the value to arm64.As shown in the figure:
and add the following code in Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
end
end
end
I am trying to integrate Stripe with Xcode using Swift. I installed the podfile for Stripe and imported #import "Stripe.h" to my bridging file. All of other files in the bridge file work fine except Stripe. This is the error that i get when i initialize Stripe.setDefaultPublishableKey(""):
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_Stripe", referenced from:
type metadata accessor for ObjectiveC.Stripe in AppDelegate.o
"_OBJC_CLASS_$_STPPaymentCardTextField", referenced from:
objc-class-ref in STPCheckoutView.o
"_OBJC_CLASS_$_STPAPIClient", referenced from:
objc-class-ref in STPCheckoutView.o
"_OBJC_CLASS_$_STPCard", referenced from:
objc-class-ref in STPCheckoutView.o
"_StripeDomain", referenced from:
-[STPCheckoutView createToken:] in STPCheckoutView.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any help would be much appreciated.
Recently I've decided to integrate GCM to my project that already uses Google Protocol Buffers. Everything worked fine, sample was OK. But when I've tried to integrate GCM via CocoaPods to my project - I started receiving build errors:
Undefined symbols for architecture x86_64:
"_GSDK_PBLogicalRightShift32", referenced from:
_SerializedSize in libGcmLib.a(GCMSecureSocket.o)
"_OBJC_CLASS_$_GSDK_PBCodedOutputStream", referenced from:
objc-class-ref in libGcmLib.a(GCMSecureSocket.o)
"_OBJC_CLASS_$_GSDK_PBDescriptor", referenced from:
objc-class-ref in libGcmLib.a(GtalkCore.pb.o)
objc-class-ref in libGcmLib.a(GtalkExtensions.pb.o)
"_OBJC_CLASS_$_GSDK_PBGeneratedMessage", referenced from:
_OBJC_CLASS_$_GtalkHeartbeatPing in libGcmLib.a(GtalkCore.pb.o)
_OBJC_CLASS_$_GtalkHeartbeatAck in libGcmLib.a(GtalkCore.pb.o)
_OBJC_CLASS_$_GtalkErrorInfo in libGcmLib.a(GtalkCore.pb.o)
_OBJC_CLASS_$_GtalkSetting in libGcmLib.a(GtalkCore.pb.o)
_OBJC_CLASS_$_GtalkLoginRequest in libGcmLib.a(GtalkCore.pb.o)
_OBJC_CLASS_$_GtalkLoginResponse in libGcmLib.a(GtalkCore.pb.o)
_OBJC_CLASS_$_GtalkClose in libGcmLib.a(GtalkCore.pb.o)
...
"_OBJC_CLASS_$_GSDK_PBRootObject", referenced from:
_OBJC_CLASS_$_GtalkGtalkCoreRoot in libGcmLib.a(GtalkCore.pb.o)
_OBJC_CLASS_$_GtalkGtalkExtensionsRoot in libGcmLib.a(GtalkExtensions.pb.o)
"_OBJC_METACLASS_$_GSDK_PBGeneratedMessage", referenced from:
_OBJC_METACLASS_$_GtalkHeartbeatPing in libGcmLib.a(GtalkCore.pb.o)
_OBJC_METACLASS_$_GtalkHeartbeatAck in libGcmLib.a(GtalkCore.pb.o)
_OBJC_METACLASS_$_GtalkErrorInfo in libGcmLib.a(GtalkCore.pb.o)
_OBJC_METACLASS_$_GtalkSetting in libGcmLib.a(GtalkCore.pb.o)
_OBJC_METACLASS_$_GtalkLoginRequest in libGcmLib.a(GtalkCore.pb.o)
_OBJC_METACLASS_$_GtalkLoginResponse in libGcmLib.a(GtalkCore.pb.o)
_OBJC_METACLASS_$_GtalkClose in libGcmLib.a(GtalkCore.pb.o)
...
"_OBJC_METACLASS_$_GSDK_PBRootObject", referenced from:
_OBJC_METACLASS_$_GtalkGtalkCoreRoot in libGcmLib.a(GtalkCore.pb.o)
_OBJC_METACLASS_$_GtalkGtalkExtensionsRoot in libGcmLib.a(GtalkExtensions.pb.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've assumed that this is because GCM library has ProtocolBuffers in it and it is conflicting with my Protobuf sources that I've got from here:
https://github.com/google/protobuf/tree/master/objectivec
I've also tried to build for the device and as a result receive similar error - with armv7 instead of x86_64. Also I must say, that sample project works fine, so I think that Protobuf is that main issue here.
Still, I have no idea how this could be resolved. Any thoughts?
Check if the architecture of libGcmLib.a and your target build architecture are the same.
You can check the architecture of .a file with command
otool -hv libGcmLib.a
Apprarently following objects are not built against x86_64 architecture.
GCMSecureSocket.o
GtalkCore.pb.o
...
How do you build libGcmLib.a static lib ? Review it.
Have this Error, plese send me code correct thanks
Loook code debug: http://textsnip.com/3jrghq (copy/pasted code below:)
symbols for architecture arm64:
"_OBJC_CLASS_$_PFUser", referenced from: objc-class-ref in LoginViewController.o
"_OBJC_CLASS_$_PFPush", referenced from: objc-class-ref in ParseExampleAppDelegate.o
"_OBJC_CLASS_$_PFInstallation", referenced from: objc-class-ref in ParseExampleAppDelegate.o
"_OBJC_CLASS_$_PFQuery", referenced from: objc-class-ref in ViewController.o
objc-class-ref in ParseExampleViewController.o
objc-class-ref in Buongiorno.o
objc-class-ref in ParseImageViewController.o
objc-class-ref in Compleanno.o
objc-class-ref in Buonanotte.o
"_OBJC_CLASS_$_Parse", referenced from: objc-class-ref in ParseExampleAppDelegate.o
(maybe you meant: _OBJC_CLASS_$_ParseImageViewController, _OBJC_CLASS_$_ParseExampleViewController , _OBJC_CLASS_$_ParseExampleAppDelegate , _OBJC_CLASS_$_ParseExampleCell )
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks
If can please write code correct
Which version of Parse are you using? arm64 support was not included until v1.2.15 and you are trying to include it in an arm64 binary. I'd update the library version or just run it in the non-64 bit simulator.
Now the framework has been updated. You can have solutions of this warnings.
Just download the latest framework from this Link.
As of 1st Feb 2015, apple will not approve the apps without supporting architecture arm64.
In order to work this for parse, you have to update the framework.
This works for me. Hope it help someone else also.
Thanks...
I'm trying to build the NewsYC iOS app. I can get it to work in the simulator, but when I target my iPhone 5 I get an undefined symbols errors. I'm pretty new to XCode and Objective C so I'm not really sure how to resolve this. I've done some reading about this error in terms of other projects and have the libHNKit linked in the build phases. Not really sure what else needs to happen to correct this.
This is the error:
ld: warning: ignoring file /Users/stephenwalker/Library/Developer/Xcode/DerivedData/newsyc-gidnwqwyaspbjdevgkudlemjssmd/Build/Products/Debug-iphoneos/libHNKit.a, file was built for archive which is not the architecture being linked (armv7): /Users/stephenwalker/Library/Developer/Xcode/DerivedData/newsyc-gidnwqwyaspbjdevgkudlemjssmd/Build/Products/Debug-iphoneos/libHNKit.a
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_HNAnonymousSession", referenced from:
objc-class-ref in SessionListController.o
"_OBJC_CLASS_$_HNSessionAuthenticator", referenced from:
objc-class-ref in HackerNewsLoginController.o
"_OBJC_CLASS_$_HNNetworkActivityController", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_HNAPISearch", referenced from:
objc-class-ref in SearchController.o
"_OBJC_CLASS_$_HNSession", referenced from:
objc-class-ref in HackerNewsLoginController.o
"_OBJC_CLASS_$_HNSessionController", referenced from:
objc-class-ref in MainTabBarController.o
objc-class-ref in SessionProfileController.o
objc-class-ref in AppDelegate.o
objc-class-ref in HackerNewsLoginController.o
objc-class-ref in SessionListController.o
"_OBJC_CLASS_$_HNObjectBodyRenderer", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_HNSubmission", referenced from:
objc-class-ref in CommentListController.o
objc-class-ref in EntryReplyComposeController.o
objc-class-ref in SubmissionTextComposeController.o
objc-class-ref in SubmissionURLComposeController.o
"_OBJC_CLASS_$_HNEntryList", referenced from:
objc-class-ref in MainTabBarController.o
objc-class-ref in MoreController.o
objc-class-ref in ProfileController.o
objc-class-ref in SessionProfileController.o
"_OBJC_CLASS_$_HNEntry", referenced from:
objc-class-ref in CommentListController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
After doing git submodule init; git submodule update from Terminal, select HNKit.xcocdeproj in the newsyc project's file navigator. Then click "Build Settings", and then you should see "Multiple Values" next to "Build Active Architecture Only". Click that and set it to "NO".