Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?
Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?
- Subject: Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?
- From: Ken Thomases <email@hidden>
- Date: Sun, 09 Mar 2014 07:31:48 -0500
On Mar 9, 2014, at 7:21 AM, Bill Cheeseman wrote:
> NSArray *versionComponentStrings = [versionString componentsSeparatedByString:@"."];
> static unsigned long sBCDSystemVersion = 0;
> SInt32 majorVersion = ([versionComponentStrings count] >= 1) ? [versionComponentStrings[0] intValue] : 0;
> SInt32 minorVersion = ([versionComponentStrings count] >= 2) ? [versionComponentStrings[1] intValue] : 0;
> SInt32 bugFixVersion = ([versionComponentStrings count] >= 3) ? [versionComponentStrings[2] intValue] : 0;
The above three lines use the new-style array subscripting syntax (e.g. versionComponentStrings[0]). That's the source of the crash, since that support is not available in your deployment target.
Regards,
Ken
_______________________________________________
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