Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode error: Auto property synthesis is synthesizing property not explicitly synthesized

Tags:

xcode

ios

Have added two properties in a .h file:

@property (assign, nonatomic, readonly) float weightInLbs;
@property (strong, nonatomic, readonly) NSDate *date;

They generate this Xcode error: Auto property synthesis is synthesizing property not explicitly synthesized

Am running Xcode 5.1 and am targeting iOS 7.1.

What does this mean, and what do I need to do about it?

like image 920
pdenlinger Avatar asked May 19 '14 15:05

pdenlinger


2 Answers

Try to change 'implicit synthesized properties' flag in Project Build Settings

like image 200
Vov4yk Avatar answered Nov 14 '22 20:11

Vov4yk


Do you have implemented a Getter Method? Like:

-(float)weightInLbs

If you do so, your properties do not get synthesized automatically anymore (if you have readwrite properties it's the same if you implement both, a getter and a setter). To fix this you only need to add @synthesize weightInLbs;in your implementation file (.m).

like image 31
iCaramba Avatar answered Nov 14 '22 19:11

iCaramba