Xcode error when I add a framework - objective-c

When I just add a .framework to the "Link Binary With Libraries" list by dragging it from the Project Navigator to the tab I get an error.
My error...
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_UAPush", referenced from:
objc-class-ref in KinveyKit(KCSPush.o)
"_OBJC_CLASS_$_UAirship", referenced from:
objc-class-ref in KinveyKit(KCSPush.o)
"_UAirshipTakeOffOptionsAirshipConfigKey", referenced from:
-[KCSPush initializeUrbanAirshipWithOptions:error:] in KinveyKit(KCSPush.o)
"_logging", referenced from:
-[KCSPush application:didReceiveRemoteNotification:] in KinveyKit(KCSPush.o)
(maybe you meant: _OBJC_IVAR_$_KCSLogManager._loggingState, _OBJC_IVAR_$_FBLogger._loggingBehavior )
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
When I remove the .framework, the app runs without errors.
Also when I look inside my Headers folder inside Kinvey.framework, I see header files with red names. Does that have anything to do with the problem perhaps?
Why is this happening??

UAPush = Urban Airship Push.
Add libUAirship.a to your project.
Here you can download lib.
Complete Documentation about urban Airship push
Also checkout this urban Airship common error

Related

AWS IOS SDK 1.7.0 -> Undefined symbols for architecture armv7s:

I'm trying to use the amazon AWS for iOS SDK but I keep getting several Apple Mach-O Linker errors in Xcode 5.0.1
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_S3CreateBucketRequest", referenced from:
objc-class-ref in CreationViewController.o
"_OBJC_CLASS_$_S3Region", referenced from:
objc-class-ref in CreationViewController.o
"_OBJC_CLASS_$_AmazonEndpoints", referenced from:
objc-class-ref in CreationViewController.o
"_OBJC_CLASS_$_AmazonS3Client", referenced from:
objc-class-ref in CreationViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I went into the build phases and made sure the AWSES.framework is included in link binary with libraries. In the compile sources CreationViewController.m is also included.
Target Memberships also seem to be correct. What else can I do?
I had the same problem. My solution was to delete the AWSRuntime.framework and the AWSS3.framework from the project. I then went back to the Amazon site to re-download the aws-ios-sdk-1.6.1. Using the Build Phase -> Link Binary Libraries (+) button I added the fresh frameworks back to the Xcode project and it ran with no problems. I had moved the project from Dropbox to a loaner and back again via Dropbox after my hard drive died. My guess is that this corrupted the files or Amazon has something in the code that frowns on copping the it from one place to another rather than getting it straight from them.

Mach-O Linker Error in Xcode

Ok so I have 2 projects. I want to import a class file from Project 1 to Project 2. When I import the class file. I get a linker error. Here's what it looks like.
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ClassFile1", referenced from:
objc-class-ref in ClassFile2.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How do I fix this?
Your tags include both ios and osx. if you're building an iOS app, check your Architecture setting in your Xcode project. It shouldn't be x86_64.
Possibly, you might have forget adding target to that file. In Xcode, Select the .m file and In the 'File inspector' on the right pane check Target Membership. Ensure that the target is checked for this file.

"_OBJC_CLASS_$_", referenced from: error in xcode 4.3.2

So today I ran into a major problem. I got a problem involving my viewcontroller on xcode 4.3.2 as seen in the attached code:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SecondViewController", referenced from:
objc-class-ref in Birdflix_ProViewController.o
"_OBJC_CLASS_$_ThirdViewController", referenced from:
objc-class-ref in Birdflix_ProViewController.o
"_OBJC_CLASS_$_FourthViewController", referenced from:
objc-class-ref in Birdflix_ProViewController.o
"_OBJC_CLASS_$_Author", referenced from:
objc-class-ref in Birdflix_ProViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I noticed that these errors only appear when I program IBActions linking my viewcontroller to additional classes. If I delete the IBActions the errors disappear. Any help is appreciated.
Thanks
Please add your SecondViewController.m or SecondViewController.mm, ThirdViewController.m/.mm, FourthViewController.m/.mm, Birdflix_ProViewController.m/.mm files to the Compile sources to build successfully.
To add files to compile source do the following
Build phase in xcode
Select Compile Sources
Press + button to add .m/.mm file
I think that you have added some other static library. And you have not linked it in your project target. Fist clean all targets and build again then check project setting bar shows simulator version properly for active build target.
Hope it will help.

Xcode 4 error SDK authorize.net

When trying to compile with Xcode, I am getting the following error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_AuthNet", referenced from:
objc-class-ref in ConnectionManager.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using SDK authorize.net
please help!!
You haven't linked the library to your application. Select the project from the navigator sidebar, select your target, then go to the Build Phases section. Under Link Binary With Libraries, add the AuthNet library.
Sounds like you are not including the libraries correctly.
Make sure that you followed each of these instructions:
Set your Library Search Paths with the path that contains the "Authorize.Net SDK"
library. (ex. "$(SRCROOT)/ANMobilePaymentLib").
Set your Other Linker Flags with "-lxml2" to allow for xml parsing.
Set your Header Search Paths with the path that contains "libxml2" header
files. (ex. "/usr/include/libxml2" with recursive checked).

symbol(s) not found for architecture armv6

Please help me from the below error.
I am working on graphs using 3rd party framework (libIPhonecharting), every thing works fine in simulator, but when I am trying to build .app file to install in IPAD Device I get the below error message.
ignoring file
/Users/xyz/Desktop/xyzIPAD/library/4.0/Release-iphoneos/libIPhoneCharting.a,
file was built for archive which is not the architecture being linked
(armv6)
Undefined symbols for architecture armv6: "_OBJC_CLASS_$_DTCStroke",
referenced from:
objc-class-ref in DemoLineChart.o "_OBJC_CLASS_$_IPCBar3DChart", referenced from:
objc-class-ref in DemoBar3DChart.o "_OBJC_CLASS_$_IPCLineChart", referenced from:
objc-class-ref in DemoLineChart.o "_OBJC_CLASS_$_DTCDefaultCategoryDataset", referenced from:
objc-class-ref in DemoBar3DChart.o
objc-class-ref in DemoLineChart.o "_DTC_STROKE_CAP_SQUARE", referenced from:
+[DemoLineChart(Private) getRenderWithRender:] in DemoLineChart.o "_OBJC_CLASS_$_IPCTitle", referenced from:
objc-class-ref in DemoBar3DChart.o
objc-class-ref in DemoLineChart.o "_DTC_STROKE_JOIN_BEVEL", referenced from:
+[DemoLineChart(Private) getRenderWithRender:] in DemoLineChart.o ld: symbol(s) not found for architecture armv6
collect2: ld returned 1 exit status
Here's how I got this problem:
I added a .h, .m and NIB from another project by dragging them onto my project navigator. Xcode didn't add them to the Build Phases properly.
My solution for this problem:
Go to the Target in the navigator menu
Click on the "Build Phases" tab
Add the .m file to "Compile Sources" (either drag it across, or use the + button)
Add the .xib to "Copy bundle resources"
Clean and build
It works for me thanks a lot to you
Few questions: Does you external lb have it's own project file? If so make sure that it is configured to build to arm6 and arm7 properly. Do the same for your main project file for good measure. Also, what version of XCOde are you on? There are significant differences between different versions.
Look at the libs scheme (depending on the version of XCode you are using) and make sure that is configured properly for debugging on the iOS device; I assuem you are building to your own device for debugging purposes: this recommendation is because of : "file was built for archive which is not the architecture being linked (armv6)"
After trying each of these things be sure to clean the entire project before each build.
Hope this helps. I feel your pain XCOde is evil.
I solved this issue by adding absent framework to target->Build Phases->Link Binary With Libraries