Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do we need to compile iOS App for both "armv7" and "arm64" if my deployment target is 8.0?

My App supports from iOS8.0 and above. And I know that from iOS7 onwards its arm64 bit architecture. In that case do we need to compile the binary for both "armv7" and "arm64" slices?

If I compile for arm64 alone, I can reduce my App size. Is it a right way ?

Please help.

like image 455
arango_86 Avatar asked Feb 25 '16 10:02

arango_86


People also ask

What iOS deployment target should I choose?

You can set it based on your choice, if you would like to cover all the users using iOS devices then you can set deployment target to 10. x OR as per the latest analytical data from the Apple, there are only 7% devices using iOS 10. x or lower, so you can ignore them too and can set deployment target to 11.

Is armv8 and arm64 same?

It says that version 1.5. 1 of this binary supports armv8 architecture. That also indicates that armv8 and arm64 are the same thing.

Does iPhone use arm64?

iOS and iPadOSarm64 is the current 64-bit ARM CPU architecture, as used since the iPhone 5S and later (6, 6S, SE and 7), the iPad Air, Air 2 and Pro, with the A7 and later chips.

How do I add arm64 to excluded architectures?

Basically, you have to exclude arm64 for the simulator architecture, both from your project and the Pod project. To do that, navigate to Build Settings of your project and add Any iOS Simulator SDK with value arm64 inside Excluded Architecture.


3 Answers

Here you can find very easy to understand explanation of all iPhone and also Mac CPU architectures.

It helped me a lot when I decided to remove armv7 architecture from my supported architectures:

Choose carefully when excluding architectures. An application built with armv7 will run on all current iOS devices, even those that support newer architectures (it will run as 32-bit on iPhone 5S and later). But on the other hand, an app built without armv7 will not run on older devices such as the iPhone 4/4S or the original iPad mini.

like image 102
Vitaliy A Avatar answered Nov 09 '22 16:11

Vitaliy A


As per my understanding from Apple docs, The size of App will be reduce when you compile it for specific architecture and it's the correct way of doing it.

Apple docs :

Target Fewer CPUs

By default, Xcode projects are configured to generate optimized copies of your app in CPU-specific "slices" of your executable. Different hardware will run a different slice of the executable. This enables powerful optimizations that are only possible on some devices. However, this can substantially increase the size of your app's executable.

To target only specific CPUs, change the Architectures build setting from Standard $(ARCHS_STANDARD) to a list of the names of specific CPUs you want to support. Valid CPU names are listed in the Valid Architectures (VALID_ARCHS) build setting. Do not change the Valid Architectures setting. It is vestigial, and best managed by Xcode.

For more info refer this

like image 22
Nilesh Patel Avatar answered Nov 09 '22 18:11

Nilesh Patel


enter image description here

You need to build the app for both of these

like image 1
Sabby Avatar answered Nov 09 '22 17:11

Sabby