Re: The best way to call Cocoa methods not implemented in previous versions of the SDK?
Re: The best way to call Cocoa methods not implemented in previous versions of the SDK?
- Subject: Re: The best way to call Cocoa methods not implemented in previous versions of the SDK?
- From: Jens Alfke <email@hidden>
- Date: Tue, 06 Sep 2011 14:17:51 -0700
On Sep 6, 2011, at 1:55 PM, email@hidden wrote:
> Surely the choice of SDK normally only has an effect at build time.
> My understanding is that the SDK frameworks are there to provide feedback during the linking that is performed as part of the build.
> When the app is actually run the dynamic linker links to the specified versions (A, B, C, etc) of the system frameworks as specified in the binary (see otool -l).
> The binary knows nothing about the SDK (correct me on this if I am wrong).
You are wrong :)
The app binary captures the version number of the framework that it linked against. The system framework code can and does check this version and act accordingly. Thus in the AppKit/Foundation release notes you will find statements like “This behavior occurs only in apps linked against OS X 10.5 or later; in earlier apps, the previous behavior occurs, for backward compatibility”.
(This may sound kludgey, but it’s sometimes the only way to fix bugs or add new functionality without breaking binary compatibility with existing apps. Breaking binary compatibility in an OS release is Very Very Bad.)
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden