• 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
Multi-OS API Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multi-OS API Question


  • Subject: Multi-OS API Question
  • From: "Heizer, Charles" <email@hidden>
  • Date: Fri, 03 Jun 2011 16:57:06 -0700
  • Acceptlanguage: en-US
  • Thread-topic: Multi-OS API Question

Hello,
I'm using some API's which are only available on 10.5 and above but I want to compile my app to run on 10.4 and higher. How can I include multiple bits of code so that if the system is running 10.4 it will run "Code A" and if 10.5 and higher run "Code B"?

Example
if ( os == 104 ) {
	// Run 10.4 Code
} elseif ( os >= 105 ) {
	// Run 10.5 and higher API
}

Thanks,
Charles_______________________________________________

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

  • Follow-Ups:
    • Re: Multi-OS API Question
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: OS + iOS best practice
  • Next by Date: Re: Programmatically displaying UISplitViewController popover?
  • Previous by thread: Re: OS + iOS best practice
  • Next by thread: Re: Multi-OS API Question
  • Index(es):
    • Date
    • Thread