XCode 4.5 - Undefined symbols for architecture armv7 - ios

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.

Related

Xcode build target difference - arm64 and armv7, arm64

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:

Unable to build Xcode Project: clang error: linker command failed

I have a Unity project which I have successfully built for Android without issue. When trying to build for iOS I am encountering an issue once the project is in Xcode.
Unity compiles without any errors and creates an Xcode project.
Upon opening the Xcode project I have NO simulators available. I can get these simulators by selecting ios in the Supported Platforms section, at which point simulators become available - originally Supported Platforms is set to iphoneos. This seems extremely odd behaviour to me, and suggests something larger going wrong.
After getting a simulator to select I get the following error when trying to compile/run/build:
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The full error is available on Pastebin (too large to post directly on here):
https://pastebin.com/3fYR8fE3
I'm really at a loss on what I can do. I have tried a number of things, including:
Building from Unity as Debug and Release
Building from Unity with 'Symlink Unity Libraries' on and off
Building from Unity with .Net 3.5 and .Net 4.* flavours
Manually adding the libiconv.2.dylib file in the linked frameworks tab as the .tbd equivalent
Setting the target minimum version of iOS to 9.0 (negates the need for libiconv.2.dylib entirely)
I am using latest versions of everything:
Unity 2018.2.17f1
Xcode 10.1
It seems like you have the library il2cpp built for another architecture, have you tried to change your target's "Build Settings > Build Active Architectures Only" to "No"?
However I made some researches and it seems that Unity for iPhone doesn't deploy on simulator. It only works on device or in the Unity editor. Check this link out

Error showing : dyld_sim is not compatible with the loaded process

I have a source code of an app that is live in iPhone (for OS iOS 7 and before) and it is not supported in iOS 8.0 and later. When I tried to compile the code it is executing all the files fine, but it is throwing an architecture mismatch error.
In console:
dyld: dyld_sim is not compatible with the loaded process, likely due
to architecture mismatch
I tried adding valid architectures (armv7 armv7s arm64) in Build settings for both iPhone and Xcode iOS simulators. Still doesn't fix the issue...
Please help me...
I am using Xcode 9.2.
Valid Architectures
Follow the steps below. Hope it will work.....
Change Deployment target to recent one like >= 9.0
Select Standard architectures for Architectures from Build Settings> Architectures

Validation fails with reference to armv6 but armv6 is not in the project

I am trying to update an application for the Apple App Store and when I attempt to validate it it fails with error "iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv6". The problem is that I don't reference armv6 that I can find and my ios deployment target is 4.3. I am using xcode 4.5.1.
Settings:Architectures -> "armv7, armv7s" for all configurations.
I have already tried the information recommended here as well as other things with no success.
iOS 6 - "application executable is missing required architecture: armv6"
The ios deployment target must be set for both the project and the target application.
Add armv6 to the architecture if your deployment target less 4.3

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