user1752552
user1752552

Reputation: 45

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?

Upvotes: 0

Views: 4951

Answers (3)

9to5ios
9to5ios

Reputation: 5545

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

enter image description here

ALSO NOTE :Xcode 4.5 (and later) does not support generating armv6 binaries.

Upvotes: 1

yunas
yunas

Reputation: 4163

try architecture armv6 and armv7
clean the project
build again.

Upvotes: 0

Abizern
Abizern

Reputation: 150615

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

Upvotes: 0

Related Questions