Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 25, 2012, 01:49 PM   #1
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Support older OS's?

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?)
__________________
Don't tell me Macs don't last: 2007 iMac, 2007 Mac Mini, 2008 MacBook Air, all Vintage.
(iMac obsoletion: April 28, 2015, MBA: October 14, 2015, Mac Mini: March 9, 2016)
ArtOfWarfare is offline   0 Reply With Quote
Old Feb 25, 2012, 01:56 PM   #2
thundersteele
macrumors 68030
 
Join Date: Oct 2011
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.
thundersteele is offline   0 Reply With Quote
Old Feb 25, 2012, 06:02 PM   #3
Blakeasd
macrumors 6502a
 
Join Date: Dec 2009
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.
Blakeasd is offline   0 Reply With Quote
Old Feb 25, 2012, 06:25 PM   #4
gnasher729
In Time-Out
 
Join Date: Nov 2005
Quote:
Originally Posted by ArtOfWarfare View Post
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.
gnasher729 is offline   0 Reply With Quote
Old Feb 26, 2012, 02:33 AM   #5
rossipoo
macrumors regular
 
Join Date: Jun 2009
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.
rossipoo is offline   0 Reply With Quote
Old Feb 26, 2012, 03:32 AM   #6
gnasher729
In Time-Out
 
Join Date: Nov 2005
Quote:
Originally Posted by rossipoo View Post
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.
gnasher729 is offline   0 Reply With Quote
Old Feb 26, 2012, 12:43 PM   #7
thundersteele
macrumors 68030
 
Join Date: Oct 2011
Here's a guide:

https://developer.apple.com/library/...nfiguring.html

Has everything one might need to know about building for different OSX versions.
thundersteele is offline   0 Reply With Quote
Old Feb 26, 2012, 05:09 PM   #8
PatrickCocoa
macrumors 6502a
 
Join Date: Dec 2008
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.
__________________
iMac 21.5", 3.06GHz, 4 GB, 2 TB HD.
iPod Touch 3G.
PatrickCocoa is offline   1 Reply With Quote
Old Mar 6, 2012, 08:52 AM   #9
Member(TM)
macrumors member
 
Join Date: May 2011
Location: 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.
Member(TM) is offline   1 Reply With Quote
Old Mar 8, 2012, 04:44 PM   #10
EricBlue
macrumors newbie
 
Join Date: Mar 2012
Iīm also in favor of supporting Snow Leopard. In my view far superior to the sluggish Lion.

As people says, it has also a large market share. Even bigger then Lion! (http://insights.chitika.com/2011/mac...fails-to-roar/)
EricBlue is offline   -2 Reply With Quote
Old Mar 8, 2012, 06:34 PM   #11
robvas
macrumors 68000
 
Join Date: Mar 2009
Location: USA
Quote:
Originally Posted by EricBlue View Post
Iīm also in favor of supporting Snow Leopard. In my view far superior to the sluggish Lion.

As people says, it has also a large market share. Even bigger then Lion! (http://insights.chitika.com/2011/mac...fails-to-roar/)
I wonder if Leopard still has 22%. Didn't think that many people were still on it.
robvas is offline   0 Reply With Quote
Old Mar 8, 2012, 07:09 PM   #12
thundersteele
macrumors 68030
 
Join Date: Oct 2011
Quote:
Originally Posted by robvas View Post
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/articles...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% !!!
thundersteele is offline   0 Reply With Quote
Old Mar 8, 2012, 08:01 PM   #13
robvas
macrumors 68000
 
Join Date: Mar 2009
Location: USA
Quote:
Originally Posted by thundersteele View Post
The validity of the above report has been disputed elsewhere:
http://www.appleinsider.com/articles...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.
robvas is offline   0 Reply With Quote
Old Mar 10, 2012, 07:21 AM   #14
EricBlue
macrumors newbie
 
Join Date: Mar 2012
Quote:
Originally Posted by thundersteele View Post
The validity of the above report has been disputed elsewhere:
http://www.appleinsider.com/articles...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.
EricBlue is offline   -1 Reply With Quote
Old Mar 10, 2012, 09:01 AM   #15
ArtOfWarfare
Thread Starter
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
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?
__________________
Don't tell me Macs don't last: 2007 iMac, 2007 Mac Mini, 2008 MacBook Air, all Vintage.
(iMac obsoletion: April 28, 2015, MBA: October 14, 2015, Mac Mini: March 9, 2016)
ArtOfWarfare is offline   0 Reply With Quote
Old Mar 10, 2012, 09:26 AM   #16
gnasher729
In Time-Out
 
Join Date: Nov 2005
Quote:
Originally Posted by ArtOfWarfare View Post
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.
gnasher729 is offline   0 Reply With Quote
Old Mar 10, 2012, 12:07 PM   #17
EricBlue
macrumors newbie
 
Join Date: Mar 2012
Quote:
Originally Posted by gnasher729 View Post
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.

----------

Quote:
Originally Posted by gnasher729 View Post
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.
Quote:
Originally Posted by ArtOfWarfare View Post
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 is offline   0 Reply With Quote
Old Mar 10, 2012, 01:29 PM   #18
ArtOfWarfare
Thread Starter
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Quote:
Originally Posted by EricBlue View Post
I sometimes, use one xib for Snow Leopard and one xib for Lion.
How could I make a snow leopard XIB on a machine running lion?
__________________
Don't tell me Macs don't last: 2007 iMac, 2007 Mac Mini, 2008 MacBook Air, all Vintage.
(iMac obsoletion: April 28, 2015, MBA: October 14, 2015, Mac Mini: March 9, 2016)
ArtOfWarfare is offline   0 Reply With Quote
Old Mar 10, 2012, 02:04 PM   #19
EricBlue
macrumors newbie
 
Join Date: Mar 2012
Quote:
Originally Posted by ArtOfWarfare View Post
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"];
                }
            }
EricBlue is offline   0 Reply With Quote
Old Mar 10, 2012, 02:38 PM   #20
ArtOfWarfare
Thread Starter
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Quote:
Originally Posted by EricBlue View Post
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?
__________________
Don't tell me Macs don't last: 2007 iMac, 2007 Mac Mini, 2008 MacBook Air, all Vintage.
(iMac obsoletion: April 28, 2015, MBA: October 14, 2015, Mac Mini: March 9, 2016)
ArtOfWarfare is offline   0 Reply With Quote
Old Mar 10, 2012, 04:24 PM   #21
EricBlue
macrumors newbie
 
Join Date: Mar 2012
Quote:
Originally Posted by ArtOfWarfare View Post
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?
Is it a NSPopupButton that is the problem?
EricBlue is offline   0 Reply With Quote
Old Mar 10, 2012, 05:07 PM   #22
ArtOfWarfare
Thread Starter
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Quote:
Originally Posted by EricBlue View Post
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.
__________________
Don't tell me Macs don't last: 2007 iMac, 2007 Mac Mini, 2008 MacBook Air, all Vintage.
(iMac obsoletion: April 28, 2015, MBA: October 14, 2015, Mac Mini: March 9, 2016)
ArtOfWarfare is offline   0 Reply With Quote
Old Mar 11, 2012, 07:59 AM   #23
EricBlue
macrumors newbie
 
Join Date: Mar 2012
Quote:
Originally Posted by ArtOfWarfare View Post
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.
EricBlue is offline   0 Reply With Quote
Old Mar 11, 2012, 12:47 PM   #24
ArtOfWarfare
Thread Starter
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Quote:
Originally Posted by EricBlue View Post
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?
__________________
Don't tell me Macs don't last: 2007 iMac, 2007 Mac Mini, 2008 MacBook Air, all Vintage.
(iMac obsoletion: April 28, 2015, MBA: October 14, 2015, Mac Mini: March 9, 2016)
ArtOfWarfare is offline   0 Reply With Quote
Old Mar 11, 2012, 01:41 PM   #25
robvas
macrumors 68000
 
Join Date: Mar 2009
Location: USA
Quote:
Originally Posted by ArtOfWarfare View Post
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
robvas is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Breaking News: WhatsApp Discontinues Support For Older iDevices faizanshakyboy iPhone and iPod touch Apps 5 Jan 3, 2013 12:22 AM
Increased Airplay Support for Older Macs (iTunes 11) wrestler9111 Mac Applications and Mac App Store 1 Dec 12, 2012 03:58 PM
Increased Airplay Support for Older Macs (x-post from Applications thread) wrestler9111 OS X 0 Dec 12, 2012 03:56 PM
New Features in iOS 6 Receive Spotty Support from Older Devices MacRumors MacRumors.com News Discussion 599 Sep 18, 2012 06:00 PM

Forum Jump

All times are GMT -5. The time now is 04:14 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC