3

I have to update an application for iOS, which is running from iOS 3.1.3 to the latest 5.1.

When I build the code on the new Xcode 4.3.1 and try to test this app on an old device with iOS 3.1.3 I get an error "Bad CPU type on executable".

iOS Deployment Target = 3.1.3
Architectures = armv6 $(ARCHS_STANDARD_32_BIT) - armv6 $
Valid Architectures = armv6 armv7

If I add armv5 to the list of valid architectures, the code is installed on the device, but the application starts with a black screen and nothing happens. Then I can stop the program and start it on the device. It seems to be working then.

Is it allowed to add armv5 to the list of valid architectures? Is this the solution to get rid of the error?

thpitsch
  • 2,016
  • 2
  • 21
  • 27
  • I don't know what's happening in your project but you shouldn't use "armv5"! Have you tried adding armv7? – fbernardo Mar 21 '12 at 09:08
  • I don't think armv5 is needed. Try setting the value of Architectures to the string "armv6 armv7", i.e. remove the `$(ARCHS_STANDARD_32_BIT)` variable. Here' a related question with screenshots http://stackoverflow.com/questions/4198676/warning-iphone-apps-should-include-an-armv6-architecture-even-with-build-config – Alexei Sholik Mar 21 '12 at 09:10
  • After setting the value of Architectures to the string "armv6 armv7" the program runs on the 3.1.3 device. Thank you! – thpitsch Mar 21 '12 at 10:21
  • @thpitsch have you found a way around this problem? – Krishnabhadra Jun 01 '12 at 05:46
  • There is no such thing as armv5 on iPhone actually. The original iPhone started with armv6. Then Apple upgraded it to armv7. – apple16 Jun 04 '12 at 22:13

2 Answers2

2

I saw the same problem today with iOS 4.1 and Xcode 4.3.3. The fix - just re-open Xcode and re-connect the phone.

Pavel
  • 421
  • 1
  • 4
  • 14
1

I resolve this magic problem after "Reset network settings" in device (on iPad2 and iPhone3GS). It's pure magic!

Alex Nazarov
  • 1,178
  • 8
  • 16