Short solution for short problems

iOS : duplicate interface definition for class

I had a problem. It was a small search effort, but I could solve it without creating a new project etc...

The thing was I had a Class B that was importing Class A.

Then I had a class that imported Class B and also Class A.

When I did this, these problems occured. 

Eg. A SOAP webservice Class imports all the Entities that are passed over the web.


Class goToSchoolWebservice.

#import "person.h"

#import "school.h"



Then I had a Singleton class used for caching that had the Logged in Person and also a ref to the webservice class.

Class variableStore

#import "person.h"

#import "goToSchoolWebservice.h"


--> this is where is went wrong!!

So watch out for these circular references. ITs not so easy to detect them!