How will iPhone 5 apps work on old iPhones?

Discussion in 'iOS Programming' started by Nosrettap, Sep 12, 2012.

  1. Nosrettap macrumors member

    Dec 22, 2010
    Has it been announced yet how iPhone 5 apps will work on older iPhones?

    For example, if I create an app to take advantage of the 4 inch screen will I also have to create another version of my app to support the older 3.5 inch screen?
  2. larswik macrumors 68000

    Sep 8, 2006
    I read through the feed from the announcement. what will happen to 3.5 inch screens apps. It seems they will run the same size on a 4" but the extra space around it will be a black letter box.

    I will be curious what extensions will called so I can update my app.I wonder if they will add to this list. (saw these specs on from a year ago),

    1) image@2x~iphone.png (retina only)
    2) image@2x.png (retina only)
    3) image~iphone.png
    4) image.png
  3. jnoxx macrumors 65816


    Dec 29, 2010
    Aartselaar // Antwerp // Belgium
    Lars, he asked it the other way around or am I mistaking?
    The 3.5 apps are gonna be letterboxed on the iphone 5 (me and the developers are looking for a way to create a seperate xib or so for the iPhone 5? or make it autoresize to disable the letterbox, so if anyone knows, please let me know).
    But the other way around, an 4" app, how will it run on the 3.5, they didn't talk about that on the feed ;(
  4. thewitt macrumors 68020


    Sep 13, 2011
    You will need two versions of the app, or at least one version smart enough to display on both screen sizes.
  5. larswik macrumors 68000

    Sep 8, 2006
    Opps, you are right. I landed in Sweden yesterday to visit family and I am 9 hours jet lagged. I read it the wrong way. My bad.
  6. gnasher729 macrumors P6


    Nov 25, 2005
    You don't have to create different versions at all. The reason why current apps cannot all the space is because they haven't been tested with the new iPhone, and therefore iOS _pretends_ they have a smaller screen.

    The first thing you should do is ask the OS "give me a list of all screens". You'll get a list, and there will always be one screen for the device itself, but there can be more screens for example when the iPhone is connected to a TV. Some games use that to display the game on the second screen and use the first screen as a game controller.

    Next you check how big the first screen is. And then you put windows and views on that screen according to the screen size. Like iOS itself, which puts fewer or more rows of apps on the screen, depending on screen size. Just don't assume that you know how big the screen is, it is as big as iOS tells you.

    Now you could and should have done all that before the iPhone 5 was released (Mac developers do that all the time, because of resizable windows). But Apple knows that many developers didn't, and the code would be untested anyway. So the developer _first_ tells iOS that they know about iPhone 5, and then iOS tells them the true screen size. If they leave that step out, iOS lies - as a result, you don't get the full screen, but it works.

    If a developer writes an app that works on iPhone 5, but not on iPhone 4S, then it probably won't pass the app store police :D

Share This Page