I created a new project using Xcode 6.3.1 and I want to manual add a 'pch' file to my project. I was looking at questions online PCH File in Xcode 6 but the selected answer says to go to LLVM6.0 but that does not exist in build settings anymore. Where can i find it to add the .pch?
Asked
Active
Viewed 1,246 times
2 Answers
5
To create a prefix header (pch) file you'll have to do the following:
- Go to (or use ⌘cmd+N) File > New > File > Other (in iOS or OSX).
- Select PCH File.
- Give it a name and store it somewhere in your project.
- Go to your project's target > Build Settings.
- Search for
prefix header
. - Under
Apple LLVM 6.1 - Language
you will find thePrefix Header
key. - Add the path to your pch file like so:
$(PROJECT_NAME)/myPrefixHeaderFile.pch
. - Clean your project (⌘cmd+⇧shift+K) and build (⌘cmd+B).
Below is a screenshot showing where to find it in Build Settings
:

Razvan
- 4,122
- 2
- 26
- 44
1
Search for prefix header - Under Apple LLVM 6.1 - Language Set Precompile Prefix Header to Yes and then set Path of your .pch file in Prefix Header

Sivakumar Punniyakotti
- 196
- 1
- 7