In my iOS app, I have an interface with parameter types which are classes I’ve created that inherit from NSObject.
Example:
- (void) addTarget:(Target *)target;
In this interface, I have #include "Target.h", in which file the interface for Target is defined. However, whenever I use any classes I’ve built as above, I end up with this compiler error:
Expected ‘)’ before ‘Target’
However, when I change the type of the parameter to a built-in type, it works just fine. This is my first project in Objective C. Is there something fundamental I’m missing?
As mentioned in the comments, removing the cyclic dependencies fixed the problem.