0

I make this program for 1 year and now, when I try to add new object I got this: Unexpected '@' in program.

Simple code = an ocean of problems. I have tried to recreate file for many times, I have tried to close and reopen Xcode. Nothing. I have changed 'NO' to 'YES' like people say @import "Unexpected '@' in program". Nothing.

I am desperate. Sorry for my English. Thanks :)

MNClient.h same problem

I see no problem with code.

Strange Errors Strange Errors

Nothing important here.

//
//  MNClient.m
//  CM
//
//  Created by Michael Nitsenko on 7/29/14.
//  Copyright (c) 2014 PrivatBank. All rights reserved.
//

#import "MNClient.h"

@implementation MNClient

@end

//
//  MNEventObject.m
//  CM
//
//  Created by Michael on 11/6/13.
//  Copyright (c) 2013 PrivatBank. All rights reserved.
//

#import "MNEventObject.h"

@implementation MNEventObject

@end

ARC don't explain error in MNClient.h and I thought about it.

There is CM-Prefix.pch

//
// Prefix header for all source files of the 'ContactManager' target in the 'ContactManager' project
//

#import <Availability.h>

#ifndef __IPHONE_4_0
#warning "This project uses features only available in iOS SDK 4.0 and later."
#endif

#ifdef __OBJC__
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
#import "GAI.h"
#import "GAIFields.h"

#import "CMDefines.h"
#endif

Looks better :)

Nice

Community
  • 1
  • 1
WantToKnow
  • 1,767
  • 2
  • 12
  • 18
  • 1
    Show the contents of `MNClient.h`. – Droppy Jul 29 '14 at 12:01
  • Are you **only** including this in a .m file? It acts as if the file is not Objective-C. – Hot Licks Jul 29 '14 at 12:03
  • Or you may have edited the file with the wrong editor and gotten some non-UTF8 character codes in there. – Hot Licks Jul 29 '14 at 12:05
  • I use only Xcode editor. And I remake file (with Xcode) for many times. – WantToKnow Jul 29 '14 at 12:07
  • 1
    And what file are you including this in? You could have mucked up a prior include file, leaving an open `{` or some such. Or simply have the #import in the wrong place. – Hot Licks Jul 29 '14 at 12:07
  • OK now show the implementation file (just the lines preceding the inclusion of the first header file). – Droppy Jul 29 '14 at 12:08
  • (Show us the first few lines of the .m you're including this file in.) – Hot Licks Jul 29 '14 at 12:08
  • 1
    No, your edit tells us nothing new. We want to see the implementation (`.m`) file. – Droppy Jul 29 '14 at 12:12
  • show us your prefix.pch file(s) as well – Nir Golan Jul 29 '14 at 12:14
  • Let's see the .m file!!! – Hot Licks Jul 29 '14 at 12:20
  • (And don't post images of files. Use copy/paste from your editor, then highlight the pasted source and press the `{}` button at the top of the edit window to indent the source by 4 characters.) – Hot Licks Jul 29 '14 at 12:22
  • I cannot see anything wrong. Something to try; replace `#import "MNClient.h"` in `MNClientEvent.h` with `@class MNClient;` and see if that helps, but I doubt it will. Something looks very wrong with your project/system. – Droppy Jul 29 '14 at 12:29
  • You should be able to drop all the `#import ` lines as well, given then are in your prefix file. You will need `#import "MNClient.h"` in your `MNEventObject.m` file as you've removed it from the header. – Droppy Jul 29 '14 at 12:57
  • Check target dependencies for MNClient.m file. – Sviatoslav Yakymiv Jul 29 '14 at 16:13

0 Answers0