Skip to content


Enable Support for Application PCH Definitions #580

blakewatters opened this Issue · 4 comments

4 participants


So this is somewhat related to #529 and #539, but affects the application downstream. With the addition of the s.prefix_header_contents = "#import <SystemConfiguration/SystemConfiguration.h>" support, a Pod can inject contents into the PCH to ensure system level headers are available during compilation of the pod sources to enable conditional compilation of optional components. AFNetworking uses this for both the SystemConfiguration and CoreServices/MobileCoreServices frameworks.

This works great, but in order to actually leverage the conditionally built features in an app that has imported them, the end user must also modify their own app level PCH file to repeat the imports, else the definitions (such as _SYSTEMCONFIGURATION_H) guarding the conditional imports do not resolve at import time and the symbols are masked by the preprocessor, even though the bits have been compiled and linked into the application.

I think that there should be means for adding this content into a header that is imported into the app PCH as well, since the user has already opted into building and linking these bits.

@blakewatters blakewatters referenced this issue in AFNetworking/AFNetworking

Fix CocoaPods Incorrectly Importing CoreServices #560


Running into this exact issue. @blakewatters - did you find a suitable workaround?

@iwarshak iwarshak referenced this issue in AFNetworking/AFNetworking

reachability not working with RubyMotion #707


Yeah, you just have to manually edit the PCH file in your project. I have just documented it in the RestKit CocoaPods installation page...


@confidenceJuice closed with reason "cocoapods should not be messing with app level pch."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.