Property cannot be found in forward class object Property cannot be found in forward class object ios ios

Property cannot be found in forward class object


This error usually points out that Xcode can not recognize your symbol.I can assume this is DTContact.

Try to insert this in your .h file:

#import DTContact.h


Its not relevant to ur case but I was getting the same error. I googled for a solution but the problem was in my code. I was using different class object as I was copy pasting similar snippet of code in my project. So here is the problem that I had for the same error :

For my classA , I had some code snippet like :

    ManagedObjectOfClassA * managedObjectOfClassA = [NSEntityDescription insertNewObjectForEntityForName:@"ManagedObjectOfClassA"                                                              inManagedObjectContext:managedObjectContext];    managedObjectOfClassA.somePropertyA = sameValue; //somePropertyA is an attribute of ManagedObjectOfClassA

And similar code for class B :

    ManagedObjectOfClassA *managedObjectOfClassB = [NSEntityDescription insertNewObjectForEntityForName:@"ManagedObjectOfClassB" inManagedObjectContext:managedObjectContext];    managedObjectOfClassB.somePropertyB = someValue;////somePropertyB is an attribute of ManagedObjectOfClassB

If u look closely, the mistake was in assigning the right entities to the corresponding objects in class B.

So the problem is in code of class B. And the correct code would be :

ManagedObjectOfClassB *managedObjectOfClassB = [NSEntityDescription insertNewObjectForEntityForName:@"ManagedObjectOfClassB" inManagedObjectContext:managedObjectContext];

managedObjectOfClassB.somePropertyB.someValue;

I hope that helps someone.