Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
9,544
6,042
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?)
 

thundersteele

macrumors 68030
Oct 19, 2011
2,984
9
Switzerland
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.
 

Blakeasd

macrumors 6502a
Dec 29, 2009
643
0
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.
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,565
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?)

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.
 

rossipoo

macrumors regular
Jun 7, 2009
109
0
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.
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,565
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.

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.
 

PatrickCocoa

macrumors 6502a
Dec 2, 2008
751
149
Stop

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.
 

Member(TM)

macrumors member
May 21, 2011
40
0
Spain
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.
 

thundersteele

macrumors 68030
Oct 19, 2011
2,984
9
Switzerland
I wonder if Leopard still has 22%. Didn't think that many people were still on it.

The validity of the above report has been disputed elsewhere:
http://www.appleinsider.com/article...te_mac_os_x_lion_still_growing_very_fast.html

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% !!!
 

robvas

macrumors 68040
Mar 29, 2009
3,240
629
USA
The validity of the above report has been disputed elsewhere:
http://www.appleinsider.com/article...te_mac_os_x_lion_still_growing_very_fast.html

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% !!!
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.
 

EricBlue

macrumors newbie
Mar 8, 2012
29
2
The validity of the above report has been disputed elsewhere:
http://www.appleinsider.com/article...te_mac_os_x_lion_still_growing_very_fast.html

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% !!!

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.
 

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
9,544
6,042
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?
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,565
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?

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.
 

EricBlue

macrumors newbie
Mar 8, 2012
29
2
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.

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.

----------

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.

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?

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

EricBlue

macrumors newbie
Mar 8, 2012
29
2
How could I make a snow leopard XIB on a machine running lion?

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:

Code:
          SInt32 MacVersion;
            
            if( Gestalt( gestaltSystemVersion, &MacVersion ) == noErr )
            {
                if( MacVersion < 0x1070 ) /* Older then Lion  */
                {
                    self = [super initWithWindowNibName:@"WindowSnowLeopard"];
                    
                }
                else
                {
                    self = [super initWithWindowNibName:@"WindowLion"];
                }
            }
 

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
9,544
6,042
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:

Code:
          SInt32 MacVersion;
            
            if( Gestalt( gestaltSystemVersion, &MacVersion ) == noErr )
            {
                if( MacVersion < 0x1070 ) /* Older then Lion  */
                {
                    self = [super initWithWindowNibName:@"WindowSnowLeopard"];
                    
                }
                else
                {
                    self = [super initWithWindowNibName:@"WindowLion"];
                }
            }
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?
 

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
9,544
6,042
Is it a NSPopupButton that is the problem?

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.
 

EricBlue

macrumors newbie
Mar 8, 2012
29
2
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.

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.
 

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
9,544
6,042
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.

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?
 

robvas

macrumors 68040
Mar 29, 2009
3,240
629
USA
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?

Virtual machine running Snow Leopards
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.