Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PCH File in Xcode 6

Tags:

xcode6

pch

In my previous projects, I can find the .pch file under Supporting Files.

But now in Xcode 6, I couldn't find any .pch file. Any steps should I do to produce this file?

like image 206
Lie-An Avatar asked Oct 10 '22 09:10

Lie-An


2 Answers

  1. Make new file: ⌘cmd+N
  2. iOS/Mac > Other > PCH File > YourProject-Prefix.pch.
  3. Make sure you display "All" and not "Basic". (Blue buttons)
  4. Project > Build Settings > Search: "Prefix Header".
  5. Under "Apple LLVM 7.0" you will get the Prefix Header key.
  6. Type file directory. e.g: "$(SRCROOT)/$(PROJECT_NAME)/ProjectName-Prefix.pch".
  7. Clean project: ⌘cmd+⇧shift+K
  8. Build project: ⌘cmd+B

Prefix Header Image

like image 435
emotality Avatar answered Oct 12 '22 21:10

emotality


Add the pch file which is under Others in File-New...and don't forget to add it to your LLVM6.0 - Language section of Build Settings as Project/whateveryounamedyourpchfile.pch

like image 81
marciokoko Avatar answered Oct 12 '22 23:10

marciokoko