compile app for osx 10.5

337 Views Asked by At

Is there a way to make sure that an app will run on osx 10.5 when compiling from osx 10.7 (xcode 4.4)?

Or at least, that it has successfully compiled for 10.5?

1

There are 1 best solutions below

8
On BEST ANSWER

You should set the deployment target to OS X 10.5. Ensure that you don't use any API that wasn't available on 10.5 (or, if you do, that you use it weakly and have a fallback code path that will be used if the APIs aren't available). Test your application on 10.5.

Options for fallback coding:

  • test whether an API object responds to a selector introduced since 10.5
  • test whether a class introduced since 10.5 exists by getting a reference through NSClassFromString()
  • weak-link against SDK frameworks, discover at runtime whether symbols from these frameworks are NULL
  • dynamically load shared libraries with dlopen(), falling back if they don't exist