I am developing an application in cocoa which is not compatible with snow os .Is it possible to show an alert message while user try to launch the application in snow os?
Asked
Active
Viewed 264 times
1
-
Er, do you really mean it's compatible with 10.5 and not 10.6? The more normal question would be how to specify that it's compatible with 10.6 and not 10.5. – Ken Jan 22 '10 at 10:31
-
yes my app is not compatible with 10.6 and now i need to show an alert message in version 10.6. – MobX Jan 22 '10 at 10:40
-
2How is this different from your previous question? http://stackoverflow.com/questions/2115373/os-version-checking-in-cocoa – Peter Hosey Jan 22 '10 at 12:13
-
Probably the best solution is to make the app compatible with 10.6. – Rob Keniger Jan 25 '10 at 23:29
2 Answers
3
#ifndef NSAppKitVersionNumber10_5
#define NSAppKitVersionNumber10_5 949
#endif
if(NSAppKitVersionNumber>NSAppKitVersionNumber10_5)
{
NSAlert *alert = [NSAlert alertWithMessageText:@"Failed OS check"
defaultButton:NSLocalizedString(@"OK", @"")
alternateButton:nil otherButton:nil
informativeTextWithFormat:
@"I am a hard up developer that cannot afford to keep up with my
customers. If only they would buy more of my apps i could afford
maybe a new mac mini with Snow Leopard on it and bring my
App upto date. The problem is that unless i can bring my
app upto date i am not likely to get many customers at all.
If you know how that film with Art Garfunkel ended could
you please let me know."];
[alert runModal];
} else {
// start up app
}
*(thanks adium)
0
You need to add the key LSMinimumSystemVersion
to your app's Info.plist. As per the documentation:
This string must be of the form n.n.n where n is a number. The first number is the major version number of the system. The second and third numbers are minor revision numbers. For example, to support Mac OS X v10.4 and later, you would set the value of this key to "10.4.0".

Rob Keniger
- 45,830
- 6
- 101
- 134
-
I made the same mistake on the questioner's previous question. The app works fine on Leopard, but for some unspecified reason, will/should not work on Snow Leopard. – Peter Hosey Jan 22 '10 at 22:47