Skip to content

Commit 8fe85bb

Browse files
authored
CocoaPods fix for the addition of traits. (#2007)
Maps the default `traits` to preprocessor defines when building the library. Tested by swapping the ```swift #endif ``` for: ```swift #warning("Defined.") #else #error("Not defined.") #endif ``` And inspecting the output of `pod lib lint` to confirm the `#warning` is hit and not the `#error`. Fixes #2005
1 parent f21a997 commit 8fe85bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

SwiftProtobuf.podspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ Pod::Spec.new do |s|
1616

1717
s.cocoapods_version = '>= 1.13.0'
1818

19-
# Support `package` visibility.
2019
s.pod_target_xcconfig = {
20+
# Support the default `traits` from the package.
21+
'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => '$(inherited) BinaryDelimitedStreams FieldMaskUtilities',
22+
# Support `package` visibility.
2123
'OTHER_SWIFT_FLAGS' => '-package-name SwiftProtobuf'
2224
}
2325

0 commit comments

Comments
 (0)