• 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: what iPhone system am I running on?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what iPhone system am I running on?


  • Subject: Re: what iPhone system am I running on?
  • From: David LeBer <email@hidden>
  • Date: Tue, 22 Jun 2010 18:19:39 -0400

On 2010-06-22, at 6:10 PM, Matt Neuburg wrote:

> How do I check what version of the system I'm running on under iOS? I want
> to register for UIApplicationWillEnterForegroundNotification if I'm running
> on 4.0, but I crash if I try to do this on 3.2... This can't be done with
> conditional compilation; it's got to be some sort of runtime check.
> NSFoundationVersionNumber doesn't seem to go high enough.  Thx - m.
>
> --
> matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
> A fool + a tool + an autorelease pool = cool!
> AppleScript: the Definitive Guide - Second Edition!
> http://www.tidbits.com/matt/default.html#applescriptthings

I believe the current recommendation is to check for specific functionality rather than OS version for this kind of thing.

So, I you could check if multitasking is supported before registering for that notification.

(From the iPhoneAppProgrammingGuide:)

UIDevice* device = [UIDevice currentDevice];
BOOL backgroundSupported = NO;
if ([device respondsToSelector:@selector(isMultitaskingSupported)])
   backgroundSupported = device.multitaskingSupported;

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: 	http://codeferous.com
blog: 	http://davidleber.net
profile:	http://www.linkedin.com/in/davidleber
twitter:	http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




 _______________________________________________
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: 
 >what iPhone system am I running on? (From: Matt Neuburg <email@hidden>)

  • Prev by Date: what iPhone system am I running on?
  • Next by Date: Re: Xcode 3.2.3 is available in the Mac and iPhone Dev Centers
  • Previous by thread: what iPhone system am I running on?
  • Next by thread: Re: what iPhone system am I running on?
  • Index(es):
    • Date
    • Thread