How to ensure minimum version requirement

  • Hi all,

    although I digged the docs and googled a while, I could not seem to find
    any proposed way for determining the MacOS X version number (at runtime)
    from inside a Cocoa application. Maybe I missed something, but IMHO this
    is a very basic information that should be easily available somewhere.

    Where can version information be gathered? Is there a better way to
    ensure that an application will refuse to run on older versions of OSX,
    issueing  a warning to the user?

    Thanks in advance.
    Andre
  • On 8 Nov 2007, at 09:09, Andre Schnoor wrote:

    > although I digged the docs and googled a while, I could not seem to
    > find any proposed way for determining the MacOS X version number (at
    > runtime) from inside a Cocoa application. Maybe I missed something,
    > but IMHO this is a very basic information that should be easily
    > available somewhere.

    http://developer.apple.com/releasenotes/Cocoa/AppKit.html

    Scroll down to the section titled "Runtime Version Check". I found the
    value for 10.4 was not defined on my Leopard system - so I added a
    define of my own and used that.

    > Where can version information be gathered? Is there a better way to
    > ensure that an application will refuse to run on older versions of
    > OSX, issueing  a warning to the user?

    As I understand it, if you compile for say Tiger and later; your
    program will just not run on any previous system.

    Hopefully someone will confirm this behaviour.

    Hope that helps,
    Dave

    ------
    David Kennedy (http://www.zenopolis.com)
  • Citizen wrote:
    > On 8 Nov 2007, at 09:09, Andre Schnoor wrote:
    >
    >> although I digged the docs and googled a while, I could not seem to
    >> find any proposed way for determining the MacOS X version number (at
    >> runtime) from inside a Cocoa application. Maybe I missed something,
    >> but IMHO this is a very basic information that should be easily
    >> available somewhere.
    >
    > http://developer.apple.com/releasenotes/Cocoa/AppKit.html
    >
    > Scroll down to the section titled "Runtime Version Check". I found the
    > value for 10.4 was not defined on my Leopard system - so I added a
    > define of my own and used that.

    Great, thanks.

    >
    >> Where can version information be gathered? Is there a better way to
    >> ensure that an application will refuse to run on older versions of
    >> OSX, issueing  a warning to the user?
    >
    > As I understand it, if you compile for say Tiger and later; your
    > program will just not run on any previous system.
    >
    > Hopefully someone will confirm this behaviour.

    It's as you said: It just doesn't start. I consider this behavior very
    unfriendly. There should be at least a message, or a chance to open a
    message box before the app quits. Probably there's an entry in the
    system logs, but that's not sufficient. I'm having users download my
    demo and they get the impression that it's crap because it won't start.

    Unfortunately I don't have a 10.3 or earlier system at hand, so I can't
    test.

    Thanks again for the pointer.
    Andre
  • Hello,

    Am 08.11.2007 um 13:21 schrieb Andre Schnoor:

    > I'm having users download my demo and they get the impression that
    > it's crap because it won't start.

    Just one more option you might consider:
    Providing an installer package is now the recommended way to
    distribute your software, and it allows to warn and prevent the user
    from installing on older system versions.

    Best,
    Dirk Stegemann
  • > It's as you said: It just doesn't start. I consider this behavior very
    > unfriendly. There should be at least a message, or a chance to open a
    > message box before the app quits. Probably there's an entry in the
    > system logs, but that's not sufficient. I'm having users download my
    > demo and they get the impression that it's crap because it won't start

    What about LSMinimumSystemVersion Info.plist key?

    http://developer.apple.com/documentation/MacOSX/Conceptual/
    BPRuntimeConfig/Articles/PListKeys.html#//apple_ref/doc/uid/
    20001431-113253
  • Jean-Daniel Dupas wrote:
    >> It's as you said: It just doesn't start. I consider this behavior very
    >> unfriendly. There should be at least a message, or a chance to open a
    >> message box before the app quits. Probably there's an entry in the
    >> system logs, but that's not sufficient. I'm having users download my
    >> demo and they get the impression that it's crap because it won't start
    >
    > What about LSMinimumSystemVersion Info.plist key?
    >

    It works in that it doesn't start the app, but there's no message shown
    (tested this on 10.4 requiring 10.5.0 for LSMinimumSystemVersion)

    Andre
  • On 8 nov 2007, at 10.09, Andre Schnoor wrote:

    > Hi all,
    >
    > although I digged the docs and googled a while, I could not seem to
    > find any proposed way for determining the MacOS X version number
    > (at runtime) from inside a Cocoa application. Maybe I missed
    > something, but IMHO this is a very basic information that should be
    > easily available somewhere.
    >
    > Where can version information be gathered? Is there a better way to
    > ensure that an application will refuse to run on older versions of
    > OSX, issueing  a warning to the user?
    >
    > Thanks in advance.
    > Andre
    >
    >
    >
    You can use the Carbon function Gestalt to find out this.
    ------
    What is a woman that you forsake her, and the hearth fire and the
    home acre,
    to go with the old grey Widow Maker.  --Kipling, harp song of the
    Dane women
    Tommy Nordgren
    <tommy.nordgren...>
  • on 2007-11-08 8:47 AM, Andre Schnoor at <andre.schnoor...> wrote:

    >> What about LSMinimumSystemVersion Info.plist key?
    >>
    >
    > It works in that it doesn't start the app, but there's no message shown
    > (tested this on 10.4 requiring 10.5.0 for LSMinimumSystemVersion)

    I'm coming in late on this thread.

    Search the archives of this mailing list to find sample code that uses
    Gestalt to determine the version of the running OS from Leopard all the way
    back to the beginning of Mac OS X.

    To post a friendly alert on an older system when a user attempts to run an
    app that requires a newer version of the system, use Chris Campbell's
    SystemVersionCheck 1.1, available free at
    <http://homepage.mac.com/chris_campbell/blog/SystemVersionCheck.html>. I use
    it in PreFab UI Browser and PreFab UI Actions, and many others use it, as
    well.

    --

    Bill Cheeseman - <bill...>
    Quechee Software, Quechee, Vermont, USA
    www.quecheesoftware.com

    PreFab Software - www.prefabsoftware.com
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today