Re: iOS allows ivars in class extension but Mac OS doesn't?!
Re: iOS allows ivars in class extension but Mac OS doesn't?!
- Subject: Re: iOS allows ivars in class extension but Mac OS doesn't?!
- From: Fritz Anderson <email@hidden>
- Date: Tue, 07 Feb 2012 09:41:18 -0600
On 6 Feb 2012, at 6:25 PM, Jens Alfke wrote:
> Why is it that the following code compiles for iOS but not Mac OS X (32 or 64-bit)? Both targets are in the same project and both use the Clang compiler, in Xcode 4.2.1.
>
> @interface SomeClass()
> {
> Cookies *_cookies;
> }
> @end
>
> In a Mac (but not iOS) target this fails with "error: ivars may not be placed in class extension”.
I have had no trouble with instance variables in class extensions, for Mac 64-bit, 10.7 SDK, targeting 10.6. ARC is on (which, yes, means a lot of unsafe_unretained).
— F
_______________________________________________
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