tags:

views:

45

answers:

2

Hi, 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?

A: 

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
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
+2  A: 
#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)

Ahh, i see you already asked this and it was already answered for you.