Re: Gracefully failing on unsupported OS version
Re: Gracefully failing on unsupported OS version
- Subject: Re: Gracefully failing on unsupported OS version
- From: Ali Ozer <email@hidden>
- Date: Mon, 18 Apr 2005 11:13:37 -0700
In addition to setting the LSMinimumSystemVersion key as others have
described, you can do one of several things, such as check AppKit
version number:
if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_3) {
/* On a 10.3.x or earlier system, put up alert */
}
or check for the Tiger class in question:
if (!NSClassFromString(@"NStigeronlyclass")) {
/* On a 10.3.x or earlier system, put up alert */
}
If you use Tiger symbols or function calls (not methods or classes)
which are not appropriately weakly linked (they aren't declared as
AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER), your app might refuse to
launch at all. From what you describe below this doesn't seem to
be the problem though.
Ali
Begin forwarded message:
From: John Brownlow <email@hidden>
Date: April 18, 2005 10:43:56 PDT
To: Cocoa List <email@hidden>
Subject: Gracefully failing on unsupported OS version
My app is targeted at 10.4 and better. I know that whatever I do,
people are going to download it and try to use it on earlier
versions. I don't want to use an installer, just the drag-to-
Applications thing. However, as currently configured, on pre-10.4
systems the app just fails to launch without a word of explanation.
The syslog shows that the cause of the crash is "failed
objc_getClass(NS**tigerOnlyClass**)"
What's the nicest way of catching this problem without using an
installer? If the app won't launch in, say, 10.3, how can I tell
the user very politely that they need to upgrade if they want to
use my app?
--
John Brownlow
Deep Fried Films, Inc
http://www.johnbrownlow.com
http://www.pinkheadedbug.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden