XCODE 6.1.1 Framework issue - ios

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)

Related

GoogleMaps for iOS Linker Error

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.

Bluetooth Related Linker Errors in XCode 6.1.1

I'm relatively new to iOS development. I'm not sure what to do about resolving the following errors that I believe are due to referencing a bluetooth library. What can I do to debug/fix this?
Undefined symbols for architecture armv7:
"_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
_nclSStartScan in libNCLiOS.a(nclCb.o)
"_CBAdvertisementDataManufacturerDataKey", referenced from:
-[Boss centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in libNCLiOS.a(nclCb.o)
"_OBJC_CLASS_$_CBUUID", referenced from:
objc-class-ref in libNCLiOS.a(nclCb.o)
"_OBJC_CLASS_$_CBCentralManager", referenced from:
objc-class-ref in libNCLiOS.a(nclCb.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I haven't done Bluetooth related development on IOS but the messages might be related to the missing Bluetooth framework in the project files.
Have you added them ?
IOBluetooth.framework
IOBluetoothUI.framework

Apple Mach-O : Undefined symbols for architecture i386: in PhoneGap Cordova 2.9.1

I am new in phonegap app development in iOS. After adding CordovaLib.xcodeproj in my xcode project, I made architecture changes in buildsettings as suggested here. Other linker flag is -all_load and -Obj-C When I build the project, I get Apple Mach-O linker errors described below. I have not mentioned i386 anywhere in my build settings. How do I negate this error?
Undefined symbols for architecture i386:
"_CDVPluginHandleOpenURLNotification", referenced from:
-[AppDelegate application:handleOpenURL:] in AppDelegate.o
"_OBJC_CLASS_$_CDVPlugin", referenced from:
_OBJC_CLASS_$_LoginPlugin in LoginPlugin.o
"_OBJC_CLASS_$_CDVPluginResult", referenced from:
objc-class-ref in LoginPlugin.o
"_OBJC_CLASS_$_CDVViewController", referenced from:
_OBJC_CLASS_$_MainViewController in MainViewController.o
"_OBJC_METACLASS_$_CDVPlugin", referenced from:
_OBJC_METACLASS_$_LoginPlugin in LoginPlugin.o
"_OBJC_METACLASS_$_CDVViewController", referenced from:
_OBJC_METACLASS_$_MainViewController in MainViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

symbol(s) not found for architecture armv7

I am integrate LinkedInIOS Login Demo with my current application from:
https://github.com/jeyben/IOSLinkedInAPI
Also add supporting classes of "AFNetworking".
And It's gives me an error as mention below:
Undefined symbols for architecture armv7:
"_kUTTagClassMIMEType", referenced from:
_AFContentTypeForPathExtension in AFURLRequestSerialization.o
"_kUTTagClassFilenameExtension", referenced from:
_AFContentTypeForPathExtension in AFURLRequestSerialization.o
"_UTTypeCreatePreferredIdentifierForTag", referenced from:
_AFContentTypeForPathExtension in AFURLRequestSerialization.o
"_UTTypeCopyPreferredTagWithClass", referenced from:
_AFContentTypeForPathExtension in AFURLRequestSerialization.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please suggest me any solution about it. My deployment target was 5.0.
That problem was resolved. As possible issue for that kind of problem was shown at below question:
https://stackoverflow.com/questions/6429494/...
But in my case I need to add MobileCoreServices.framework
By adding this framework problem was resolved.
Thanks.

Apple Mach-O Linker Error With Parse

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!

Resources