Why is armv6 a Valid Architecture for iOS 5? - ios

Can someone tell me why creating a new project with an iOS Deployment Target of iOS 5.0 includes armv6 as a Valid Architecture in Project > Build Settings by default? The default info.plist file only lists armv7 in the Required Device Capabilities.
As I understand it, if I am building for iOS 5 or later that will only run on armv7 devices (i.e. iPhone 3GS or later, iPod 3G or later, and the iPads). Thus I should be able to remove all the armv6 references, and set Build Active Architecture Only to YES.
Can anyone confirm or clarify? Thanks.
XCode v4.3.2, Base SDK 5.1, iOS Deployment Target iOS 5.0, iPhone Device Family
PS - I understand that removing armv6 will reduce the size of the binary.

$(VALID_ARCHS) defines the set of architectures that an Xcode target supports. $(ARCHS) tells Xcode what architectures to build. What actually gets built for each target is the intersection of $(VALID_ARCHS) and $(ARCHS).
$(VALID_ARCHS) is typically used to avoid building a target for some architecture that the project as a whole otherwise supports. If you don't need to do that, you can safely ignore it.

Related

No architectures to compile for Xcode 6.1

I am running xcode 6.1
I am upgrading a project that was originally targeted to 4.3 to latest iOS and SDKs. When I run against simulator, it compiles fine against all simulators less than iPhone 5S, it works on iPhone4,4S, iphone5 both (7 & 8). However When I select devices iPhone 5S and iPhone 6, I get the error: No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386).
Settings:
Your valid architectures should read armvv7, armv7s, arm64
Otherwise you do not allow (at least) arm64.
You also do not need to make a difference between debug & release when that is the same
I suggest that you do the following:
Delete local modifications to valid architectures such that it returns to default values.
Delete local modifications to architectures such that it returns to default values.
Make sure that your deployment target is at least 6.0. Setting it to a version older than 6.0 will not allow you to support 64bit.
The default architecture values will just show arm archs. You don't need to include i386 and x86_64. Xcode takes care of translating your arm archs to appropriate intel archs when building for the sim. For example, if you have armv6, armv7, or armv7s in valid archs or archs, that will be internally translated to i386 when building for the sim.
I had to manually remove overwritten VALID_ARCH settings from the project file to get it to build simulator. For whatever reason if you overwrite them at target level it doesn't work (for me at least) and you can't remove them in Xcode as it replaces them with empty instead of inheriting them from project settings.

Error creating LLDB target at path, Xcode 6 GM seed,the screen stuck [duplicate]

I'm getting this error whenever I build in XCode 6 beta 4. It seems to be making my app insanely slow.
Warning: Error creating LLDB target at path
'/***/***/***/***.app'- using an empty LLDB target which
can cause slow memory reads from remote devices.
What exactly does this mean and how do I fix it?
Thanks in advance!
Did you use Architectures=$(ARCHS_STANDARD_32_BIT) and run your app on a 64 bit device? (iPhone 5S or iPhone 5S simulator)
Apple seems to be stricter with apps which don't support 64bit. So if there is no specific reason, I think it's better to include arm64 in your build architecture
NOTE ABOUT 64-BIT ARCHITECTURE
An app extension target must include the arm64 architecture in its Architectures build settings or it will be rejected by the App Store. Xcode includes this architecture with its “Standard architectures” setting when you create a new app extension target.
If your containing app target links to an embedded framework, the app must also include the arm64 architecture or it will be rejected by the App Store.
For more information about 64-bit development, see 64-Bit Transition Guide for Cocoa Touch or 64-Bit Transition Guide for Cocoa, depending on your target platform.
Source: https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/ExtensionCreation.html#//apple_ref/doc/uid/TP40014214-CH5-SW1
This warning is solved by changing Build Settings :
Select Project -> Build Settings
Change 'Architectures' to 'Standard architectures (armv7, arm64) - $(ARCHS_STANDARD)'
This will prompt an alert stating iOS 5.1.1 and above are supported. Click 'Change Deployment Target to 5.1.1'
Repeat steps for Target (if not changed automatically)
Also, this is preferred build setting since Apple is forcing developers to build apps on 64 but architecture. Apple document Link
Double Check Build Settings => Valid Architectures for both Project and Target.
Mine used to say: arm64 armv7 i386 (The one causing the error was i386)
I replaced it to : arm64 armv7
I hope that helps.
In Xcode 6.4 , Swift 1.2. I had to edit both the Project and Target to the correct arm verisons (arm64, armv7 and armv7s). Take a look:
My "Architectures" included arm64 but I had to add arm64 to "Valid Architectures" in the target.
In my case I had to change Build Active Architecture Only to YES for the Debug configuration.

"Deployment target" and "Architectures" for ios development

From the Apple Xcode Build Setting reference, we can see that :
iOS Deployment Target identifies the earliest iOS version the product is to run on
Architectures specifies the architectures (ABIs, processor models) to which the binary is targeted
What's the relationship between these two concepts? When I set build settings, they should be consistent?
For example, I want to target iOS 5. I think I need to find out all the devices which can run iOS 5 or later versions iOS, and collect all CPU architectures from these devices. Suppose there are three kinds of architectures from these devices: A,B,C. I should set the architecture to "A,B,C"? Or, if the oldest architecture is A, then I can assume backwards compatibility, set the architecture only to "A"?
Please correct me If my understanding is wrong. Thank you.
I know this is a little old but.
The iOS Deployment Target does exactly as the docs say.
The Architectures is basically a list of all the CPU architectures for which Xcode will compile your source.
If you have iOS 5 as your iOS Deployment Target and try to build & run your app on a device with iOS 6 but your Architectures list does not contain the CPU architecture of that device, you will get an error because your app hasn't been compiled to run on that CPU.
Hope that helps

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.

What is armv7s?

This seems to be a new option in newer XCode - instead of "armv6 armv7" under Valid architectures I now see "armv7 armv7s". What is armv7s and do I need to build for it as well as armv7?
The iPhone 5 will ship with and only run iOS 6.0. To coincide with the launch of iOS 6.0, Apple has seeded developers with a newer version of its development tools. Xcode 4.5 makes two major changes: it drops support for the ARMv6 ISA (used by the ARM11 core in the iPhone 2G and iPhone 3G), keeps support for ARMv7 (used by modern ARM cores) and it adds support for a new architecture target designed to support the new A6 SoC: armv7s.
You do not have to build for armv7s to add support for the iPhone 5. The iPhone 5 can run armv7 compiled code as well. My app has just been submitted to the store and it is build on armv7 only and working perfect!
armv7s is the architecture of the A6 processor in the iPhone 5. And yes, you need to include this as well. With the latest version of Xcode, support for armv6 is dropped.

Resources