XCode 4.2. issue: Standard (armv7) - iphone

I want to update my app in the App Store but when I try to upload it I get an error that armv6 is not supported in my app. The problem is I cannot even choose Armv6 as an Architecture.
I have the following Architecture settings:
Architectures: Standard (armv7)
Base SDK: Latest iOS (iOS 5.0)
Build Active Architecture Only : NO
Valid Architectures : armv6 armv7 armv7f armv7k
I thought because of 3 and 4 everything is set right.
I can NOT change 1 for something else.
What can I do?

It's better to downgrade back to stable version of SDK for Distribution builds. Apple even wrote about that in previous beta builds notes.
I partially fixed that problem by setting Architecture to "armv6 armv7". After that i could build universal binary, but simulator builds is broken. :)

The way we fixed ours was to go into the target build settings, select the Architectures list and select other... Then hit the "+" button to add your own called "armv6" without the quotes. Hit done, clean targets and archive.
Keep in mind that nothing needs to be "selected" in the Architectures list. It is only a list of architectures supported and should contain just two entries.

this is the best solution, yeahhh!
Select a "Architectures: Standard (armv7)"
Select a "Other..."
Select a "+" button
add a "armv6"
select a "Done"

Some back story for everyone seeing duplicate symbol errors and/or warnings about armv6 is missing.
armv6 is required if your apps supports deployment targets below iOS 4.3.
The latest Xcode 4.2 by default has architecture = $(ARCHS_STANDARD_32_BIT) which maps to armv7.
Xcode 4.1 has the same env variable, but it map to armv6 and armv7.
Doing a armv6+armv7 in Xcode 4.2 requires some trickery...
A) add in "armv6" to the list of Architectures. However this breaks builds for Xcode 4.1 since "armv6" + $(ARCHS_STANDARD_32_BIT) = armv6 armv6 armv7 -> duplicate symbol errors
B) use the variable $(VALID_ARCHS) which maps to armv6 armv6 (and i386 for simulator builds)

Remove all architecture from xcode then it will take arm v6 and arm v7.

Select a "Architectures: Standard (armv7)"
Select a "Other..."
Select a "+" button
add a "armv6"
select a "Done"
Good luck

Remove environment variable $(ARCHS_STANDARD_32_BIT) from Architectures setting.
The add "armv6" and "armv7" to the list of Architectures.
If you're building your own libs - they need to have those settings too.

Related

Submitting iPhone5 app with Xcode 4.4.1 [duplicate]

I read on the internet that iOS 4.3 with armv7 is the lowest you can go if you want to support iPhone 5. So, if I want my app to run on iPhone 5, then do I need to set the deployment target as iOS 4.3 and set the architecture as armv7?
I couldn't find an official documentation for this. Could you correct this information if it's wrong?
UPDATE: I've found the answer in the Xcode 4.5 GM seed Release Notes documentation of Apple:
Changes in Xcode 4.5:
- Support removed for armv6
Xcode 4.5 and later does not support generating armv6 binaries.
- Minimum supported deployment target is iOS 4.3
The minimum supported deployment target with Xcode 4.5 or later is iOS 4.3
There doesn't seem to be any official statement on this, but it's pretty clear if you take a look at Xcode 4.5. It's also a logical step forward as last armv6 device (iPhone 3G) has been out of sale for over two years and without software updates for almost two years as well.
Note: as of posting this answer, an unofficial way to support both armv6 and armv7s has been found here: How to support both armv6 and armv7s for release build in xcode 4.5
This is only half the truth;
the other half is you can actually do combine an iOS 4.0/armv6 build into your iOS6/armv7(s) build.
This process is described here:
How to support both armv6 and armv7s for release build in xcode 4.5

How to put my app in a iPhone 3G?

I am using Xcode 4.2 to develop my apps. My current ongoing project is set to run on ios4.2, but i only have a iPhone 3G (not 'S') to test my app. The problem is that when i try to run my app in my device, xcode says it was compiled and running on device but the app doenst even install in my iPhone.
I have read on other posts that i have to change the armvX configuration, so how do I do that in order for my app to run in a iPhone 3G?
Thanks.
This is a hardware issue rather than an iOS version issue.
In the Architectures section of your build configuration it probably just says armv7.
You need it so have two entries, armv6 and armv7. Select Other from the architectures menu then delete the default then add two new entries, one that just says armv6, on that just says armv7.
This creates a fat binary (essentially two binaries) which will contain the v6 code the 3G needs.
Go to the project view. (Short cut key: Command-1)
Select the project to see its summary.
Under iOS Application Target, there should be a Deployment Target.
Select the version 3.1.3 or whatever the desired minimum version.
I dont have my Mac in front of me but i believe in the Target settings for the project
(click on the project in Xcode and under targets select your project name)
In the settings there you will see it more then liekly saying armv7 change to a lower number armv and i believe it will work.
though i cant be sure

With an ARMv6 only build to I need to include UIRequiredDeviceCapabilities: armv6?

I am building ARMv6 only (to keep the app size down), and it all runs fine on all iPhones/iPads.
My question is, when I submit it to AppStore, do I need or not need to update UIRequiredDeviceCapabilities to say it is an Armv6 build?
The docs here:
http://developer.apple.com/library/ios/#documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html
say:
armv6: Include this key if your application is compiled only for the armv6 instruction set. (iOS v3.1 and later.)
BUT, does this mean if I include this key it will only work on ARMv6 platforms (eg: iPhone 3G) or does it just mean only ARMv6 code is in this app, but all phones compatible with that will still work?
Any help appreciated, I don't want to wait for the usual rejection.
Thanks,
Peter
If you include the armv6 key, your application will still work on armv7 devices like the iPad and iPhone 4. As far as I know, the original iPhone is armv6 as well, so there's no hardware restriction imposed by adding that key at all. It just means that any version of iOS which doesn't support the armv6 instruction set will not be able to download your app (pre-iOS 3.1, as they mentioned).
In xCode 4.2 it is possible to switch the Architecture to support armv6 manually, Standard is armv7. Just select it under Architecture, select other, delete existing one and add manually armv6 and armv7.
When I removed the complete "UIRequiredDevicesCapabilities" out of the source code view of my .plist file and switched back to the summary view of my project, xcode crashed and the whole project became unusable. After doing the same using the "Property List" view did not cause the same problem.

UIRequiredDeviceCapabilities armv6 and armv7

I snapshot my settings below. In my project settings, i am targeting arm6 and 7. Does this mean i need to include both armv6 and armv7 keys even though the descriptions by apple state "is compiled only for the armv6 instruction set":
armv6
Include this key if your application is compiled only for the armv6 instruction set. (iOS v3.1 and later.)
armv7
Include this key if your application is compiled only for the armv7 instruction set. (iOS v3.1 and later.)
No, as you're compiling for both architectures, you don't require either of them. You would only include the requirement if you compiled for just one architecture.
In xCode 4.2 it is not possible to switch the Architecture to armv6, Standard is armv7 and cannot be changed. I'm not sure whether the "armv6 armv7" value in the field "Valid Architectures" is enough for supporting all devices. Therefore I included the (array-)string value "armv6" as described by peterept in the key "UIRequiredDevicesCapabilities". I hope that like that my app will be compatible with all (iPhone) devices.
Other experiences? Cheers.

warning: iPhone apps should include an armv6 architecture (current ARCHS = "armv7")

I want to limit my universal-build app to iPhone4 / iPad, and I've set UIRequiredDeviceCapabilities to include "armv7", accordingly. In the build settings I've set:
"Architectures" = "Optimized (armv7)"
"Valid Architectures" = "armv7"
But the Release and Distribution builds of my universal app are generating this warning:
warning: iPhone apps should include an armv6 architecture (current ARCHS = "armv7")
Is this even a real problem? Can I safely ignore the warning? Why doesn't my debug build exhibit the same warning - the build config has the same settings?
I'm building with XCode 3.2.5, 4.2 SDK.
Similar to this question, but not quite:
"Warning: iPhone apps should include an armv6 architecture" even with build config set
I was having the same issue. I set the project settings accordingly but was still getting the error when building the Release version. I had to edit the Target settings and found that 'Build Active Architecture Only' was checked for the Release configuration. Unchecking it resolved the warning. I hope this helps someone.
Build Active Architecture only is really best used just for debug and simulator builds.
The iOS deployment target version is what determines the required architectures. iOS 4.2 and earlier included support for armv6 processors; therefore Xcode wants you to build for that architecture for builds that might be distributed.
If you really don't want armv6 code, and understand that the app store will reject your app if it targets iOS 4.2 or earlier and does not have armv6, then I'd suggest just changing the "Architectures" setting in the target to armv7 only.
You can stay with arm7 only if you want, but if you want to limit to iPhone 4 / iPad it's because you have a good reason ? To limit to devices you need to use UIRequiredDeviceCapabilities in your Info.plist, otherwise people with previous iPhone will find your app and it will not work.
PS: It's not easy to find a device capability for both iPad and iPhone, you can for example said that you want devices with a front facing camera but this will limit to iPhone 4 and iPad 2 (and not iPad 1)