Commit a6b6ea04 authored by Samuel E. Giddins's avatar Samuel E. Giddins

[XCConfigHelper] Fix the `OTHER_SWIFT_FLAGS` generated, so `#if COCOAPODS` works in Swift.

Closes https://github.com/CocoaPods/CocoaPods/issues/2983.
parent 898d083a
...@@ -35,6 +35,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -35,6 +35,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Samuel Giddins](https://github.com/segiddins) [Samuel Giddins](https://github.com/segiddins)
[#3137](https://github.com/CocoaPods/CocoaPods/issues/3137) [#3137](https://github.com/CocoaPods/CocoaPods/issues/3137)
* Fix the `OTHER_SWIFT_FLAGS` generated, so `#if COCOAPODS` works in Swift.
[Samuel Giddins](https://github.com/segiddins)
[#2983](https://github.com/CocoaPods/CocoaPods/issues/2983)
## 0.36.0.beta.2 ## 0.36.0.beta.2
......
...@@ -160,7 +160,7 @@ module Pod ...@@ -160,7 +160,7 @@ module Pod
def self.add_language_specific_settings(target, xcconfig) def self.add_language_specific_settings(target, xcconfig)
if target.uses_swift? if target.uses_swift?
build_settings = { build_settings = {
'OTHER_SWIFT_FLAGS' => quote(['-D COCOAPODS']), 'OTHER_SWIFT_FLAGS' => quote(%w(-D COCOAPODS)),
} }
xcconfig.merge!(build_settings) xcconfig.merge!(build_settings)
end end
......
...@@ -143,7 +143,7 @@ module Pod ...@@ -143,7 +143,7 @@ module Pod
end end
it 'adds the COCOAPODS macro definition' do it 'adds the COCOAPODS macro definition' do
@xcconfig.to_hash['OTHER_SWIFT_FLAGS'].should.include '-D COCOAPODS' @xcconfig.to_hash['OTHER_SWIFT_FLAGS'].should.include '"-D" "COCOAPODS"'
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment