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: "email@hidden" <email@hidden>
- Date: Tue, 06 Sep 2011 22:46:31 +0100
On 6 Sep 2011, at 22:17, Jens Alfke wrote:
>
> 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 :)
Wrong again!
>
> 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
Kludgey it certainly sounds.
I was under the impression that explicit major framework versioning was used to maintain binary compatibility.
Old apps were linked against old framework versions and new apps against new ones.
Seems this is not the case.
Let's see if I can get it right this time:
In general system frameworks, when required, query the app for the target SDK and modify their code paths as necessary to provide binary compatibly across different OS versions.
Regards
Jonathan Mitchell
Developer
Mugginsoft LLP
http://www.mugginsoft.com_______________________________________________
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