Skip to content

Commit 618b802

Browse files
authored
Explicit extension safety flag (#866)
This explicitly declares that ReactiveSwift only uses extension safe APIs (and/or APIs in an extension-safe way). The code was already extension safe; this just forward declares it and enforces it at compile time. If I can enforce this here, then I can enforce it in [Workflow](https://github.com/square/Workflow-swift) which is heavily dependent on this library. Without this explicit conformance, it is not straightforward to write CI validation that these libraries remain extension safe. There is zero harm in explicit conformance. Non-extension applications can call into extension-safe libraries without any restrictions. #### Checklist - [x] Updated CHANGELOG.md.
1 parent f3fc99a commit 618b802

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*Please add new entries at the top.*
33

44
1. Bumped deployment target to iOS 11, tvOS 11, watchOS 4, macOS 10.13, per Xcode 14 warnings
5+
1. Explicitly declare `APPLICATION_EXTENSION_API_ONLY` for CocoaPods
56

67
# 7.1.0
78
1. Add CI Release jobs on tag push (#862, kudos to @p4checo)

ReactiveSwift.podspec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ Pod::Spec.new do |s|
1919
# Directory glob for all Swift files
2020
s.source_files = ["Sources/*.{swift}", "Sources/**/*.{swift}"]
2121

22-
s.pod_target_xcconfig = {"OTHER_SWIFT_FLAGS[config=Release]" => "$(inherited) -suppress-warnings" }
22+
s.pod_target_xcconfig = {
23+
'APPLICATION_EXTENSION_API_ONLY' => 'YES',
24+
"OTHER_SWIFT_FLAGS[config=Release]" => "$(inherited) -suppress-warnings"
25+
}
2326

2427
s.cocoapods_version = ">= 1.7.0"
2528
s.swift_versions = ["5.2", "5.3" "5.4", "5.5", "5.6", "5.7"]

0 commit comments

Comments
 (0)