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
......@@ -8,7 +8,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Enhancements
* Build for iOS simulator only during validation. This allows validation without having
* Build for iOS simulator only during validation. This allows validation without having
provisioning profiles set up.
[Boris Bügling](https://github.com/neonichu)
[#3083](https://github.com/CocoaPods/CocoaPods/issues/3083)
......@@ -35,6 +35,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Samuel Giddins](https://github.com/segiddins)
[#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
......
......@@ -160,7 +160,7 @@ module Pod
def self.add_language_specific_settings(target, xcconfig)
if target.uses_swift?
build_settings = {
'OTHER_SWIFT_FLAGS' => quote(['-D COCOAPODS']),
'OTHER_SWIFT_FLAGS' => quote(%w(-D COCOAPODS)),
}
xcconfig.merge!(build_settings)
end
......
......@@ -143,7 +143,7 @@ module Pod
end
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
......
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