Do two version apps need for iOS5 and iOS6?

Discussion in 'iPhone/iPad Programming' started by mikezang, Sep 18, 2012.

  1. macrumors 6502a

    Joined:
    May 22, 2010
    Location:
    Tokyo, Japan
    #1
    I just want to know if I have to build two versions app for both iOS5 and iOS6?
     
  2. macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    Nope, you have to check in code on what device you are, and make your code depend on that..
     
  3. thread starter macrumors 6502a

    Joined:
    May 22, 2010
    Location:
    Tokyo, Japan
    #3
    Sorry, maybe I did't talk clear, I want to say even if I do not use iOS6 new features, i can compile for iOS6 Simulator, but when I try to compile for my iPad with iOS5, I got compile error, so that I ask this Q.
     
  4. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    What compile-time error?
     
  5. macrumors 6502a

    Duncan C

    Joined:
    Jan 21, 2008
    Location:
    Northern Virginia
    #5
    No. You want to set up your project with the "Base SDK" set to 6.0. That will enable you to build iOS 6.0 features into your app.

    Then you want to set the "deployment target" to 5.0, or the lowest iOS version that you want to support.

    Finally, for features that are only available in 6.0, you need to add runtime code that checks to see if the feature is available and only calls new OS frameworks and methods if they are available. This last part is the tricky part.

    Note that if you're not doing anything iOS 6 specific, you can simply set your base SDK to 5.0. Then you'll build an app that will run on iOS 5 or higher, but will only support features that are available in iOS 5.
     
  6. thread starter macrumors 6502a

    Joined:
    May 22, 2010
    Location:
    Tokyo, Japan
    #6
    ld: file is universal (3 slices) but does not contain a(n) armv7s slice:
     
  7. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #7
    Sounds like the compile-time error I get from my AdMob library. I believe you'll need to wait for Google to update their libGoogleAdMobAds.a
     
  8. macrumors 68000

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #8
    No. Just set your Architectures entry for the Build Settings to armv7. When your libraries catch up you can set the value back to "Standard (armv7, armv7s)".

    If you build you own libraries, then you should be able to recompile them now. It's those third party libraries that people are forced to work around.

    The armv7s should run previous code just fine, otherwise a lot of apps would out right break on iOS 6. Not that there aren't other potential issues. :eek:
     
  9. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #9
    Just an update from Google on this AdMob SDK for iOS 6 matter:

    https://groups.google.com/forum/?fromgroups=#!topic/google-admob-ads-sdk/9Wub-gh9rf8
     
  10. macrumors 68000

    Reason077

    Joined:
    Aug 14, 2007
    #10
    Hmm. So apps that aren't built for armv7s get black-barred? Even if you have a Default-568h@2x LaunchImageFile?
     
  11. thread starter macrumors 6502a

    Joined:
    May 22, 2010
    Location:
    Tokyo, Japan
    #11
  12. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #12
    No, I'm pretty sure if you have the Default-568h@2x image, you won't get letterboxed. I believe this is how the detection is being done. Seems a little wonky to base this on the presence of a specifically-named image (universal apps don't work like this), so hopefully Apple will come up with a better method in the future.
     
  13. macrumors 65816

    GenesisST

    Joined:
    Jan 23, 2006
    Location:
    Where I live
    #13
    This was the result of my investigation as well
     

Share This Page