No way to detect running Mac OS X version with the SDK

Originator:linde.andreas
Number:rdar://11798430 Date Originated:Tue, 03 Jul 2012 19:52:59 GMT
Status:Duplicate Resolved:
Product:Mac OS X SDK Product Version:10.8
Classification:Serious Bug Reproducible:Not Applicable
 
Summary:
There is no way to detect the Mac OS X Version an app is currently running in, because of the deprecation of the Gestalt Manager API.

Steps to Reproduce:
Write code to detect the current Mac OS X Version like:

        SInt32 major, minor, bugfix;

        /* Fetch the major, minor, and bugfix versions.
         * Fetching the OS version should not fail. */
        if (Gestalt(gestaltSystemVersionMajor, &major) != noErr) {
        }
        if (Gestalt(gestaltSystemVersionMinor, &minor) != noErr) {
        }
        if (Gestalt(gestaltSystemVersionBugFix, &bugfix) != noErr) {
        }


Expected Results:
The variables major, minor, bugfix have the current OS X Version numbers.

Actual Results:
The API calls are marked as deprecated. No replacement API available (especially one that runs in the sandbox!)

Regression:

Notes:

Comments

Duped. rdar://11804778

By maxseelemann at July 4, 2012, 7:29 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!