• 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
The choice of CrossDev SDK
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The choice of CrossDev SDK


  • Subject: The choice of CrossDev SDK
  • From: j o a r <email@hidden>
  • Date: Wed, 1 Feb 2006 08:18:27 +0100


On 31 jan 2006, at 08.46, Chris Espinosa wrote:

Giving you errors is the purpose of the SDK. You should use the SDK that represents the baseline OS you're targeting - in your case the 10.2.8 SDK. If you haven't already, you should also read this:

No, that's not true.

You set the Mac OS X Deployment Target to the baseline OS you're targeting.

He is correctly trying to use 10.4u to exploit APIs available in the latest OS, and it's better to keep with one consistent set of headers and link libraries, and deal with platform issues at runtime via weak linking.

I don't think that I agree (The documentation agrees with you though [1]), but please correct me if there is something I don't understand.


Doesn't it come down to what you want to get out of using the CrossDev SDK? Personally, I'm basically not interested at all with easy access to features from OS versions later than our baseline OS. I am, on the other hand, REALLY interested in getting immediate feedback on trying to access features from later OS versions.
As an example, assume that we target Mac OS X 10.3 as our baseline OS. If I configure my project like you suggest (sdk=10.4, deployment=10.3), I can compile this without any warning whatsoever:


	NSIndexPath *indexPath = [[NSIndexPath alloc] initWithIndex: 0];

(Note: NSIndexPath was added to Mac OS X 10.4)

While, if I configure my project like I suggested (sdk=10.3, deployment=10.3) I will get an error.
So, how would our developers find out that they access features they shouldn't in case we were to configure our project like you suggest? Via crashes or exceptions possibly found at runtime / in testing? I would much rather have compile time errors / warnings.



The documentation has a couple of interesting, and possibly related, comments:


"The MAC_OS_X_VERSION_MIN_REQUIRED and MAC_OS_X_VERSION_MAX_ALLOWED preprocessor symbols are used by the AvailabilityMacros.h header file to define a number of other preprocessor symbols using the GCC compiler directives __attribute__((weak_import)) and __attribute__ ((deprecated)). Those symbols are used extensively in Carbon header files (and in many, but not all, Cocoa headers) to define which function or method calls are available in different versions of the operating system." [2]

Is the reason for this some limitation in ObjC, or different priorities between the Carbon & Cocoa dev teams?

"Cross-development is most strongly supported by the Carbon APIs and to a lesser degree by Cocoa. However, given the dynamic nature of Objective-C (for example, it doesn’t produce link errors, it just raises a runtime exception if you call a method that doesn’t exist), cross-development support is less important for Cocoa applications." [3]

Why "less important"?

j o a r


[1] <http://developer.apple.com/documentation/DeveloperTools/ Conceptual/cross_development/HowItWorks/chapter_2_section_3.html>


[2] <http://developer.apple.com/documentation/DeveloperTools/ Conceptual/cross_development/HowItWorks/chapter_2_section_7.html>

[3] <http://developer.apple.com/documentation/DeveloperTools/ Conceptual/cross_development/HowItWorks/chapter_2_section_9.html>

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >RE: Undefined symbols - cross development (From: "Greg Norz" <email@hidden>)
 >Re: Undefined symbols - cross development (From: Rune Lindman <email@hidden>)
 >Re: Undefined symbols - cross development (From: j o a r <email@hidden>)
 >Re: Undefined symbols - cross development (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: Xcode project hosed?
  • Previous by thread: Re: Undefined symbols - cross development
  • Next by thread: RE: Undefined symbols - cross development
  • Index(es):
    • Date
    • Thread