I am about to upload my very first app and I changed the deployment target 30 ios 3.0 and I am getting a warning that I have no idea what to with. If anyone could help me out, it would be much appreciated since I am basically done! (I hope). Its talking about some arv6 architectures and I don't know what that means.
Thanks!
[BWARN]warning: iPhone apps with a deployment target lower than 4.3
should include an armv6 architecture (current
IPHONEOS_DEPLOYMENT_TARGET = "3.0", ARCHS = "armv7").
warning: iPhone/iPod Touch: application executable is missing a
required architecture. At least one of the following architecture(s)
must be present: armv6 (-19033)
In your project -> build settings -> architectures, try adding an arm6 architecture
See this answer, it has a step by step process of how to add an architecture
"Warning: iPhone apps should include an armv6 architecture" even with build config set
Better question - why do you feel you need to support iOS3.x?
At this point you should switch to ARC and support only 4.x devices or greater, unless there is an absolutely compelling need. Remember that percentage wise only a tiny number of devices at this point are restricted to iOS3.
Related
We were supporting iOS 6 & 7 previously for our universal iOS application (which means we support both iPhone and iPad). Now, with the release of iOS 8, we have to support iOS 6, iOS 7 & iOS 8. Also, we have to extend our targeted device list to support iPhone 6 and iPhone 6 Plus.
Also, we are planning to upgrade to Xcode 6 shortly. Because Apple may anytime mandate the use of Xcode 6 to be able to submit apps to app store.
Keeping all the above points in mind, I am confused what should be my Architecture settings in Xcode build settings. Mainly There are 3 important items under Xcode Architectures settings. Please see the below screenshot.
I have highlighted the 3 important parameters. I want to know what values I should assign to these parameters in order to support all the above. Any help will be greatly appreciated. I am confused a bit with this.
Also, I would like to know if i need to change anything else in order to migrate to Xcode 6 and iOS 8.
In Architectures, you'll be fine with armv7, armv7s, arm64, i386, where i386 is for the Simulator. The rest can be left default values.
UPDATE: It is not required to mention desktop architectures (i386, x86_64) in order to support the build for iOS Simulator. Given Simulator is supported just by including respective ARM architecture. Hence, Architectures are fine if populated just with armv7 armv7s arm64. By observing, since Xcode 6.3 it might even cause build to fail if the setting contains any of the desktop architectures.
Valid architectures can be set individually for each target, Xcode will make intersection of the global Architectures setting with this. If you are not interested, leave it untouched, Xcode will cope with that on its own without problems.
In case your code is not 64bit ready, remove arm64 from Architectures. App will still run on iOS 8 and all the recent 64bit devices.
As for the Build Active Architecture Only, I recommend setting it to No. This property affects what Xcode decides to build e.g. based on currently connected device. But it may happen problems arise: you may end-up with some targets are built for different architecture, resulting in linking errors. Nevertheless, if you would like to use the pros of the feature, set it to Yes just for Debug or some sort of configuration used only for testing, not the final release. Xcode will build all binaries only for one of all the architectures you have set in Architectures x Valid then.
If you're not an expert on your target architectures, remove all architectures and add armv7 and armv7s. Also, if you're building only for iOS, check your targets so that Xcode isn't building other OSes (that may require other architectures).
I had an app works fine on Xcode5.0.2 with architecture armv7 & armv7s.But when I switch to "standard architecture" which plus arm64,it turns out all the third-party library managed by cocoapods went wrong,as shown below:
I'm wondering if anyone has encountered this kind of issue already,what is the solution to this,hopefully you could give me some instructions,thanks in advance.
The underlying issue here is that the CocoaPods you use have not been modified yet to support the ARM64 architecture thus they cannot be linked when you build them. Likely you cannot use those pods until they are updated to support ARM.
You can fix the linker error by going to project -> target of your project -> build settings and change architectures to default architectures (e.g. ARMv7, ARM7s), and valid architectures to ARMv7, ARMv7s.
Also try setting 'build active architectures only' to YES in release and then execute pod install again.
I upgraded Xcode version and when using external static libraries, I get this message:
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /file/location for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is there any way to bypass this and add support to the library if the developer of the library hasn't updated their library yet?
If you want to remove the support for any architecture, for example, ARMv7-s in your case, use menu Project -> Build Settings -> remove the architecture from "valid architectures".
You can use this as a temporary solution until the library has been updated. You have to remove the architecture from your main project, not from the library.
Alternatively, you can set the flag for your debug configuration's "Build Active Architecture Only" to Yes. Leave the release configuration's "Build Active Architecture Only" to No, just so you'll get a reminder before releasing that you ought to upgrade any third-party libraries you're using.
I've simply toggled "Build Active Architecture Only" to "Yes" in the target's build settings, and it's OK now!
Try to remove armv7s from project's "Valid architecture" to release from this issue for iOS 5.1 phone
I just posted a fix here that would also apply in this case - basically, you do a hex find-and-replace in your external library to make it think that it's ARMv7s code. You should be able to use lipo to break it into 3 static libraries, duplicate / modify the ARMv7 one, then use lipo again to assemble a new library for all 4 architectures.
Flurry Support for iPhone 5 (ARMv7s)
As I mentioned in yesterday’s post, Flurry started working on a version of the iOS SDK to support the ARMv7s processor in the new iPhone 5 immediately after the announcement on Wednesday.
I am happy to tell you that the work is done and the SDK is now available on the site.
use menu Project -> Build Settings ->
then remove armv7s from the"valid architectures".
If standard has been chosen then delete that and then add armv7.
In case this happens to someone. I built my own library to use with a third party code. While I was building it to deliver, I accidentally left my iPhone 4S plugged in, and so Xcode built my library only for the plugged architecture instead of following the project settings. Remove any plugged in devices and rebuilt the library, link it, and you should be all right.
Hope it helps.
In my case, I was linking to a third-party library that was a bit old (developed for iOS 6, on XCode 5 / iOS 7). Therefore, I had to update the third-party library, do a Clean and Build, and it now builds successfully.
So I just recently updated Xcode to 4.5 and was able to get my hands on a iOS6 phone. I was doing testing on the simulators fine (4.3/5.1/6.0) but when i decided to build on the actual iOS 6 phone it gave me this error.
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv7s, VALID_ARCHS=armv6 armv7 i386).
I did some lookup and fixed it by going into build settings to change the valid architectures to include armv7s and it did what it was suppose to do.
HOWEVER by adding that I got this error
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: some static library framework for architecture armv7s
After some looking it feels to me the static library framework is causing all the problems since it doesn't support iOS 6 and I'm not too optimistic that it can be fixed easily. However since I couldn't fine my exact situation on the net I'm hoping there's someone who knows this better than me and can help me. Thanks
Note: that static library is everywhere in the code, removing it is pretty much not an option
You can try to change "Build Active Architecture Only" YES --> NO. Works well for me.
In order to build, all the static libraries an application links against must generate code for all of the application's architectures.
It looks like Xcode 4.5 has updated your project to build armv7s code, but it neglected to add armv7s to the application's active architectures.
Once you fixed that, it looks like the problem is that the static library is not producing armv7s code, but your application is trying to build for armv7s.
If that's the problem, there are two ways to fix this. Either you want your application to only generate armv7 code (removing the need for armv7s code), for which you'll need to change your application's target settings to:
... or you want your application and all linked static libraries to have build settings that look like this:
armv7 code will run on anything from the 3gs upwards. armv7s code will run on the iPhone 5 only, and will be slightly faster.
So if you have access to an iPhone 5 to test on, and you have the source code to the static library then the second option is probably best. Otherwise, assuming that your library is at least generating armv7 code, then as long as your application isn't trying to build armv7s you should also be fine.
If the library is only building armv6 code, which isn't supported by xCode 4.5, then you'll need to change its build settings to produce at least armv7 code.
Xcode 4.5 doesn't support armv6 anymore, so you need to remove this architecture.
As you already found out, the library you use doesn't seem to support armv7, which now is essential.
I think there is no alternative to compiling the library with the correct target. If you have the source code, this should be trivial; if it's third party, you depend on them to update. They will know, however, that without updating their library has reached end of life.
I has similar problem. Got it solved by changing 'Build active Architecture Only' to 'NO' in Build settings of Target Project.
Remove armv7s and add armv7 (and/or armv6)
I have an issue with xCode 4.2. I am getting this error when building:
2011-06-18 13:35:49.839 Validation[4110:607] *** Warning: Defaulting to the standard codesign tool
warning: iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv6 (-19033)
Unable to validate your application. - (null)
I had a look at my project settings, and it has :
architectures: Standard (arm7) - ${ARCHS_STANDARD_32_BIT)
Build active architecture only : NO
Not sure what
For some reason the default architecture settings with xCode 4.2 is only for armv7.
Go to Target -> Build Settings -> Architectures -> Release
on value dropdown pick "Other...",
remove $(ARCHS_STANDARD_32_BIT), and add 2 rows
first with "armv6" and second "armv7"
Done
For Xcode 4.5, set the deployment target to at least iOS 4.3 and that will resolve it. Earlier versions of iOS are almost extinct.
Not the optimal solution, but I found that if I changed the Deployment Target to 4.3 (it was 4.0 before) it gets rid of the error.
For XCode 4.5
Had to set "Deployment Target" to 4.3, "Architectures" to armv6 armv7 armv7s as described above, AND "Build Active Architectures Only" to No.
This on a project that worked fine for several month before upgrading to XCode 4.5.
Note: Set the iOS Deployment Target to 4.3 or later in your project if you wish to drop ARM v6 support for your application. An ARM v7 processor is required to run versions of iOS later than 4.2.1.
My previous answer was deleted by the moderator because I didn't comply with their rules. So, answering again.
I faced the same issue and wasted 2 days on it. In my case an upgrade to XCode caused it. I downgraded XCode to the previous version and it got fixed for me. If this is your issue then uninstall new version, reboot and then install old version again. That should do it for you.
I have also added some screenshots and info to my blog about this issue here: http://iostipsntricks.wordpress.com/2011/06/24/solved-application-executable-is-missing-a-required-architecture-at-least-one-of-the-following-architectures-must-be-present-armv6/
Had absolutely the same problem with Xcode Version 4.2. and got also an other error:
There is no codesign:wrapper executable. Please reinstall the Xcode developer tools.
After downgrading the Xcode to an older version it fixed the problem.
Check this post, it is the right one with just adjust a setting in Xcode 4.2, just set "Build Active Architecture only" to NO:
iTunes Connect application is missing required architecture
My Answer may be solve your problem:
I had this problem even after following the accepted answer and found the following to work:
In your Info.plist, add an entry for Required Device Capabilities. This should be an array and will have two entries.
Item 0 : armv6
Item 1 : armv7
It will look like this:
Required device capabilities entry
Had the same problem, tried everything mentioned here - but still got the error on validate -
I tried armv6 and armv7 steps, tried to add that to info.plist and also tried regenerating the distribution certificate just in case.
Turns out the info.plist file must have ${EXECUTABLE_NAME} and ${PRODUCT_NAME} in the respective fields
ALSO the Product name in the Build Settings for that scheme+Target SHOULD match the scheme name
I made sure all the names matched exactly
EXECUTABLE_NAME, PRODUCT_NAME, Product Name in Target, binary name in build settings and info plist, and the deployable binary name - made sure they matched the Target name itself
Once all the names matched and the architecture matched, it worked. Until then it kept giving me error on validation.