• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: "weak link" framework refs for 10.1 compatibility?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "weak link" framework refs for 10.1 compatibility?


  • Subject: Re: "weak link" framework refs for 10.1 compatibility?
  • From: Bill Cheeseman <email@hidden>
  • Date: Sat, 09 Nov 2002 13:35:05 -0500

on 02-11-09 10:40 AM, Marco Scheurer at email@hidden 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@hidden
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@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: "weak link" framework refs for 10.1 compatibility?
      • From: Rosyna <email@hidden>
    • Re: "weak link" framework refs for 10.1 compatibility?
      • From: Marco Scheurer <email@hidden>
References: 
 >Re: "weak link" framework refs for 10.1 compatibility? (From: Marco Scheurer <email@hidden>)

  • Prev by Date: IB Palettes
  • Next by Date: Making my app use FileWrappers (Document Bundles) as the file type...
  • Previous by thread: Re: "weak link" framework refs for 10.1 compatibility?
  • Next by thread: Re: "weak link" framework refs for 10.1 compatibility?
  • Index(es):
    • Date
    • Thread