Akbar
Akbar

Reputation: 1499

precaution to be taken to support Xcode 4 framework/library on 10.3.9

I have requirement to create cocoa framework/Libarary in Xcode 4 and support it on 10.3.9.I know it was 10 years older mac.But It is the requirement.

I have gone through the apple's sdk compatibility guide,document was saying that if we set the deployment target to 10.4,unconditionally it will work on 10.3.9 version.I did not understand what is "unconditionally" refers here.

If I need to be supported on 10.3.9,What precautions I need to be taken.Any help would be appreciated.

Upvotes: 1

Views: 97

Answers (1)

Ken Thomases
Ken Thomases

Reputation: 90541

If your version of Xcode doesn't have a 10.3 SDK, then it will be very hard for you to avoid accidentally using APIs and features which aren't available on 10.3.9. Setting the deployment target makes it so that your program may load on 10.3.9 – the executable won't use dynamic loader commands which are unknown to the loader on 10.3.9 and any references to symbols that aren't available on 10.3.9 will be weak references – but it doesn't mean it will run.

In order to run without crashing, you have to avoid actually dereferencing any of those weak-linked symbols or calling any unavailable methods. The only reliable way to avoid that is to get the compiler's help, but that's only possible if you have the appropriate SDK, which isn't available in Xcode 4. (Honestly, I don't know when a 10.3 SDK was last available.)

Finally, it is folly to try to support a deployment target if you can't test on that platform. You need a machine running 10.3.9. If you have that, then you can use the version of Xcode native to that version of the OS. You can have a code base that can be built in either environment using conditional compilation, although the Xcode project files themselves aren't compatible.

Upvotes: 1

Related Questions