Search code examples
objective-cxcodemacososx-snow-leopard

Mac OS : runing app with old base SDK on recent version of OS


This might sound a newbie question, however I'm new to Mac OS,

Here I've got a compiled application with old Base SDK let say 10.5 version, and it is running without any problem on Mac OS 10.5 version.

On recent version of Mac OS 10.6, 10.7 it works incorrectly in some cases.

The old app should stay compatible in new version of OS, Basically I would like to know how Apple keeps the compatibility with the old applications inside new versions of Mac OS ?


Solution

  • Apple is usually very careful to ensure backward compatibility of their APIs so that older apps don't break when you upgrade your OS. They don't delete APIS but just mark them as deprecated.

    It's most likely that your application was doing something unsupported or had a bug in it that has been exposed as Apple has changed the implementation of its APIs.

    Off the top of my head some possible causes

    • your app uses Apple private APIs that have changed.
    • your app passes some invalid parameter to an API whose implementation has changed (an example might be using an int where the API expects an NSInteger).
    • your app unwittingly exploited a bug that has now been resolved (e.g. garbage collection and NSOperationQueues existed in 10.5 but were very much beta).

    Try recompiling your application using a current Xcode against the latest API, with the -Wall warning flag on and the static analyser enabled. This will tell you where you are using deprecated APIs, wrong assumptions about pargument and return types and a host of other issues.