Graceful Shutdown on an Unsupported Earlier Mac OS Version

  • While it is not my intention to support previous versions of Mac OS,
    I'd like my users be informed politely that the latest OS version is
    required and the application shut down gracefully.

    What is the recommended way to do this?

    Basically it boils down to 2 questions:

    1) How do I query the current OS version in Cocoa?

    2) Will my code even have the opportunity to check the OS version, or
    an error will occur on the stage of loading and reported by the OS
    loader, before a single line of my code gets executed? I'm asking this
    because this would be the case on Windows when the required statically
    linked DLLs, are missing or have incorrect version.

    I do not have any previous version of Mac OS at my disposal, so I
    can't test what happens. I wish Mac OS X is smart enough to take care
    of the problem without the need of any coding. I want to make sure.
  • See http://homepage.mac.com/chris_campbell/blog/SystemVersionCheck-1.1.html for a discussion and a solution to this problem.

    EG

    -----Original Message-----
    While it is not my intention to support previous versions of Mac OS,
    I'd like my users be informed politely that the latest OS version is
    required and the application shut down gracefully.

    What is the recommended way to do this?

    Basically it boils down to 2 questions:

    1) How do I query the current OS version in Cocoa?

    2) Will my code even have the opportunity to check the OS version, or
    an error will occur on the stage of loading and reported by the OS
    loader, before a single line of my code gets executed? I'm asking this
    because this would be the case on Windows when the required statically
    linked DLLs, are missing or have incorrect version.

    I do not have any previous version of Mac OS at my disposal, so I
    can't test what happens. I wish Mac OS X is smart enough to take care
    of the problem without the need of any coding. I want to make sure.
    ------------------------------------------------------------
    This message and any attachments (the "message") are confidential and intended solely for the addressee(s). Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither DxO Labs nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.
    Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. DxO Labs et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, modifie ou falsifie.
  • On Nov 18, 2008, at 2:37 AM, Oleg Krupnov wrote:

    > 1) How do I query the current OS version in Cocoa?

    Gestalt(). See Gestalt.h for details.

    > 2) Will my code even have the opportunity to check the OS version, or
    > an error will occur on the stage of loading and reported by the OS
    > loader, before a single line of my code gets executed?

    Just use the LSMinimumSystemVersion Info plist key to set the minimum
    OS version; then you won't have to do any work. The only problem with
    this approach is it won't work in Cheetah and Puma, and won't work
    correctly in Panther, but few people use the former two OS versions
    anymore, and the latter is no longer a big deal.

    Nick Zitzmann
    <http://www.chronosnet.com/>