Are my iOS apps now 64 bit?

Discussion in 'iOS Programming' started by Sven11, Nov 7, 2013.

  1. Sven11, Nov 7, 2013
    Last edited: Nov 7, 2013

    Sven11 macrumors 6502a

    Joined:
    Sep 25, 2010
    #1
    I'm just wondering if my iOS apps are 64 bit now after they've been updated to iOS 7 or if I missed something since I can't see any information in Xcode regarding how many bits my app has? Maybe I have to add another architecture, but my iPhone 5s just says "ARM", not "ARMvX" or something like that?

    My current values are:

    Guess "arm64" makes it 64 bit, so everything should be OK?
     
  2. LukasValine macrumors regular

    LukasValine

    Joined:
    Nov 5, 2013
    #2
    All you need to do is change the Architecture build setting to “Standard Architectures (including 64-bit)," so you should be good.

    Here is Apple's guide: https://developer.apple.com/LIBRARY/IOS/documentation/General/Conceptual/CocoaTouch64BitGuide/ConvertingYourAppto64-Bit/ConvertingYourAppto64-Bit.html#//apple_ref/doc/uid/TP40013501-CH3-SW1
     
  3. xArtx macrumors 6502a

    Joined:
    Mar 30, 2012
    #3
    How many bits my App has?

    Well yes, since I can only see ARMv7 and V7s.
    My first model iPhone 5 can run both of them.

    From what I hear you are most often better off
    compiling only for ARMv7 to save space.
     
  4. Tander macrumors 6502a

    Tander

    Joined:
    Oct 21, 2011
    Location:
    Johannesburg, South Africa
    #4
    Personally, I think if your app is not a gaming app or an app that uses a lot of CPU power - going to 64Bit will be a bit of a waste.
     
  5. Duncan C macrumors 6502a

    Duncan C

    Joined:
    Jan 21, 2008
    Location:
    Northern Virginia
    #5
    What you want is a fat binary that includes both 32 bit and 64 bit versions of your code. It looks like arm64 IS the setting for 64 bit, so yes, your app should run in native 64 bit mode on the 5s and the new "iPad lite".

    As the other poster said for most apps there is not a compelling reason to build a 64 bit version. You'll get wider registers so some "heavy lifting" math and vector processing will be faster, but most apps will not see a difference.
     
  6. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #6
    Not only valid ARCHs has to include arm64 but ARCHs does also. It should say armv7, armv7s, arm64.

    When you change this setting the compiler will emit warnings for code that it believes not be 64-bit clean. You will almost certainly have dozens or even hundreds of warnings. If you've never seen any warnings for 64-bit issues then you've probably never turned on 64-bit.

    Regarding whether apps run faster in 64-bit mode I don't know. Apple has seemed to claim that in general apps WILL run faster in 64-bit mode. All apps. Apparently the iOS libraries are present in both 32 and 64 bit versions on devices that can run in 64-bit mode. The 32-bit libraries are only loaded if some app needs them. If all apps on the device are in 64-bit mode then the 32-bit libraries will never need to load. And Apple says that would be a good thing.

    For some reason building for 64-bit mode requires NOT building for iOS 5. So although I've fixed the code to compile clean for 64-bit mode for a few apps I haven't actually released an app that is compiled for 64-bit mode. Probably we'll see more and more 64-bit apps over the next six months to a year.
     
  7. adildacoolset macrumors 65816

    Joined:
    Sep 5, 2011
    Location:
    Lusaka, Zambia(If you know where it is)
    #7
    Yup, it must be a massive waste of time and effort to check a freakin box so it compiles to 64-bit. Even then, you'll probably have to do it sometime or another.
     
  8. Sven11 thread starter macrumors 6502a

    Joined:
    Sep 25, 2010
    #8
    Xcode 5.0.1 included support for 64 bit down to iOS 5.1.1. I'm now sure that my apps run on 64 bit because when I try to run them on an old iOS 5.1.1 device I receive an error message that 64 bit apps only support iOS 5.1.1 when they are available on the App Store, distribution trough Xcode requires iOS 6 or later. Oh and I don't have any space problems, my apps only require less than a MB more space after the 64 bit upgrade.
     
  9. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #9
    The file command on a Mac will tell you what architectures are in a binary.
     
  10. xArtx macrumors 6502a

    Joined:
    Mar 30, 2012
    #10
    He meant massive waste of space, and money, for every user that downloads it,
    which, depending on the App, very well could be.
     
  11. Tander macrumors 6502a

    Tander

    Joined:
    Oct 21, 2011
    Location:
    Johannesburg, South Africa
    #11
    Exactly that. I wasn't even talking about its' implementation.
     

Share This Page