• 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 allows ivars in class extension but Mac OS doesn't?!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: iOS allows ivars in class extension but Mac OS doesn't?!
      • From: Jens Alfke <email@hidden>
References: 
 >iOS allows ivars in class extension but Mac OS doesn't?! (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Two problems building 32/64 framework for Lion/ARC
  • Next by Date: lldb support for variable length arrays?
  • Previous by thread: Re: iOS allows ivars in class extension but Mac OS doesn't?!
  • Next by thread: Re: iOS allows ivars in class extension but Mac OS doesn't?!
  • Index(es):
    • Date
    • Thread