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.
Related
I am struggling with a problem while using Gitlab CI/CD.
I am using for my project two of my external frameworks. The project builds without errors but when running the pipeline I'm getting an error that says
This Copy Files build phase contains a reference to a missing file 'xxxxxx.framework'.
My project looks like bellow
This is en error I'm getting:
When I add framework file not the framework project then CI/CD will pass BUT then I'm getting the error when trying to archive project
Building for iOS, but the linked framework 'xxxxxx.framework' was built for iOS Simulator.
I don't know how to solve those problems to get everything work.
Thanks for any kind of help.
Regards
In case anyone is having this problem and is cloning a git repository that has submodules, be sure include the submodules when cloning.
Most probably what you will need out of these 2 options is to use the x.framework one. The error
Building for iOS, but the linked framework 'xxxxxx.framework' was built for iOS Simulator.
as it says, comes from the fact that the framework is only built for iOS Simulator.
Why is that?
Well, the iOS Simulator runs on x86_64 architecture (as OS X does), while iOS runs on arm architecture. So you'll have to compile the frameworks for both architectures. Fortunately, there is a way to do this, and basically what you need to achieve is to create a fat binary of the framework.
There is a script here from Sundeep Gupta https://gist.github.com/sundeepgupta/3ad9c6106e2cd9f51c68cf9f475191fa which can be used to compile the frameworks for both, iOS Simulator and iOS target architectures. There are also several different resources on the internet which explain what steps you need to make in order to create fat binaries.
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?
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
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.
I'm writing an iPhone app which seems to run fine on the simulator, however when I try and run it on the device I get a libsqlite3.dylib, file is not of the required architecture error. I'm using os 3.0 on a 3GS. Any ideas on what could be causing this?
Thanks!
When you added the SQLite library to your project, it sounds like you chose the one from the iPhoneSimulator sdk. You need to choose the one in the iPhoneOS sdk for whichever version you're building for.
If you still get the error make sure you haven't accidentally copied the simulator version of the lib into your own project directory. You need to delete it if you have. This would have occurred because you accidentally selected 'Copy items into destination groups folder' when you added the lib to your project. Also make sure reference type is 'Relative to Current SDK'.
I had a similar issue which caused by the search paths for the linked library pointing to incompatible files.
I wrote a blog post on how to fix it here:
Fixing the "missing required architecture arm in file" error when developing for iPad