iOS Prefix.pch best practices

Ewww… don’t put macros in a .pch file! A .pch file is, by definition, a project specific precompiled header. It really shouldn’t be used beyond the context of the project and it really shouldn’t contain anything but #includes and #imports. If you have some macros and such that you want to share between headers, then … Read more

PCH File in Xcode 6

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