Re: PSA: floor(NSFoundationVersionNumber) doesn't work with Yosemite or later
Re: PSA: floor(NSFoundationVersionNumber) doesn't work with Yosemite or later
- Subject: Re: PSA: floor(NSFoundationVersionNumber) doesn't work with Yosemite or later
- From: "Gary L. Wade" <email@hidden>
- Date: Sat, 11 Jul 2015 10:31:54 -0700
On Jul 10, 2015, at 5:31 PM, Ben Kennedy <email@hidden> wrote:
>> Once Yosemite stops being updated, we can of course use the constant for the last version that’s released, but since we still can’t say with 100% certainty that there won’t be a 10.10.5, we can’t really rely on this.
>
> No kidding. (Never mind the fact that the notion of using a floating point number for such identification is inherently laughable, but I guess that was codified in yore.
For all version numbers I encounter, I encapsulate them with a class I've written that parses them according to their formatting (build numbers with embedded letters, dotted values, etc.) and stores them in an NSIndexPath making comparisons between two versions very easy. Whenever I encounter a new version number format, I add a new parser and string formatter tied to a new enum.
--
Gary L. Wade (Sent from my iPad)
http://www.garywade.com/
_______________________________________________
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