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".
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 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
I am a beginner in iOS app development. I am currently working on a project that needs to be changed from Parse to Firebase`.
I installed cocoa pods and "firebase/core" pod as firebase site instructed.
Imported firebase.h in appdelegate.h
Added [FIRApp configure]; in 'didfinishlaunchingwithoptions'
Added 'googleservice-info.plist' in project.
After doing these steps, I ran the build but it failed with following errors (Screen Shot)
Showing Recent Issues
Ld /Users/../Build/Products/Debug-iphonesimulator/Example.app/Example
Apple Mach-O Linker Error Group
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FBAppCall", referenced from:
objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_FBTokenInformationExpirationDateKey", referenced from:
-[PFFacebookTokenCachingStrategy cacheTokenInformation:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy expirationDate] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setExpirationDate:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_CLASS_$_PFFacebookTokenCachingStrategy in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_FBTokenInformationUserFBIDKey", referenced from:
-[PFFacebookTokenCachingStrategy facebookId] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setFacebookId:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationTokenKey", referenced from:
-[PFFacebookTokenCachingStrategy accessToken] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setAccessToken:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.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 know this has something to do with the parse code in my project but I don't have much knowledge in Parse or in Firebase.
Please help me with this error and guide me how to successfully migrate from Parse to Firebase.
If you used Parse SDK, just make sue you delete ParseFacebookUtils.framework library from your project or from your podfile remove
pod 'Parse'
pod 'ParseFacebookUtilsV4'
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.
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...