Friday, November 11, 2016

Adding ProjectName-Prefix.pch file in Xcode project.

Adding ProjectName-Prefix.pch file in  Xcode project.



From Xcode 6 onwards , when we create new project xcode will not create ProjectName-Prefix.pch file.


Steps to add this .pch file

1.Goto your project and create pch file using below steps.

2. Select File --> New --> File -->iOS -->Other --> PCH File. name the pch file whatever you want.

3. Next select your project target --> Build Settings,set Precompile Prefix Header flag to YES 
and set Prefix Header path to $(SRCROOT)/yourfilename.pch.

NOTE : Filename.pch file path is same as ProjectName.xcodeProj path.

No comments:

Post a Comment