I have a metaio project for iOS that was working just fine with XCode 5. Since switching to XCode 6 for testing with iOS8 I've ran into the problem of 6 new Mach-O linker errors
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_EKEventEditViewController", referenced from:
objc-class-ref in metaioSDK(XDtLkdmsHtXjGTCxiIGVbMqenrFYqNevtLOSg)
"_OBJC_CLASS_$_EKEvent", referenced from:
objc-class-ref in metaioSDK(xhvNiLkUYIhedEvQjYEaAfH)
objc-class-ref in metaioSDK(XDtLkdmsHtXjGTCxiIGVbMqenrFYqNevtLOSg)
"_OBJC_METACLASS_$_MPMoviePlayerViewController", referenced from:
_OBJC_METACLASS_$_ASMoviePlayerViewController in metaioSDK(ASMoviePlayerViewController.o)
_OBJC_METACLASS_$_MoviePlayerViewController in metaioSDK(MoviePlayerViewController.o)
"_OBJC_CLASS_$_EKEventStore", referenced from:
objc-class-ref in metaioSDK(xhvNiLkUYIhedEvQjYEaAfH)
objc-class-ref in metaioSDK(XDtLkdmsHtXjGTCxiIGVbMqenrFYqNevtLOSg)
"_OBJC_CLASS_$_MPMoviePlayerViewController", referenced from:
_OBJC_CLASS_$_ASMoviePlayerViewController in metaioSDK(ASMoviePlayerViewController.o)
_OBJC_CLASS_$_MoviePlayerViewController in metaioSDK(MoviePlayerViewController.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The solution for me was to add three new frameworks to my build phases.
Navigate to build phases
Add the following new frameworks
MediaPlayer
EventKitUI
EventKit
Done...
Related
I have project that worked fine in Xcode4. I am trying to upgrade to Xcode 8.3. The project runs fine on iPhone 5 simulator which is 32 bit architecture. But the project fails to run on any other iPhone or iPad.
ld: warning: ignoring file /Users/myusername/Library/Developer/Xcode /DerivedData/Test-xxxxrfwxdtcybcclbezelabexxy/Build/Products/Debug-iphonesimulator/libMapView.a, file was built for archive which is not the architecture being linked (i386): /Users/myusername/Library/Developer/Xcode/DerivedData/Test-xxxxfwxdtcybcclbezelabexxy/Build/Products/Debug-iphonesimulator/libMapView.a
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_RMMapContents", referenced from:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_RMMapContents", referenced from:
objc-class-ref in TestViewController.o
"_OBJC_CLASS_$_RMDBMapSource", referenced from:
objc-class-ref in TestViewController.o
"_OBJC_CLASS_$_RMPath", referenced from:
objc-class-ref in TestViewController.o
"_OBJC_CLASS_$_RMMarkerManager", referenced from:
objc-class-ref in TestViewController.o
"_OBJC_CLASS_$_RMMarker", referenced from:
objc-class-ref in TestViewController.o
"_OBJC_CLASS_$_RMMapView", referenced from:
objc-class-ref in TestViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried adding active architecture armv7, armv8, armv6, armv7s but still does not build or run on simulators that is other than iPhone 5.
While building the Application i am getting the following error i have searched a lot but i am unable to figure out what is the problem.
ld: warning: ignoring file /Users/username/GoogleMaps/GoogleMaps.framework/GoogleMaps, missing required architecture arm64 in file /Users/username/GoogleMaps/GoogleMaps.framework/GoogleMaps (2 slices)
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GMSPolyline", referenced from:
objc-class-ref in GPSController.o
"_OBJC_CLASS_$_GMSCameraPosition", referenced from:
objc-class-ref in GPSController.o
"_OBJC_CLASS_$_GMSMutablePath", referenced from:
objc-class-ref in GPSController.o
"_OBJC_CLASS_$_GMSMarker", referenced from:
objc-class-ref in GPSController.o
"_OBJC_CLASS_$_GMSMapView", referenced from:
objc-class-ref in GPSController.o
"_OBJC_CLASS_$_GMSServices", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using GoolgeMaps SDK 1.4.3
PS:- I am relatively new to iOS programming so please avoid any blunders.
Adding value $(inherited) to BuildSettings->Linking->Other Linker Flags of your target
If you are developing an SDK/framework/POD you should do the same as above but under target name PROJECTNAME_tests.
Should fix the issue.
I had this problem too, and my solution was to add the frameworks to
Target -> Build Phases -> Link Binary With Libraries
ok I figured out the Problem
My Library was not built for 64-bit but i was trying to use that settings for my app, after i removed arm64 from architecture i successfully build the application.
I have built a cocoa framework via XCode 6.1.1, also created a universal version of the framework, then when I import the framework into a project, an compiling error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_UIResponder", referenced from:
_OBJC_CLASS_$_AppDelegate in AppDelegate.o
"_OBJC_METACLASS_$_UIResponder", referenced from:
_OBJC_METACLASS_$_AppDelegate in AppDelegate.o
"_UIApplicationMain", referenced from:
_main in main.o
"_OBJC_METACLASS_$_UIViewController", referenced from:
_OBJC_METACLASS_$_ViewController in ViewController.o
"_OBJC_CLASS_$_UIViewController", referenced from:
_OBJC_CLASS_$_ViewController in ViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Wonder to know why?
And how to analyse the cause of the problem?
You have to add the armv7 architecture to your framework before building it.
Because the project where you use the framework in has this architecture.
You also can check the path to the framework (framework search-path)
I need some assistance. I added Parse SDK and it works fine during testing. When I attempt to build it, it gives me four 'Apple Mach-O Linker' errors:
ld: warning: ignoring file
/Users/Amirhosein/Downloads/ParsePlatform-PushTutorial-63133fb/iOS/Parse.framework/Parse,
missing required architecture arm64 in file
/Users/Amirhosein/Downloads/ParsePlatform-PushTutorial-63133fb/iOS/Parse.framework/Parse
(3 slices) Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_PFPush", referenced from:
objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_PFInstallation", referenced from:
objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_Parse", referenced from:
objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code
1 (use -v to see invocation)
It sounds as if your library is not built for 64-bit iOS but you're trying to use that setting for your app. Try removing arm64 from the architecture entry in your build settings.
Cleaning the code and then building again solve the problem for me!
When i am trying to implement share through AddPlus , following error displayed. what can i do? Anybody knows?
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_Facebook", referenced from:
objc-class-ref in libAddThis.a(ATFacebook.o)
"_OBJC_CLASS_$_ATReachability", referenced from:
objc-class-ref in libAddThis.a(ATGenericUtility.o)
"_OBJC_CLASS_$_SBJSON", referenced from:
objc-class-ref in libAddThis.a(ATTwitter.o)
objc-class-ref in libAddThis.a(ATWebServiceAPI.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Have you checked all your frameworks are properly referenced ? if I am not mistaken the following are required for addThis:
Security.framework,
CoreData.framework,
SystemConfiguration.framework,
MessageUI.framework,
Twitter.framework,
the following are needed for the new facebook SDK also set them as optional for versions prior to ios6
Social.framework,
AdSupport.framework,
Accounts.framework