Xcode build target difference - arm64 and armv7, arm64 - ios

I had created 2 new projects on Xcode this week for 2 different apps. For some reason one of the project always fails compiling for the device target. I then realized that the device target is different for both the project. For the working project "Any iOS Project (arm64)" The project which fails to build has "Any iOS Project (armv7, arm64)"
What causes the device target to change this way and what is the difference?

armv7 is 32bit architecture that was supported by earlier iOS versions up till 10.3.4. arm64 is 64bit architecture which is supported by newer devices.
If your project has minimum iOS version which is below iOS 11.0, Xcode will automatically pick both armv7 and arm64.
In case if Xcode does not pick the required architecture automatically, it can be added in build settings as shown below:

Related

"Missing architecture. Apps built with Watch OS 5.0 and later SDKs must contain additional architectures."

When I am trying to upload the app to appstoreConnect, it fails with below error:
ERROR ITMS-90733: "Missing architecture. Apps built with Watch OS 5.0 and later SDKs must contain additional architectures.
the iOS version: iOS 10
the WatchOS version: WatchOS 3
the Build Setting "Valid Architectures" for iOS is "arm64 arm64e armv7 armv7s"
the Build Setting "Valid Architectures" for watchOS is "arm64_32 armv7k"
Has anyone got a similar error?
After updating to MacOS Catalina, to be able to continue updating Xcode and get the latest version 11.4, I ran into this problem for one of my two apps. One would upload but the other kept getting this error.
I compared their Build Settings.
For the iOS Target in Build Settings I had to add arm64e to "Valid Architectures". It should have 4. "arm64,arm64e,armv7,armv7e"
EDIT: Remove all of them. Replace with $(VALID_ARCHS) which auto-fills with the currently supported valid architectures.
For the two WatchOS Targets it should have 2. "arm64_32,armv7k"
In my App the WatchOS Targets had the same cpu architectures as iOS.
Now it uploads fine to iTC.
Please check (For iOS app target) the Build settings -> search valid architecture -> Valid architecture it should be the arm64 arm64e armv7 armv7s
For the Watch OS target so the same and set the Valid architecture to arm64_32 armv7k

i386. 32-bit architectures are not supported when deployment target is 11

I customized an official Xamarin example project around half a year ago and used it as a template and built my app around it.
When I wanted to build it in Release Mode, I got the error
Invalid architecture: i386. 32-bit architectures are not supported when deployment target is 11
My iOS Build settings were:
iOS Build
Target OS: Default (if I click the combobox, VS2017 would also let me choose 11.1 instead)
Supported architecture: i386 + x86_64
I created a new Xamarin PCL project in VS2017 to see what the standard settings would be for an iOS build.
Those were:
iOS Build
Target OS: 10.1
Supported architecture: i386 + x86_64
I wonder if the error that I'm getting is related to the iOS Build settings at all, and if yes, what I should choose and what I should target.
As written below, VS2017 wouldn't let me select "10.1" in my original project, it would only allow me "Default" or "11.1".
"32-bit architectures are not supported" may even appear if a 32-bit ARM architecture ist selected when using 11er SDK and 11er minimum deployment target.
To be able to build for architectures ARMv7s + ARM64 (in project options), set the minimum deployment target in Info.plist to 9.1 for example. In project options also make sure to select 'Link framework SDKs only'.

iPad: file was built for armv7 which is not the architecture being linked (arm64)

I have been developing my app using Simulator and an old iPhone 4S.
I tried to run the app on an iPad Mini 3, but I get this warning:
file was built for armv7 which is not the architecture being linked (arm64)
any idea on how to fix it?
EDIT:
The error was related to the UnitTest target.
I deleted such target (as I am not doing unit tests) and the warning disappeared.
For each target that needs to be built:
Go to Build Settings > Architectures
Set to $(ARCHS_STANDARD)
Go to Build Settings > Valid Architectures
Set to arm64, armv7, armv7s
Perform a Product > Clean just to be safe and Product > Build your project for the iPad Mini 3.

XCode 4.5 - Undefined symbols for architecture armv7

I'm brand new to iOS development, and I've been given the task of updating a legacy app to iOS6. The app was built with Unity. In XCode 4.5, when I try to run the Unity-iPhone app on my device (iPhone 4), I get this error:
Xcode cannot run using the selected device.
Choose a destination with a supported architecture in order to run on this device.
I went to the build settings for the target, and noticed that armv6 was set for architectures and valid architectures. I changed both of these settings to be Standard(armv7, armv7s). When I tried to run the project, I got 104 compiler errors like this one:
Undefined symbols for architecture armv7:
"ForceInclude_BaseBehaviourManager()", referenced from:
RegisterManagerClasses() in RegisterClasses.o
So, it's not just a matter of importing the right frameworks into the project. These are all methods in one of the source files. How can they be undefined for armv7? Also, how would one solve this issue?
NOTE: For running app in device the device IOS version must match with the IOS DEPLOYEMENT TARGET
see below image:
Just change the IOS DEPLOYEMENT TARGET with Your Device IOS.
Select Project->Select Info(tab)->select the IOS deployment Target from the drop down box
ALSO NOTE :Xcode 4.5 (and later) does not support generating armv6 binaries.
I'm not sure what version of the Unity engine you are using, but does it support armv7?
Because if it does not, and it only supports armv6, then you will have to downgrade your Xcode version so that you use a compiler that compiles armv6 binaries, because Xcode 4.5 doesn't do this.
If you are using a version of Unity which supports armv7, then you need to set your minimum deployment version to iOS4.3
try architecture armv6 and armv7
clean the project
build again.

XCode 4.3.2 Application executable is missing a required architecture. At least one of the following armv7

I have installed XCode 4.3.2 on Lion 10.7.3
I try to distribute my application in AppStore, but when I do validate, I get error message:
"iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv7", but i have this architecture in target settings.
I added "armv6" to Architectures in Build Settings (as recommended by many people), but it's didn't work for me.
Here are Build settings of my project:
---Architetures---
Architetures - Standard (armv7)
Release - Standard (armv7)
Base SDK - Latest iOS (iOS 5.1.)
Build Active Architecture Only - No
Supported Platforms - iphonesimulator iphoneos
Valid architectures - armv7
---Build Options---
Build variants - normal
Compiler for C/C++/Objective-C - Default compiler (Apple LLVM compiler 3.1)
Responding to the updated question in your comment:
To drop armv6 support under Xcode 4.5.x, raise the iOS Deployment Target to 4.3 or higher, and remove armv6 from the build architectures and active architectures for your Target.
Added: You can't do this if you included any 3rd party libraries that are armv6-only, until you get newer updated libraries.
I just updated Firemonkey by Update 4 Hotfix 1 and it's all compiled.
http://blogs.embarcadero.com/ao/2012/04/12/39245
Thanks to all!

Resources