Synthesize error "Missing Context for Property Implementation Declaration"

10,322

This can happen when you attempt to synthesize a property outside of the scope of your class' implementation.

Incorrect:

@synthesize yourProperty;
@implementation YourClass
@end

Correct:

@implementation YourClass
@synthesize yourProperty;
@end
Share:
10,322
rreichel
Author by

rreichel

Red Teaming et al

Updated on June 03, 2022

Comments

  • rreichel
    rreichel almost 2 years

    Anyone have any ideas? When I try to synthesize a property I have declared in the .h file its not letting me synthesize it. Any ideas? Thanks!

  • JulianB
    JulianB almost 12 years
    I also had this happen using the #import command after @implementation YourClass
  • nolimitsdude
    nolimitsdude over 11 years
    #import command after @implementation was what triggered it for me. Thanks JulianB