In a project that I have added AFNetworking to I keep getting the build errors as in the image below.
I have tried the usual deleting the build/ folder and restarting xcode, removing and re-adding the framework, cleaning and building. I also tried adding the following code to my Project-Prefix.pch file:
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
//START - ADDING IMPORT FOR ALL TARGETS DUE TO AFNETWORKING
#import <Cocoa/Cocoa.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>
//END
#endif
But that doesn't seem to fix the issue either. I then tried removing AFNetworking from the project but it still gets this Lexical error when I try to build.
I've seen these compile errors before in XCode 4 and it was usually fixed by quitting xcode and deleting the build/ folder and then re-building the project. But this time it does not work.
I do not understand what the error refers to or how to fix it. It may not be caused by AFNetworking.
Can somebody help me figure this out?