views:

19

answers:

1

Hello All,

I am currently working on an App which uses core data. I tried specifying CoreDataGeneratedAccessors in the interace itself, but accessors like setName do not seem to be automatically generated.

Is this something wrong with my XCODE configuartion?

Thanks, Jith.

+1  A: 

The generation of accessors by properties is a function of the language version and it is nearly impossible to change the language version in Xcode. In fact, I've never seen anyone with that problem.

You're most likely missing the @dynamic directive for the property in the implementation (.m) file. You need to have something like:

@implementation MyManagedObject
@dynamic propertyName;

... to get the accessors for managed objects.

TechZen
Hello , Thanks for your response. I have added the @dynamic flag. If I manually define setName(), the compiler does not crib and also, at runtime, the symbol does get resolved.
Jith
You should add the code to where you define the property and its method to the question. You're missing something but I can't tell what. Make sure that if the property is named "propertyName" that the setter is called "setPropertyName:" including capitalization. Any other form and it will not be recognized as a setter.
TechZen
Hey thanks for your help mate, it now works!
Jith