Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Support for Application PCH Definitions #580

Closed
blakewatters opened this issue Oct 6, 2012 · 4 comments
Closed

Enable Support for Application PCH Definitions #580

blakewatters opened this issue Oct 6, 2012 · 4 comments
Assignees
Labels
t1:enhancement Enhancements that have not been picked up yet. Please comment if you plan to work on it

Comments

@blakewatters
Copy link

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.

@iwarshak
Copy link

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

@blakewatters
Copy link
Author

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

@CocoaPodsBot
Copy link

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

@Daniel1of1
Copy link

AFNetworking no longer uses prefix_header_contents https://github.com/CocoaPods/Specs/blob/master/AFNetworking/2.2.1/AFNetworking.podspec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t1:enhancement Enhancements that have not been picked up yet. Please comment if you plan to work on it
Projects
None yet
Development

No branches or pull requests

4 participants