Skip navigation.
 
mlRe: "weak link" framework refs for 10.1 compatibility?
FROM : Bill Cheeseman
DATE : Sat Nov 09 19:35:05 2002

on 02-11-09 10:40 AM, Marco Scheurer at <email_removed> wrote:

>
> On Friday, November 8, 2002, at 11:17 AM, Bill Cheeseman wrote:

>> The bottom line, as I understand it, is that an application using C
>> constants that are new in 10.2 will not launch in 10.1.x or earlier.
>> Checking the system version to branch around them will not work,
>> because the loader tries to load them all at once, up front.

>
> Is that true? The following code, in a category of NSTextField,
> compiled on 10.2 does not break on 10.1.x (text field is not rounded).


I was careful to refer to "C constants" in my post, but not careful enough.
I should have said "external" constants, whether they be C or Objective-C. I
don't see one of those in your examples, but only a typedef with enumeration
cosntants.

There are a bunch of external constants that are new in the 10.2 frameworks.
For example, DiscRecording.framework has some (e.g., extern const float
DRDeviceBurnSpeedCD1x in DRDevice.h), and there are a bunch in
AddressBook.framework and NSAccessibility.h. There are a very few of them
scattered about the Cocoa frameworks, themselves, as well.

I went over this at length and in depth with an Apple engineer who is
knowledgeable on the subject, and with an experienced outside developer on
this list. In my testing, I used the NSFileImmutable constant from
FileManager.h, which is declared like this: FOUNDATION_EXPORT NSString *
const NSFileImmutable, and is new in 10.2.

I included this method in a small test application:

-(void)testing { // TESTING
    NSString *string = NSFileImmutable;
    NSLog(@"NSFileImmutable = %@", string);
}

When I ran the app on older systems both with and without a test for Mac OS
10.2 or newer to branch around this method, I got this error message in
console.log:

On 10.0:

dyld: /Applications/Vermont Recipes/develop new_C_global/Vermont
Recipes.app/Contents/MacOS/Vermont Recipes Undefined symbols:
_NSFileImmutable

On 10.1:

dyld: /Applications/Vermont Recipes/develop new_C_global/Vermont
Recipes.app/Contents/MacOS/Vermont Recipes Undefined symbols:
/Applications/Vermont Recipes/develop new_C_global/Vermont
Recipes.app/Contents/MacOS/Vermont Recipes undefined reference to
_NSFileImmutable expected to be defined in Cocoa

The Dock icon barely had time to appear before it disappeared again; there
was no sign of my launch-time alert to quit gracefully under older systems;
and my NSLog() output did not appear in console.log. The dynamic loader
clearly failed to load my app's code.

When run in 10.2, it ran just fine.

--

Bill Cheeseman - <email_removed>
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont - http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
ml"weak link" framework refs for 10.1 compatibility? Dan Wood Nov 7, 20:20
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 8, 11:17
mlRe: "weak link" framework refs for 10.1 compatibility? Dan Wood Nov 9, 16:02
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 9, 16:31
mlRe: "weak link" framework refs for 10.1 compatibility? Marco Scheurer Nov 9, 16:40
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 9, 19:35
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 9, 19:38
mlRe: "weak link" framework refs for 10.1 compatibility? Jonathan Hendry Nov 9, 20:55
mlRe: "weak link" framework refs for 10.1 compatibility? Nicholas Riley Nov 10, 03:17
mlRe: "weak link" framework refs for 10.1 compatibility? Rosyna Nov 10, 05:30
mlRe: "weak link" framework refs for 10.1 compatibility? Sam Griffith Nov 10, 06:56
mlRe: "weak link" framework refs for 10.1 compatibility? Rosyna Nov 10, 08:39
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 10, 11:10
mlRe: "weak link" framework refs for 10.1 compatibility? Finlay Dobbie Nov 10, 13:38
mlRe: "weak link" framework refs for 10.1 compatibility? Finlay Dobbie Nov 10, 16:30
mlRe: "weak link" framework refs for 10.1 compatibility? Piers Uso Walter Nov 10, 18:34
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 10, 20:21
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 10, 20:27
mlRe: "weak link" framework refs for 10.1 compatibility? Rosyna Nov 10, 20:47
mlRe: "weak link" framework refs for 10.1 compatibility? Sam Griffith Nov 10, 21:56
mlRe: "weak link" framework refs for 10.1 compatibility? Finlay Dobbie Nov 10, 22:12
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 10, 22:29
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 10, 23:45
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 11, 01:11
mlRe: "weak link" framework refs for 10.1 compatibility? Marco Scheurer Nov 11, 11:07
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 11, 12:23
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 11, 14:52
mlRe: "weak link" framework refs for 10.1 compatibility? Marco Scheurer Nov 11, 17:27
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 11, 18:11
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 11, 20:51
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 11, 22:14
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 12, 00:37
mlRe: "weak link" framework refs for 10.1 compatibility? Rosyna Nov 12, 01:40
mlRe: "weak link" framework refs for 10.1 compatibility? Rosyna Nov 12, 01:43
mlRe: "weak link" framework refs for 10.1 compatibility? Rosyna Nov 12, 01:45