I'm trying to use the amazon AWS for iOS SDK but I keep getting several Apple Mach-O Linker errors in Xcode 6.1.1, this error happened when i'm trying to use iOS simulator iPhone 5s but it works fine on 4s simulator. Any help would be much appreciate.
AWS Framework I'm using is AWSiOSSDK v 1.7.0
ld: warning: ignoring file
/Users/xxx/Downloads/xxxios_app/FacebookSDK.framework/FacebookSDK,
missing required architecture x86_64 in file
/Users/xxx/Downloads/xxx_ios_app/FacebookSDK.framework/FacebookSDK (3
slices) ld: warning: ignoring file
/Users/xxx/Downloads/xxx_ios_app/AWSiOSSDK.framework/AWSiOSSDK,
missing required architecture x86_64 in file
/Users/xxx/Downloads/xxx_ios_app/AWSiOSSDK.framework/AWSiOSSDK (3
slices) Undefined symbols for architecture x86_64:
"_OBJC_CLASS$AmazonEndpoints", referenced from: objc-class-ref in
LoginViewController.o objc-class-ref in PhotoViewController.o
"_OBJC_CLASS$AmazonErrorHandler", referenced from: objc-class-ref in
LoginViewController.o objc-class-ref in PhotoViewController.o
"_OBJC_CLASS$AmazonLogger", referenced from: objc-class-ref in
LoginViewController.o objc-class-ref in PhotoViewController.o
"_OBJC_CLASS$AmazonS3Client", referenced from: objc-class-ref in
LoginViewController.o objc-class-ref in PhotoViewController.o
"_OBJC_CLASS$FBNativeDialogs", referenced from: objc-class-ref in
LoginViewController.o "_OBJC_CLASS$_FBRequestConnection", referenced
from: objc-class-ref in LoginViewController.o objc-class-ref in
PhotoViewController.o
https://stackoverflow.com/a/3949338/2245240
This happens when you add a framework to your project and unintentionally copy the framework into your project directory.
The fix is to check your project directory (where you store your project on disk) for any iphone SDK *.Framework files and delete them.
Project will build fine afterwards.
Related
I have an app in iOS 7 and iOS 8. Now, I have adapted the app for watchOS 2 and iOS 9. I can't run the app in iOS 7 because I get some problems with pods in some clases. I have this error:
Undefined symbols for architecture armv7:
"_kPOPViewBounds", referenced from:
-[HomeFiltersCollectionViewManager animateAlphaToView:withDelay:bounds:] in HomeFiltersCollectionViewManager.o
"_AFQueryStringFromParametersWithEncoding", referenced from:
-[MNBBaseNetworkService requestWithMethod:path:parameters:] in MNBBaseNetworkService.o
"_OBJC_CLASS_$_AFImageCache", referenced from:
l_OBJC_$_CATEGORY_AFImageCache_$_AlternativeImageCacheForAFNetworking in AFImageCache+AlternativeImageCacheForAFNetworking.o
"_OBJC_CLASS_$_SDWebImageDownloader", referenced from:
objc-class-ref in MNPoiListDownloader.o
objc-class-ref in UIImageView+Blurred.o
objc-class-ref in MNBNotificablePoiList.o
"_OBJC_CLASS_$_SDWebImageManager", referenced from:
objc-class-ref in CampaingProvider.o
objc-class-ref in UIImageView+Blurred.o
objc-class-ref in IPadHomeViewController.o
objc-class-ref in IPadDestinationLandingCollectionViewManager.o
and many more...
I also have these warnings: (for example)
ld: warning: ignoring file /Users/../Library/Developer/Xcode/DerivedData/../Build/Products/Debug-iphoneos/libPods-AFNetworking.a, file was built for archive which is not the architecture being linked (armv7): /Users/../Library/Developer/Xcode/DerivedData/..b/Build/Products/Debug-iphoneos/libPods-AFNetworking.a
ld: warning: ignoring file `/Users/../Library/Developer/Xcode/DerivedData/../Build/Products/Debug-iphoneos/libPods-ARAnalytics.a, file was built for archive which is not the architecture being linked (armv7): /Users/../Library/Developer/Xcode/DerivedData/../Build/Products/Debug-iphoneos/libPods-ARAnalytics.a`
any a lot of more..
Anyone knows why I have this problems? I have tried with a test app and Everything works fine with WatchOS and Pods and iOS 7
Our phonegap app builds fine for the iphone simulator but generates linker errors when building the app on an iphone. the only thing that changed was installing testflight and a test app.
We already removed testflight and the test app, but the linker errors remain.
Any ideas on how to fix this?
We're on xcode 6.2 and ordova 3.4.0
Errors:
ld: warning: ignoring file /Users/gusph/Library/Developer/Xcode/DerivedData/momitSHDApp-evgpydfzbrlcmzazjhmquxttnqnq/Build/Products/Debug-iphoneos/libCordova.a, file was built for archive which is not the architecture being linked (arm64): /Users/gusph/Library/Developer/Xcode/DerivedData/momitSHDApp-evgpydfzbrlcmzazjhmquxttnqnq/Build/Products/Debug-iphoneos/libCordova.a
Undefined symbols for architecture arm64:
"_CDVPageDidLoadNotification", referenced from:
-[CDVSplashScreen pluginInitialize] in CDVSplashScreen.o
"_OBJC_CLASS_$_CDVWebViewDelegate", referenced from:
objc-class-ref in CDVInAppBrowser.o
"_OBJC_CLASS_$_CDVInvokedUrlCommand", referenced from:
objc-class-ref in CDVFile.o
"_CDVLocalNotification", referenced from:
-[AppDelegate application:didReceiveLocalNotification:] in AppDelegate.o
"_OBJC_CLASS_$_CDVViewController", referenced from:
_OBJC_CLASS_$_MainViewController in MainViewController.o
objc-class-ref in CDVDevice.o
objc-class-ref in CDVFile.o
"_OBJC_METACLASS_$_CDVCommandDelegateImpl", referenced from:
_OBJC_METACLASS_$_MainCommandDelegate in MainViewController.o
"_OBJC_CLASS_$_CDVUserAgentUtil", referenced from:
objc-class-ref in CDVInAppBrowser.o
"_OBJC_CLASS_$_CDVCommandQueue", referenced from:
_OBJC_CLASS_$_MainCommandQueue in MainViewController.o
"_OBJC_CLASS_$_CDVPlugin", referenced from:
_OBJC_CLASS_$_NotificationsNode in NotificationsNode.o
_OBJC_CLASS_$_CDVConnection in CDVConnection.o
_OBJC_CLASS_$_CDVCamera in CDVCamera.o
_OBJC_CLASS_$_CDVBattery in CDVBattery.o
_OBJC_CLASS_$_CDVLogger in CDVLogger.o
_OBJC_CLASS_$_CDVContacts in CDVContacts.o
_OBJC_CLASS_$_CDVDevice in CDVDevice.o
...
"_OBJC_METACLASS_$_CDVViewController", referenced from:
_OBJC_METACLASS_$_MainViewController in MainViewController.o
"_OBJC_METACLASS_$_CDVCommandQueue", referenced from:
_OBJC_METACLASS_$_MainCommandQueue in MainViewController.o
"_CDVPluginHandleOpenURLNotification", referenced from:
-[AppDelegate application:handleOpenURL:] in AppDelegate.o
-[CDVInAppBrowser openInSystem:] in CDVInAppBrowser.o
"_OBJC_CLASS_$_CDVCommandDelegateImpl", referenced from:
_OBJC_CLASS_$_MainCommandDelegate in MainViewController.o
"_OBJC_CLASS_$_CDVPluginResult", referenced from:
objc-class-ref in NotificationsNode.o
objc-class-ref in CDVConnection.o
objc-class-ref in CDVCamera.o
objc-class-ref in CDVBattery.o
objc-class-ref in CDVContacts.o
objc-class-ref in CDVDevice.o
objc-class-ref in CDVAccelerometer.o
...
"_OBJC_METACLASS_$_CDVPlugin", referenced from:
_OBJC_METACLASS_$_NotificationsNode in NotificationsNode.o
_OBJC_METACLASS_$_CDVConnection in CDVConnection.o
_OBJC_METACLASS_$_CDVCamera in CDVCamera.o
_OBJC_METACLASS_$_CDVBattery in CDVBattery.o
_OBJC_METACLASS_$_CDVLogger in CDVLogger.o
_OBJC_METACLASS_$_CDVContacts in CDVContacts.o
_OBJC_METACLASS_$_CDVDevice in CDVDevice.o
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This linker error message is the key:
.../libCordova.a, file was built for archive which is not the architecture being linked (arm64)
Static and dynamic libraries under OSX and iOS are fat in that they can hold code for multiple CPU architectures. That library doesn't have the arm64 architecture and therefore cannot be used.
The solution is to get a version that does support arm64. If you are building that library then you are not including the CPU architecture when building it.
From this link:
This means that starting at that time, Cordova-based apps
should be built using a version of Cordova that has 64-bit iOS support.
The first version of Cordova to include 64-bit for iOS is 3.4.1.
Therefore, to meet these requirements of the Apple App Store, you should be
using at least version 3.4.1 of Cordova before this February deadline.
Make sure you are using a version of Cordova that has the 64bit architecture built in. You appear to be currently using one without (an old version).
remove arm64 from Valid Architectures of CordovaLib Targets,
Also set 'NO' to Build Active Architecture Only,
Make same settings to Main app.
I am trying to archive my First iOS Project and I get the following errors. It seems like there is something bugged with the Facebook SDK and Google Plus SDK which i have used for Authentication. I have come across similar questions on stackoverflow but none's solutions helped me. Any help would be appreciated. Thanks in advance.
<pre>
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in LoginViewController.o
"_OBJC_CLASS_$_GTMLogger", referenced from:
objc-class-ref in LoginViewController.o
"_OBJC_CLASS_$_GTLQueryPlus", referenced from:
objc-class-ref in LoginViewController.o
"_kGTLAuthScopePlusLogin", referenced from:
-[LoginViewController getInfoForGoogle] in LoginViewController.o
"_OBJC_CLASS_$_GTLServicePlus", referenced from:
objc-class-ref in LoginViewController.o
"_OBJC_CLASS_$_GPPURLHandler", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_GPPSignIn", referenced from:
objc-class-ref in LoginViewController.o
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in AppDelegate.o
objc-class-ref in LoginViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
</pre>
The framework you are using is not arm64 ready, ie not for 64bit devices, you can either check if an updated framework is available, or exclude arm64 that from your build
Set the architecture in build settings to Standard architectures(armv7,armv7s)
Xcode 5 and iOS 7: Architecture and Valid architectures
Trying to build a universal 32/64-bit binary with the Google Cast framework (2.0 from here) produces this warning and several linker errors:
ld: warning: ignoring file [...]GoogleCast.framework/GoogleCast,
missing required architecture x86_64 in file
[...]GoogleCast.framework/GoogleCast (3 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GCKDeviceManager", referenced from:
objc-class-ref in GoogleCastDeviceController.o
"_OBJC_CLASS_$_GCKDeviceScanner", referenced from:
objc-class-ref in GoogleCastDeviceController.o
"_OBJC_CLASS_$_GCKImage", referenced from:
objc-class-ref in GoogleCastDeviceController.o
"_OBJC_CLASS_$_GCKMediaControlChannel", referenced from:
objc-class-ref in GoogleCastDeviceController.o
"_OBJC_CLASS_$_GCKMediaInformation", referenced from:
objc-class-ref in GoogleCastDeviceController.o
"_OBJC_CLASS_$_GCKMediaMetadata", referenced from:
objc-class-ref in GoogleCastDeviceController.o
"_kGCKMetadataKeySubtitle", referenced from: [...]
ld: symbol(s) not found for architecture x86_64
Google was about three months late adding 64-bit support for Analytics, so I'm wondering if they've delayed the release of a 64-bit Cast framework as well.
Has anyone successfully built a 64-bit binary with this framework?
Per the release notes for 2.1.0.529 (released 3/25/2014):
64-bit builds are now fully supported
I updated the Google Cast framework in my project and was able to deploy to iPad Air and iPhone 5S.
The latest framework is available here (direct link).
I'm using Cocoapod to get Global Lib. It works fine in the simulator, but it has some error when I build on my device:
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in HomeViewController.o
"_OBJC_CLASS_$_SBJsonParser", referenced from:
objc-class-ref in IQRequest.o
"_AFNetworkingOperationFailingURLResponseErrorKey", referenced from:
___78-[IQRequest performQueueOperationWithRequest:withSuccessBlock:andFailedBlock:]_block_invoke39 in IQRequest.o
"_OBJC_CLASS_$_AFHTTPRequestOperation", referenced from:
objc-class-ref in IQRequest.o
"_OBJC_CLASS_$_AFHTTPClient", referenced from:
objc-class-ref in IQRequest.o
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in ChooseDesignerViewController.o
objc-class-ref in IQUser.o
objc-class-ref in IQAppDelegate.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What has happened to my project?
It seems like your library isn't compiled for armv7s. If it's distributed as binary you'll have to ask the maintainer to rebuild it with an armv7s slice. If it's distributed as source code you have to check the projects build settings. I think you should look for valid architectures or something like that.