• 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: iOS version check
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS version check


  • Subject: Re: iOS version check
  • From: Steve Christensen <email@hidden>
  • Date: Fri, 12 Jun 2015 06:22:46 -0700

How about something like this?

NSInteger majorSystemVersion = UIDevice.mainDevice.systemVersion.integerValue;

if (majorSystemValue == 8)
	AVSpeechUtterance.rate = <the wrong value that used to work>
else
	AVSpeechUtterance.rate = <the right value>


> On Jun 11, 2015, at 10:23 PM, Quincey Morris <email@hidden> wrote:
>
> There’s a particular API that’s broken in iOS 8 (AVSpeechUtterance.rate), but not broken in iOS 7, and fixed in iOS 9. Using Xcode 7, therefore, I get the iOS 9 simulator, which means different speech behavior running in the simulator from running on an actual device (still running 8.3).
>
> So I’m looking for a version check that will allow me to set the property based on the running iOS version, something like this:
>
>> if (floor(NSFoundationVersionNumber) >= NSFoundationVersionNumber_iOS_8_0 && floor (NSFoundationVersionNumber) < NSFoundationVersionNumber_iOS_9_0)
>> 	AVSpeechUtterance.rate = <the wrong value that used to work>
>> else
>> 	AVSpeechUtterance.rate = <the right value>
>
> but there’s no definition of NSFoundationVersionNumber_iOS_9_0 in the iOS 9 SDK. In fact, there’s nothing higher than NSFoundationVersionNumber_iOS_8_1 in the iOS 9 SDK. That means there’s no definition that lets me test against 8.2, 8.3 or 8.4.
>
> I’m confused about what to do here. The iOS 8.3 SDK itself has no NSFoundationVersionNumber_iOS_8_x definitions at all, so going back to Xcode 6 wouldn't solve the problem, except that the simulator would be 8.x, so the problem wouldn’t show up again until iOS 9 is released.
>
> I must be missing something really obvious here.
>
> (The app’s deployment target is currently set to 8.1, but I don’t think that makes any difference, except that I don’t care about iOS 7, which is unfortunately the one version I *could* check for.)


_______________________________________________

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: iOS version check
      • From: David Brittain <email@hidden>
References: 
 >iOS version check (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: rangeOfString with .RegularExpressionSearch not matching begin and end of line (Swift)
  • Next by Date: Re: 3D file formats
  • Previous by thread: iOS version check
  • Next by thread: Re: iOS version check
  • Index(es):
    • Date
    • Thread