• 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: Tips to deploy applications to multiple Mac OS X versions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tips to deploy applications to multiple Mac OS X versions


  • Subject: Re: Tips to deploy applications to multiple Mac OS X versions
  • From: Michael Vannorsdel <email@hidden>
  • Date: Wed, 9 Apr 2008 10:53:00 -0600

Using Obj-C 2.0 can give a little speed boost over previous versions of Mac OS X. For building for other system versions sometimes you need to link to the SDK of that version if you find some symbols are missing (depreciated or removed). If you want to use certain features on one platform and not another you can use the #if statements.

#if MACOSX_DEPLOYMENT_TARGET == MAC_OS_X_VERSION_10_4

/* 10.4 code here */

#else

/* code for all others */

#endif


On Apr 9, 2008, at 8:43 AM, Lorenzo Bevilacqua wrote:

I'm trying to build a Cocoa application so that it can run on Mac OS X from version 10.3.9 to 10.5.
I have 10.5 installed so the application runs fine on my system and on other Leopard systems.
I haven't build a project for multiple platforms yet, so I tried to duplicate the main Xcode target and set different deployment target settings like


myApp for Leopard		MACOSX_DEPLOYMENT_TARGET set to 10.5
myApp for Tiger			MACOSX_DEPLOYMENT_TARGET set to 10.4
myApp for Panther		MACOSX_DEPLOYMENT_TARGET set to 10.3

The SDK I use is the Leopard one.

Till now all Ok, but when I try to compile for example the Tiger target I get some errors (mainly about fast enumeration). Thus I have some questions:

- It is correct to proceed like I described above?
- Does the Objective-C 2.0 fast enumeration make sense to be used? I mean, if I don't use it, will my application perform worse on Leopard?
- Is there a way to differentiate part of code by platform? I remember I saw in some files lines like this


#if MACOSX_DEPLOYMENT_TARGET == MAC_OS_X_VERSION_10_4
#endif

is this correct?

_______________________________________________

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


References: 
 >Tips to deploy applications to multiple Mac OS X versions (From: Lorenzo Bevilacqua <email@hidden>)

  • Prev by Date: Re: Saving NSFonts and changedFont: trouble
  • Next by Date: Re: Saving NSFonts and changedFont: trouble
  • Previous by thread: Tips to deploy applications to multiple Mac OS X versions
  • Next by thread: Re: Tips to deploy applications to multiple Mac OS X versions
  • Index(es):
    • Date
    • Thread