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

iOS allows ivars in class extension but Mac OS doesn't?!


  • Subject: iOS allows ivars in class extension but Mac OS doesn't?!
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 06 Feb 2012 16:25:31 -0800

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”.

—Jens
 _______________________________________________
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: Fritz Anderson <email@hidden>
    • Re: iOS allows ivars in class extension but Mac OS doesn't?!
      • From: Alexander von Below <email@hidden>
    • Re: iOS allows ivars in class extension but Mac OS doesn't?!
      • From: Scott Ribe <email@hidden>
  • Prev by Date: Re: def OT, but big problem
  • Next by Date: Re: iOS allows ivars in class extension but Mac OS doesn't?!
  • Previous by thread: Re: def OT, but big problem
  • Next by thread: Re: iOS allows ivars in class extension but Mac OS doesn't?!
  • Index(es):
    • Date
    • Thread