-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Pods.xcconfig HEADER_SEARCH_PATHS field does not include $(inherited) #1761
Comments
So while I agree that we should probably do this for all settings, it won’t fix your case if you are including xcconfig files into other xcconfig files. /cc @irrationalfab |
@alloy 👍 |
We might be talking about two different things, I will explain my entire problem. After running pod install I reverted what xcconfig file should be used for my project to the one I used before pod install, since cocoapods changed it to Pods.xcconfig. Then I included Pods.xcconfig from my own custom xcconfig. But to get it to compile I had to add If we want to make this change I can work on a pull request. |
This is my fix until cocoapods fixes the issue: post_install do |installer_representation|
workDir = Dir.pwd
xcconfigFilename = "#{workDir}/Pods/Pods.xcconfig"
xcconfig = File.read(xcconfigFilename)
newXcconfig = xcconfig.gsub(/HEADER_SEARCH_PATHS = "/, "HEADER_SEARCH_PATHS = $(inherited) \"")
File.open(xcconfigFilename, "w") { |file| file << newXcconfig }
end So after running pod install, the header search paths still contain the $(inherited) directive. |
For this particular case a CocoaPods patch would be easy. |
UPDATE: Instead of adding the Here is my setup of xcconfig files: You could then include the Pods.xcconfig in your own e.g. Release.xcconfig and add the PODS_ variables to your own search paths. platform :ios, '6.0'
pod 'AFNetworking', '~> 1.3.3'
pod 'ActionSheetPicker', '~> 0.0.2'
pod 'uservoice-iphone-sdk', '~> 3.0'
pod 'TestFlightSDK', '~> 3.0'
pod 'OpenUDID', '~> 1.0'
pod 'GoogleAnalytics-iOS-SDK', '~> 3.0'
pod 'DDPageControl', '~> 0.1'
pod 'RTLabel', '~> 1.0'
pod 'MCSegmentedControl', '~> 0.0'
pod 'SSKeychain', '~> 1.2'
pod 'SVProgressHUD', '~> 1.0'
pod 'SSZipArchive', '~> 0.3'
pod 'TTTAttributedLabel', '~> 1.8'
pod 'BugSense', '~> 3.6'
post_install do |installer_representation|
workDir = Dir.pwd
xcconfigFilename = "#{workDir}/Pods/Pods.xcconfig"
xcconfig = File.read(xcconfigFilename)
newXcconfig = xcconfig.gsub(/FRAMEWORK_SEARCH_PATHS/, "PODS_FRAMEWORK_SEARCH_PATHS")
newXcconfig = newXcconfig.gsub(/HEADER_SEARCH_PATHS/, "PODS_HEADER_SEARCH_PATHS")
newXcconfig = newXcconfig.gsub(/LIBRARY_SEARCH_PATHS/, "PODS_LIBRARY_SEARCH_PATHS")
newXcconfig = newXcconfig.gsub(/OTHER_LDFLAGS/, "PODS_OTHER_LDFLAGS")
newXcconfig = newXcconfig.gsub(/OTHER_CFLAGS/, "PODS_OTHER_CFLAGS")
File.open(xcconfigFilename, "w") { |file| file << newXcconfig }
end And here is my Shared.xcconfig which includes the PODS_ variables
|
When integrating into a project that already uses other xcconfig files to change the HEADER_SEARCH_PATHS the pods overrides them even if the pods.xcconfig file is #included from the correct existing xcconfig file. The default behavior should be to always include $(inherited) as with #546
The text was updated successfully, but these errors were encountered: