Undefined symbols for architecture armv7s using Three20 and iOS6 - iphone

Trying to update our app for iOS6 and iPhone 5, we (for now) still aren't able to completely move away from the Facebook Three20 library.
When debugging in the simulator for iPhone and iPad, everything works perfectly fine. When attempting to debug on an iPhone 5, we get the following failures:
ld: warning: ignoring file ..../Build/Products/Debug-iphoneos/libThree20.a, file was built for archive which is not the architecture being linked (armv7s): ..../Build/Products/Debug-iphoneos/libThree20.a
Followed by:
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_TTTabItem", referenced from:
Is there a way to relink/rebuild the Three20 library for my target to ensure that it properly builds for armv7 and works correctly on the iPhone 5 for debugging?
I've tried messing around with the Projects' build settings, etc, but have not had any success getting this resolved.
Thank you!

After fiddling around for an hour I realized that I needed to go to my project, and for each attached Three20 project select it, go to that project's Build Settings, and manually update the Architectures to the new required armv7, armv7s.

Related

TestFlight: Application executable contains unsupported architecture: armv7s

I'm trying to build an ad-hoc build with test flight.
I have the OS Device selected and am trying to create an archive.
However I get the following warning.
(null): iPhone/iPod Touch: application executable contains unsupported
architecture(s): armv7s (-19031)
I have the following settings for my test flight target.
I can build fine for release.
It looks like you're using an old version of the TestFlight library.
The iPhone 5 uses a new processor (A6), with a modified instruction set (AMRv7s).
Since you are building your app with that architecture too, all linked libraries also needs to support it.
TestFlight provides a new version (1.1) of its library, with support for that specific architecture.
So simply download the new version of the library, link against that, and you'll be fine.
Your "Release" target is compiling and linking fine, because no symbol from the TestFlight library is actually used. But if you need TestFlight support for the iPhone 5, just update to the latest version of the library.
This warning is perfectly normal when you use an armv7 device to archive your application.
Think about it, you make an archive that includes the armv7s architecture (which is what we want) and the warning tells you that your armv7 device does not support that architecture (which totally makes sense).
To prove that even further, just hook up an iPhone 5 and try archiving and you will see that the warning will go away.
As far as I can tell Xcode 4.5 will not currently allow you to create Archive builds that include armv7s.
My project uses two 3rd party libraries (Dropbox and Flurry) and I reverified I had the latest iOS 6 builds included. I verified that all my other frameworks (and libsqlite3.0.dylib) were all located in the iOS 6.0 area. None of this helped.
I then created a brand new empty project from scratch and attempted an Archive build and received the exact same error. So after wasting 6 hours trying to fix this, I am tentatively concluding it is not possible to get rid of the warning.
Based on comments else where, apparently, it is not necessary to build for armv7s to run on an iPhone 5.
Any information to the contrary of anything I have posted here would be appreciated.
All you need to do is remove armv7s from the valid architectures.
Same question has been asked several ties I think.
I was displayed the same warning message when I archived in preparation for Ad-Hoc testing.
(null): iPhone/iPod Touch: application executable contains unsupported
architecture(s): armv7s (-19031)
I have removed armv7s as recommended above and the warning went away. What repercussion are there in doing this? What is armv7s supporting?
With semingly no changes to any settings or code from yesterday, what may have caused this warning to pop up?

Can't build iOS/iPhone app as anything other than i386

I am completely new to the iOS/iPhone/XCode world, so if you guess is between something rather complex and something so simple that everyone should know, I'd go with the simple answer. :-)
Okay, so I have inherited an iPhone project that we had outsourced to another company. My only objective right now is to be able to build the dang thing. I set up XCode 4.2 and installed the proper SDKs. I loaded up the project and everything seems good to this point. However, when I build, I get errors from what I believe to be the linking stage of the build. I'm not entirely sure because the statuses change quickly when building. The error I get is the following:
From what I have been able to find online, it seems that one of the libraries I am using was not compiled for the i386 platform. To start, this doesn't make sense to me because the libraries that I am using (where these errors are coming from) are currently included as sub-projects and produce .a files which I thought were arch-independent (am I wrong here??). Also, I can't find anywhere in the project where I've instructed XCode to build to an i386 architecture. This is what I've done so far:
Made sure that the file in which these errors arose was included into the "Compile Sources" section of the Build Phase tab (the .m file)
Set my architectures to armv6 and armv7 and set the Build Active Architecture Only to no. (See images below)
Main Project Config
Sub-Project Config
Event when I build using the release configuration, I still get this error and I'm not sure why. Everything that I am looking at in my build config seems to indicate that I should be building everything in an arm architecture.
You are getting errors because you messed with the architecture settings. You should not fix those towards ARM code but allow i386 as well.
Right now, one of more of your (sub)-projects build ARM code only, resulting into a linker error once you try to build a simulator version. That is happening because your Architecture settings are not as they should be.
Note your setting for Any iOS SDK, that one is incorrect as it builds only ARM code. Remove those settings entirely by using the backspace key on your keyboard after selecting that specific setting (single-click).
And this is how it should be:
$(ARCHS_STANDARD_32_BIT) resolves to ARMV7 when building device specific code and i386 when building simulator specific code. Including ARMV6 code as per my screenshot is only needed if you plan to serve the results to older iOS devices (iPhone 3G and below).
Once those settings are active in all (sub)-projects, everything should work smoothly.
For creating a universal library out of a project, useful if you plan to distribute a static library to other developers, use LIPO.
Example:
lipo input_library_1.a input_library_2.a -create -ouput output_library.a
Lets say input_library_1 was i386 specific (simulator) and input_library_2 was ARM specific (device), this will join them into a universal version usable for both simulator and device.
It seems like you have been trying to link to static library built for devices(armv6 or armv7). When your building for the simulator the architecture will be i386. So you getting all these nasty linking errors. Solution is to include the library compiled for simulator as well in your project.

Framework issues in Xcode

I'm running the latest version of Xcode and am try to create an app for IPhone with IAd integrated into it and I have tried to integrate it many ways, but I keep receiving this error every time, ld: warning: ignoring file /Users/mini/Desktop/TheDateGetter/iAd.framework/iAd, file was built for unsupported file format which is not the architecture being linked (i386) I'm guessing this is a framework issue, because all of the code and everything else it correct. All help will be appreciated, thanks!
Check under Build Phases for your target which frameworks are you linking against. You will need to remove then the iAd framework from /Users/mini/Desktop/TheDateGetter and link the correct one from the iOS SDK.

linking static libraries in iOS5

I am new to iOS 5.
Currently working with xcode 4.2,Base sdk iOS 5.0,Apple LLVM compiler 3.0,architechture armv7.
Whenever I try to link a static library the following warning comes up.
ld: warning: ignoring file /Users/shilpasurendran/Desktop/InputVal_aslib/InputVal_aslib/iCodeBlogsMathLibrary/libICodeMathUtils.a, file was built for archive which is not the architecture being linked (i386)
I even tried changing deployment targets and compiler,but of no use.
Please help.
Thanks in advance!!
You are trying to build for armv7 architecture which means you want to build for a real device not the simulator.
The library you are linking to is in i386 architecture meaning it is compiled for the simulator.
When using a third-party library there often is a structure like this:
Library
build
Release-iphoneos
Release-iphonesimulator
Release-universal
If there is a universal build you should use that one. Try using the one under Release-iphoneos otherwise.
Hope that helps

Building XMLRPC.framework: Wrong Architecture?

it's me again with my iOS trouble. I've finally managed to build the master branch of this XML-RPC framework https://github.com/eczarny/xmlrpc which produced an XMLRPC.framework for me. I managed to include that framework in my iOS project, all good, but when I build it...
ld: warning: ignoring file /Users/kovshenin/Library/Developer/Xcode/DerivedData/XMLRPC-emidbddzjlofthfgowywcfscewgd/Build/Products/Development/XMLRPC.framework/XMLRPC,
file was built for unsupported file format which is not the architecture being linked (i386)
So I went back to the XMLRPC project and tried to select different Base SDKs and Architectures for the target, but with no luck, seems like it's only building it for 64-bit Intel. Even tried the iOS SDK which gives me a "The selected run destination is not valid for this action." error.
Sorry again for my "newbish" talk, but the official dev forums can't seem to help me out. Thanks!
P.S. I'm using Xcode 4.
Architecture is related to the processor on which you are running your code. If you are building for the simulator, then you are building for your Mac, which is Intel, i386. If you are building for a physical iOS device, then you are building for arm6 or arm7, depending on how new the devices are. Fourth generation iPhone 4 and iPad were the first arm7 devices.
As far as setting the build settings, I'd recommend taking a look at the build settings. In Xcode. Here's a screenshot:
Click on your project, then on your build. Under the architectures section, you can configure your architectures as necessary. You should note though, that the original developer would have to have built it for the simulator as well as the device, or you won't be able to run it on the simulator.
It looks as though the library may not fat meaning it'll only build for the device, and not for the simulator. Connect your device and select it in the drop down, then build again and see if the error disappears.