Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

new ios6 architecture error: file is universal (3 slices) but does not contain a(n) arm7vs slice

I have a device that was designed in cordova 1.8.1 and xcode 4.4. I wanted to be able to update it to work on the iPhone 5 and ios 6.However even when I try to just run the app for debugging in xocde 4.5 I receive this error:

file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/Shared/Cordova/Frameworks/Cordova.Framework/Cordova for architecture armv7s. 

I have googled it, and tried to set the project to target arm7vs but it doesn't work. Can anyone tell me what causes this error?

Do i need to update my version of Cordova/PhoneGap?

like image 469
Bohdi Avatar asked Oct 02 '12 08:10

Bohdi


1 Answers

iPhone 5's SoC has a new architecture: armv7s. When you switched to Xcode 4.5, your project's "Valid Architectures" setting might have been updated to include armv7s as well. The problem is that your libraries do not seem to support it yet (they are not built for armv7s).

You have three options to fix this:

  • Remove armv7s from the project (target) "Build Settings" / "Valid Architectures": enter image description here

  • Set the "Build Active Architecture Only" setting to YES:
    enter image description here

  • Update the static libraries (if they have a newer version with armv7s support)

EDIT: For those who cannot find the Build Active Architecture Only option, make sure that the "All" filter button is active under Build Settings:

enter image description here

like image 130
Imre Kelényi Avatar answered Oct 23 '22 22:10

Imre Kelényi