I did some testing:
In a recent Objective-c convention, you don't need to synthesize properties.
If you do
@property (strong, nonatomic) Business* theBiz;
iOs will automatically create a private ivar variable named _theBiz;
If you only implement a getter or setter, it seems to work fine:
-(void)setTheBiz:(Business *)theBiz { _theBiz = theBiz; }
However, if you declare BOTH, even if one of them is an empty function, you will get a compilation error.
-(void)setTheBiz:(Business *)theBiz { _theBiz = theBiz; } -(Business *) theBiz { }
When you implement the BOTH getter and setter, you get a compilation error saying that therre is not such a thing as _theBiz.
This can be easily fixed by adding:
@synthesize theBiz = _theBiz;
But it strikes the whole point of this amazing new Objective-c feature.
I wonder if this is by design, or I just missed something. What does an apple do?
My best guess is a mistake.
Guillaume's answer does not affect this fact.
He said that
at least one method was synthesized
It seems that _theBiz would be created if only ONE from getter or setter is installed. When both are installed, it is no longer created, and this should be a mistake. In fact, none of them should be installed at all, and Ivar will still be created.
The only way to fix this is to explicitly do
@synthesize theBiz = _theBiz;