17

I just updated to xcode 5.1 - apple decided to make all apps compile to 64bit by default - My app has some legacy code and I spent the last couple of hours figuring out how to STOP Xcode building for 64bit. Thought this might help people with the same problem...

See the accepted answer for a clearer visual walk thought

(my original text based answer...)

In Targets-->Build Settings-->Architectures-->Architectures

  1. select other
  2. delete (press '-') $(ARCH_STANDARD)
  3. add (press '+') armv7
  4. add (press '+') armv7s
  5. clean and build
Joe Booth
  • 501
  • 1
  • 4
  • 13
  • 1
    you need to edit the answer part of your question and include it as an answer below. Voted you up - rather than down - anyway as this was very useful thanks. – Max MacLeod Apr 25 '14 at 14:11

2 Answers2

37

OP is posted the solution along with the question itself. But I feel it would be better to add it as an answer. In Xcode 5.1 apple made significant changes to the architecture section. They made arm64 as part of Standard architectures. That means the projects using the default setting will be automatically build for arm64 also. So what you will do if your app does not support arm64?.

Doc says:

Projects not able to support 64-bit need to specifically set the architectures build setting to not include 64-bit.

How to do that?

  1. Goto Targets-->Build Settings-->Architectures-->Architectures

  2. Double click on the architecture will popup a menu. Choose others

    enter image description here

  3. Delete the existing row - $(ARCH_STANDARD). Add the required architectures one by one

    enter image description here

  4. Now your architecture section will look like this

    enter image description here

Anil Varghese
  • 42,757
  • 9
  • 93
  • 110
  • 1
    when I modify my arch like this, the app run as normal on Iphone 64bit (Iphone 5, 5s..)? – AITAALI_ABDERRAHMANE Apr 09 '14 at 07:40
  • I have the same question. – Bagusflyer Apr 16 '14 at 01:31
  • 5
    Note that the A7 includes a full 32-bit compatibility mode that allows running normal 32-bit ARM code without any changes and without emulation. This means that the iPhone 5S runs old iPhone apps with no problem and no performance impact compared to other hardware. 32-bit code does potentially run with somewhat reduced performance since it gets none of the advantages of ARM64. https://www.mikeash.com/pyblog/friday-qa-2013-09-27-arm64-and-you.html – gagarwal Apr 18 '14 at 21:53
  • What should be in the valid architecture field? – Chanchal Raj Oct 07 '16 at 11:34
12

Or just use $(ARCHS_STANDARD_32_BIT)

Arman H
  • 5,488
  • 10
  • 51
  • 76
Cameron
  • 131
  • 1
  • 4