Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6.1 Precompiled Headers

Tags:

xcode6

In Xcode 6.1, creating a new project does not create a precompiled header file using the single view iOS project template. If I add one manually, any definitions in the pch file are not available in any other source files.

I've looked at many threads and questions and tried cleaning, re-buiding, re-starting, deleting derived data and manually removing the CACHE_ROOT/SharedPrecompileHeaders folder. All to no avail, though.

Some info suggests ticking to include in targets, but this is disabled for pch and other header files now.

See comment below.

like image 576
Nick Avatar asked Nov 08 '14 22:11

Nick


1 Answers

Have you tried adding the path of the pch file?

Go to your project -> Build Settings -> Apple LLVM 6.0 Language.

Under it, set the following things:

  • Precompile Prefix Header: Set it to YES
  • Prefix Header: Set the path to the pch file

Update 2018/09/23: In Xcode10 it is under Apple Clang - Language

enter image description here

like image 163
abavisg Avatar answered Jan 01 '23 23:01

abavisg