0

I created a project a few week ago and opened it today. When i left the project there were no errors and everything worked fine, but now i have three errors and don't know why.

Here my AppDelegate.h :

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end

And here my main.m:

#import <UIKit/UIKit.h>

#import "AppDelegate.h"

int main(int argc, char * argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}

Here the errors:

/main.m: Semantic Issue Use of undeclared identifier 'AppDelegate'
AppDelegate.h: Parse Issue Expected identifier or '('
AppDelegate.h:  Parse Issue '@end' must appear in an Objective-C context
Chris K
  • 11,622
  • 1
  • 36
  • 49
Marius Schönefeld
  • 425
  • 2
  • 6
  • 21
  • Can you describe the errors here in addition to providing the linked image? If your link ever gets broken, we want this question to still be useful for future viewers. – skrrgwasme Jul 30 '14 at 15:40
  • I saw an similar issue yesterday which did not make sense at all. What version of OSX are you running? http://stackoverflow.com/questions/25014772/property-unexpected-in-program#comment38898081_25014772 – Droppy Jul 30 '14 at 15:42
  • Look carefully project's `.pch` file. Is it correct, are there all `#define` constructions right? And how about `#include` or `#import` directives? – Sergei Nikitin Jul 30 '14 at 15:53
  • i use osx Mavericks 10.9.4 – Marius Schönefeld Jul 30 '14 at 15:54
  • my .pch file: #import #ifndef __IPHONE_5_0 #warning "This project uses features only available in iOS SDK 5.0 and later." #endif #ifdef __OBJC__ #import #import #endif – Marius Schönefeld Jul 30 '14 at 15:56
  • AFAIK, there's a "licence" kind of in the beginning of both files. Try looking for "out of comment" characters there. – Eimantas Jul 31 '14 at 13:14
  • thanks it works i forgo a * at the top. – Marius Schönefeld Aug 06 '14 at 10:56

0 Answers0