I’m having a ton of errors for my generated model objects:
ExerciseSet.h
1 @class Exercise;
2
3 @interface ExerciseSet : NSManagedObject
4
5 @property (nonatomic, retain) NSNumber * order;
6 @property (nonatomic, retain) NSNumber * reps;
7 @property (nonatomic, retain) NSNumber * weight;
8 @property (nonatomic, retain) Exercise *belongsTo;
9
10 @end
Illegal interface qualifieron line 1.Expected identifier or '('on line 3.Unknown type name 'Exercise'on line 8Property with 'retain (or strong)' attribute must be of object typeon line 8.- Warning for all properties for not calling
@synthesize, or@dynamic(which of course are called)
Exercise.h
1 @class ExerciseName, ExerciseSet, Workout, WorkoutMethod;
2
3 @interface Exercise : NSManagedObject
4
5 @property (nonatomic, retain) NSString * notes;
6 @property (nonatomic, retain) NSDecimalNumber * restBetweenSets;
7 @property (nonatomic, retain) NSNumber * rmMethod;
8 @property (nonatomic, retain) NSDecimalNumber * rmResult;
9 @property (nonatomic, retain) Workout *belongsTo;
10 @property (nonatomic, retain) NSSet *hasSet;
11 @property (nonatomic, retain) WorkoutMethod *isDoneWith;
12 @property (nonatomic, retain) ExerciseName *takesNameFrom;
13 @end
14
15 @interface Exercise (CoreDataGeneratedAccessors)
16
17 - (void)addHasSetObject:(ExerciseSet *)value;
18 - (void)removeHasSetObject:(ExerciseSet *)value;
19 - (void)addHasSet:(NSSet *)values;
20 - (void)removeHasSet:(NSSet *)values;
21 @end
Illegal interface qualifieron line 1.Missing @endon line 3.Unknown type name 'Workout'on line 9.- etc.
The other forward declared interfaces are ok, with no problems or errors.
What could cause this behavior?
I upgraded to Xcode 4.3, regenerated the
NSManagedObjectsubclasses and the errors disappeared. It must’ve been a bug in Xcode.Thanks for your help anyways!