Reading a .pch file in a static library

I create a static library and add all the project files that I want to open for other projects. Now I have a .pch file that contains most of my #import statements that should be used throughout the application.

When compiling this static library, I get errors due to these missing import statements. I tried copying the .pch file to "Copy Header" and also "Copy Source", but it did not work.

Any clue how to add a .pch file to a static library.

+6
iphone cocoa-touch xcode
source share
1 answer

Go to project build settings and search for "pch". There is an element under the heading "Prefix Header" in which you can enter the name of your PCH file.

+8
source share

All Articles