3
votes

When I generate my NSManagedObject from my data model, my header from the NSManagedObject is almost full red. It says "Expected ')'" and "Unexpected '@' in program". It's not just one header file, but all of them from the generated NSManagedObject.

Steps

  1. I create a new entity in my data model (Name and Class have the same name)
  2. I generate my NSManagedObject (New File -> Core Data -> NSManagedObject subclass)

When I follow these steps, the code of my header file turns red..

I use XCode 5.1.1 (5B1008). I has worked before, but suddenly I got these errors. I removed all CocoaPods just in case that caused these errors, but it didn't fix it.

Code header

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>


@interface Menu : NSManagedObject

@property (nonatomic, retain) NSString * mod_date_updated;
@property (nonatomic, retain) NSNumber * mod_id;
@property (nonatomic, retain) NSString * mod_name;
@property (nonatomic, retain) NSString * mod_route;

@end

Data model

enter image description here

Errors

enter image description here

1
Are you absolutely sure you didn't include (before line 9 in your code) some file which is missing an @end from an interface/protocol/anything ? - Templar

1 Answers

0
votes

Well... I solved my problem. I had a bracket somewhere in my main file on a place it shouldn't be.

So. My experience with this error is looking after some misplaced letters :)