0

My *-Prefix.pch file looks like the following

//
// Prefix header for all source files of the 'stuff' target in the 'stuff' 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>
#endif

So why is it then when I remove #import from a file in Xcode 4.6.2 all the syntax highlighting turns off for all Foundation Framework objects? The code still compiles and run correctly.

Awesome-o
  • 2,002
  • 1
  • 26
  • 38
  • I guess it's some bug with Xcode. Did you try it on other versions of Xcode? – Mohannad A. Hassan Jun 14 '13 at 17:15
  • Nope... I might reinstall Xcode when I find some time tonight and see if that fixes it. – Awesome-o Jun 14 '13 at 17:38
  • Importing a framework and linking against it are two different animals. The prefix header gets compiled once and imported through your project. Logically, removing anything from the header means Xcode either loses information, or has to recalculate symbols. Just recompile or wait for the indexer to run again. – CodaFi Jun 14 '13 at 17:54
  • Unfortunately, recompiling doesn't fix the issue and I deleted my "Derived Data" to try to force the indexer but that didn't work either. – Awesome-o Jun 14 '13 at 18:06

0 Answers0