Pages

Wednesday, July 15, 2020

How to add prefix header in iOS or macOS project XCode 11 Objective C Swift

From XCode do as follow

File -> New -> File ..

In the filter type pch

Now you should see the one item named  PCH File

Click Next

Give it a name, better to give <TargetName>-Prefix.pch

Create

Now you need to add this to project settings.

Click on the project file

Select the TARGETS  then Build Settings

Now you can search for prefix in the filter

you should see Prefix Header item and here you have to add that file,

type the following path

Click enter, later check the path if it is proper or not.

$(SRCROOT)/<TargetName>-Prefix.pch.pch


No comments: