Why isn't ProjectName-Prefix.pch created automatically in Xcode 6 ?
ProjectName-Prefix.pch
Xcode 6
Is the precompile header no longer needed ?
Where should I write the code that was in ProjectName-Prefix.pch before ?
Without the question if it is proper or not, you can add PCH file manually:
Add new PCH file to the project: New file > Other > PCH file.
At the Target's Build Settings option, set the value of Prefix Header to your PCH file name, with the project name as prefix (i.e. for project named TestProject and PCH file named MyPrefixHeaderFile, add the value TestProject/MyPrefixHeaderFile.pch to the plist).
TestProject
MyPrefixHeaderFile
TestProject/MyPrefixHeaderFile.pch
TIP: You can use things like $(SRCROOT) or $(PROJECT_DIR) to get to the path of where you put the .pch in the project.
$(SRCROOT)
$(PROJECT_DIR)
.pch
At the Target's Build Settings option, set the value of Precompile Prefix Header to YES.
YES
1.4m articles
1.4m replys
5 comments
57.0k users