iOS: Do iPhone 3GS or younger devices require armv7? - ios

I have a third party library (ZBar) which complains about the armv7 arch when I build the project (in Terminal, using xcodebuild), and I have to set the valid architecture in the build settings to armv6 (only).
The question: Will an app set to armv6 even run on post iPhone 3GS devices?

Yes, ARMv6 code will run on an ARMv7 device, but not the other way around. You can test this by downloading an app that hasn't been updated in a long time onto a brand new iPhone 5, and it should run perfectly fine (while not being retina-optimized).
This is because the two instruction sets are backwards-compatible, but not forwards compatible. However, ARMv6 now is not that much of an issue, because of Xcode 4.5's limitation to be unable to compile ARMv6 code.
Note that the iPhone 3GS is actually the first of the iOS device list that uses ARMv7, which can be observed by the fact that it's the earliest device that can run iOS 6 (which requires ARMv7, the only exception being the first generation iPad), so as long as you are targeting iOS 4.3+, you don't need to support ARMv6 at all.
Seeing as the only 4 devices that are ARMv6 are the (iPhone 2G, iPhone 3G, iPod, iPod 2G). All of those devices should have been replaced by now, and it isn't our fault if they aren't.

Related

Does an iOS app compiled for armv7 run on iPad Air, iPhone 5S, etc. (armv8 devices)?

I'm making an iPhone/iPad app that includes a library that's only compiled for architecture armv7. That includes all iOS devices prior to the iPad Air, iPhone 5C/S and iPad Mini gen 2. Those devices have a armv8-a architecture. If I compile my app for armv7 (with Valid Architectures set to "armv7"), will the app run on the armv8 devices too? And what about 64-bit?
It would make sense that apps from the iOS 6 era, will still run on those newer devices. I know that for instance, when compiling for armv7, your app will still run on the iPhone 5's armv7 because it's a subset.
Your help is greatly appreciated!
Reinder
Yes, theorically you could even compile against armv6 and it will work on all the future devices.
A nice infograpich about mobile Apple architectures
Btw "armv8" is called arm64

iPhone 5S Specific Error: No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=armv7 armv7s)

My app uses a few libraries that are iPhone hardware specific and do not run on the simulator. My app complies and runs fine on an iPhone 5 with iOS 7.1, iPod Touch 5G with iOS 7.0 and iPhone 4 with iOS 6.
However, when I try to compile it to a specific iPhone 5S with iOS 7.1, I get the following error, which doesn't make much sense to me:
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=armv7 armv7s).
As a note, this works on other iPhone 5S's - it's just this specific.
Have you tried looking at your project settings and making sure that under Architectures, Valid Architectures includes arm64? It looks like it's only including armv7 and armv7s. Make sure the architectures are included as such:
You may also decide to set Build Active Architecture Only to No so it can build regardless of what architecture you're connected to.

Cannot compile for armv7s here valid architectures are armv6, armv7 and i386

I tried debugging my ios 6.1 project on the new iPad 4 (A6X, armv7s instruction set). However the build failed with
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv7s, VALID_ARCHS=armv6 armv7 i386).
I'm using XCode5-DP6. App debugs on the latest iPod touch (armv7) and on both iPad and iPhone simulators (both iOS 6.1 and 7.0).
It was my understanding that code built for arm7 should build and run on arm7s, since apps between iPad3 and iPad4 are the same? Any clue what I'm doing wrong?
The last product I know of with armv6 is iPhone 3G, even iPhone 3GS is with armv7.
Apple has removed the support for armv6 in a way you cannot compile to that processor architecture and even if you would successfully compile you would have a problem submitting the app to Apple (the build won't be accepted automatically). Moreover, You cannot compile to an OS below 4.3 (it would give you errors also) so there are some restrictions - I'm saying that because I think old devices also can't support new OS. So, it is just a matter of days that there won't be any old iPhone with an OS you can support with Apple's platform.
So, my recommendation is to change the build and valid architectures to armv7, armv7s & i386 (if you need it).
This shall work and you really don't have a choice. you should know that most users doesn't own those old devices. If you still want to support those maybe you should consider add a new app specific for "new" devices, but know that you couldn't update the old version because of what explained earlier.

Xcode's Build setting for minumum run on iPhone

I have finally reached to the point where i need to set the build settings for my iphone application.I want to my App to run on 4.3 to 6.0.1 and devices from iPhone 3gs to 5.
Are the following build setting for the target valid and correct? Notice i have changed the armv7 to armv6.Should i change it again or is it safe to leave it like this?
Also should i add armv6 to Valid Architercures(appstore scheme)?
You need to set Valid Architecture for armv7 and armv7s as for iPhone 3GS and further devices has support for armv7. iPhone 3G is having armv6, so no use of it as you are not supporting iPhone 3G.
Also, your iOS target set to iOS 4.3 is proper.
Hope this info helps you..
the 3gs can run armv7 just fine so why do you need it?

Why does my iOS app not run on my iPod touch?

I have written a universal iOS-App that runs fine on my iPhone and iPad, but not on my good old iPod touch. X-code does not even transfer the binary. It just says
finnished running programname on devicename
The deployment target is 4.2. (The iPod touch runs 4.2.1 and it has 2.1 GB of free space).
How can I troubleshoot this problem?
I don't know your specific iPod model but I had this problem and it sounds like an armv6 / armv7 issue that started coming around recently with the latest XCode update. I pulled my hair out for ages on this one.
Make sure that your build is armv6 - you might need to physically type in "armv6" as supported near the top of your build settings otherwise it is only compiling for armv7 devices.

Resources