1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Support older OS's?

Discussion in 'Mac Programming' started by ArtOfWarfare, Feb 25, 2012.

  1. macrumors 603


    I've received an email from a customer who asked why my app is Lion only.

    Honestly, the answer is, I have no idea. I don't think my app relies on anything in Lion that wasn't in Snow Leopard.

    So my question is, what do I need to change to make it so my app will run on Snow Leopard?

    I assume there are a few fields in my Xcode project I need to change... and maybe some on iTunes Connect, as well?

    Also, any suggestions on how I can test my app on Snow Leopard before releasing it? (Or should I not really worry about that?)
  2. macrumors 68030

    Xcode 4.2/4.3 builds for Lion only by default. You can change this in the build settings.

    Unfortunately I'm not sure how exactly to achieve this. One option is to change the "deployment target" on the summary page of the project to an earlier version. This might do the trick.

    Otherwise you can change back to use the 10.6 SDK, but I don't think this is the right thing to do.

    You should definitely find someone who can test the app on SL.
  3. macrumors 6502a

    Before you build for Snow Leopard, I would suggest checking to make sure the frameworks you used can be built for Snow Leopard as well as Lion.
  4. macrumors G5


    You should never release any software that you haven't tested. If your Mac was originally sold with 10.6, then you should be able to install 10.6 again on a separate partition or on an external drive. If your Mac shipped with Lion, tough.

    To run on 10.6, you need to change the "deployment target" in XCode to 10.6. This allows the app to run on 10.6. Now there are two possibilities: Your app either doesn't use any 10.7 features, or it does.

    If you don't use 10.7 features, then you just build with the 10.6 SDK. If you use 10.7 features, then obviously you need to avoid using them when running on 10.6, or your app will just crash. Now we are talking about serious work and need for seriously careful programming and testing. Tell us if you want to go down that road.
  5. macrumors regular

    Wirelessly posted (Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3)

    You don't need to change libraries, in fact I would recommend using the latest available. If you set your deployment target to the minimum version you want to support, then the compiler will ensure that it will work for that platform. If you use a feature that is not available, an error will occur for offending lines of code.
  6. macrumors G5


    Nonsense. Total nonsense. If you don't change the SDK, the app will start happily on 10.6 and crash when the first 10.7 function is called, without any warning by the compiler.
  7. macrumors 68030

  8. macrumors 6502a


    SLOW DOWN! or better yet, STOP.

    This is a huge decision that will have major ramifications for your development cycle for years and years. Think very carefully before you support older OS version.

    Most of the advice you've received is about technical aspects of how to do this. But the major issues are not technical, they're business. What is the benefit to supporting the older system and what is the cost?

    The benefit is (presumably) more sales. How many more sales? Let's say $X. You can come up with your own estimate of $X.

    The cost is the extra time and money you spend. You will absolutely need a hardware setup with the older OS for testing.

    There are many other considerations - you have taken the first step on a road to Troubleville. Since you asked my advice, reply either:

    a) we support only Lion, thanks for your inquiry.

    b) we support only Lion as we want to focus our development energy on making the best software to help you do whatever it is you do, thanks for your inquiry.
  9. macrumors member

    I would still recommend to support Snow Leopard for releases in the short term, unless you cannot afford the cost of working to revise possible Lion-only code and having a Snow Leopard test system.

    From time to time I check my web server logs, and in February downloads of my programs from Snow Leopard still made about 32%, which is not negligible. That means 32% users that would have looked elsewhere if I had stopped supporting Snow Leopard, and even when most will eventually upgrade to Lion they might choose not to return to my program if they have found something else that does the job.

    For releases in the long term, it's obvious that the Snow Leopard user base can only shrink, so in that case it's true that it may make little business sense to care about supporting it.
  10. macrumors newbie

  11. macrumors 68000

    I wonder if Leopard still has 22%. Didn't think that many people were still on it.
  12. macrumors 68030

    The validity of the above report has been disputed elsewhere:

    I don't know if that report is more accurate, but I find it more plausible. Mac sales are going up, and all new Macs come with Lion, so a stagnant share would be very surprising. The link reports 30% in november 2011, and if you follow another link to netmarketshare.com they claim it's close to 40% now.

    Anyways, if you go where the market share is, then the program should be ported to windows... 92% !!!
  13. macrumors 68000

    XP is still alive and kicking somehow after what, 10 years? The speed at which Apple releases and obsoletes an OS version is both good and bad I guess.

    Aug 2009 to Spring 2012 isn't a bad run for Snow Leopard I guess.
  14. macrumors newbie

    I don´t claim Lion is not growing. It´s quite obvious as you can´t buy snow leopard anymore.

    But I believe that Snow Leopard is still a big player and will be for some time. So its unfortunate to ignore all SL users.

    If you look at the latest serverstats from Wikimedia (with wikipedia.org hitstats), you see that the user share for february is:

    Snow leopard 50.4 %
    Lion 32.7 %
    leopard 16.9 %

    It´s also not hard to make an app run on both Snow Leopard and Lion, as the differences on the SDK, is quite negligible.
  15. macrumors 603


    I found a relative's old computer running snow leopard and was able to test on it.

    All I had to do to make it work was change the OS version I was building for. I had to leave the base SDK the same... Seemed odd to me but it worked.

    The only issue I found was that some of the text I'd laid out in a XIB didn't fit in the space on snow leopard. Namely, I have a text button with a drop down menu that was perfectly sized so that on lion all the text fits in the button regardless of option chosen. Under snow leopard though, the button is more bubbly so the text has a greater inset and the text gets truncated. Any suggestions on how to handle both lion's cleaner UI elements and snow leopard's more bubbly ones?
  16. macrumors G5


    You should at the very least compile with the 10.6 SDK. If there is any code that doesn't compile with the 10.6 SDK, that code would crash if it is executed on 10.6.
  17. macrumors newbie

    If you compile with 10.6 sdk, and find calls thats 10.7 only, you need to take care of those calls. And then there is no problem building with 10.7 SDK.


    I sometimes, use one xib for Snow Leopard and one xib for Lion.
  18. macrumors 603


    How could I make a snow leopard XIB on a machine running lion?
  19. macrumors newbie

    It's a regular XIB, but you layout it for Snow leopard. And also leave out elements thats Lion only (if you have any). Then in code, you check for the osx version and load the appropriate xib. An example:

              SInt32 MacVersion;
                if( Gestalt( gestaltSystemVersion, &MacVersion ) == noErr )
                    if( MacVersion < 0x1070 ) /* Older then Lion  */
                        self = [super initWithWindowNibName:@"WindowSnowLeopard"];
                        self = [super initWithWindowNibName:@"WindowLion"];
  20. macrumors 603


    I think you misunderstood my question.

    I meant to ask: how one can use the snow leopard version of UI elements in the interface builder portion of Xcode on a machine running Lion?
  21. macrumors newbie

    Is it a NSPopupButton that is the problem?
  22. macrumors 603


    Yes, I think so. The arrows on the right side of the button take up much more space under snow leopard than lion, so much so that the last few letters of a word are cut off under snow leopard.
  23. macrumors newbie

    Hmm. Could one solution be that you make a Xib that you use for SL, and in that xib make the nspopupbutton larger in interface builder? And in that way make the text fit the button.
  24. macrumors 603


    Yes, ultimately that's what needs to be done.

    You keep missing what my question actually is.

    I do not have a development computer running Snow Leopard. How can I create an interface using Snow Leopard UI elements (the more bubbly, aqua elements,) that were replaced in Lion, on a machine running Lion? Is it possible?
  25. macrumors 68000

    Virtual machine running Snow Leopards

Share This Page