Skip to content

Commit

Permalink
Remove 's.static_framework = true' requirement for podspec (#25816)
Browse files Browse the repository at this point in the history
Summary:
As part of the fix for #25349 I added `s.static_framework = true` to each podspec in repo (see #25619 (comment) for more context).

This was required to ensure the existing conditional compilation with `#if RCT_DEV` and `__has_include` still worked correctly when `use_frameworks!` is enabled.

However, fkgozali pointed out that it would be ideal if we didn't have this requirement as it could make life difficult for third-party libraries.

This removes the requirement by moving `React-DevSupport.podspec` and `React-RCTWebSocket.podspec` into `React-Core.podspec` as subspecs. This means the symbols are present when `React-Core.podspec` is built dynamically so `s.static_framework = true` isn't required.

This means that any `Podfile` that refers to `React-DevSupport` or `React-RCTWebSocket` will need to be updated to avoid errors.

## Changelog

I don't think this needs a changelog entry since its just a refinement of #25619.
Pull Request resolved: #25816

Test Plan:
Check `RNTesterPods` still works both with and without `use_frameworks!`:

1. Go to the `RNTester` directory and run `pod install`.
2. Run the tests in `RNTesterPods.xcworkspace` to see that everything still works fine.
3. Uncomment the `use_frameworks!` line at the top of `RNTester/Podfile` and run `pod install` again.
4. Run the tests again and see that it still works with frameworks enabled.

Reviewed By: hramos

Differential Revision: D16495030

Pulled By: fkgozali

fbshipit-source-id: 2708ac9fd20cd04cb0aea61b2e8ab0d931dfb6d5
  • Loading branch information
jtreanor authored and facebook-github-bot committed Jul 25, 2019
1 parent 71c84cf commit ca9e108
Show file tree
Hide file tree
Showing 32 changed files with 59 additions and 162 deletions.
1 change: 0 additions & 1 deletion Libraries/ART/React-ART.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Pod::Spec.new do |s|
s.source_files = "**/*.{m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "ART"
s.static_framework = true

s.dependency "React-Core/ARTHeaders", version
end
1 change: 0 additions & 1 deletion Libraries/ActionSheetIOS/React-RCTActionSheet.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Pod::Spec.new do |s|
s.source_files = "*.{m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTActionSheet"
s.static_framework = true

s.dependency "React-Core/RCTActionSheetHeaders", version
end
3 changes: 1 addition & 2 deletions Libraries/Blob/React-RCTBlob.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ Pod::Spec.new do |s|
s.source_files = "*.{m,mm}", "RCTBlobCollector.h"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTBlob"
s.static_framework = true

s.dependency "React-Core/RCTBlobHeaders", version
s.dependency "React-Core/RCTWebSocket", version
s.dependency "React-RCTNetwork", version
s.dependency "React-RCTWebSocket", version
s.dependency "React-jsi", version
end
1 change: 0 additions & 1 deletion Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Pod::Spec.new do |s|
s.source = source
s.source_files = "**/*.{c,h,m,mm,cpp}"
s.header_dir = "FBReactNativeSpec"
s.static_framework = true

s.pod_target_xcconfig = {
"USE_HEADERMAP" => "YES",
Expand Down
1 change: 0 additions & 1 deletion Libraries/Image/React-RCTImage.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Pod::Spec.new do |s|
s.source_files = "*.{m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTImage"
s.static_framework = true

s.dependency "React-Core/RCTImageHeaders", version
s.dependency "React-RCTNetwork", version
Expand Down
1 change: 0 additions & 1 deletion Libraries/LinkingIOS/React-RCTLinking.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Pod::Spec.new do |s|
s.source_files = "*.{m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTLinking"
s.static_framework = true

s.dependency "React-Core/RCTLinkingHeaders", version
end
1 change: 0 additions & 1 deletion Libraries/NativeAnimation/React-RCTAnimation.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Pod::Spec.new do |s|
s.source_files = "{Drivers/*,Nodes/*,*}.{m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTAnimation"
s.static_framework = true

s.dependency "React-Core/RCTAnimationHeaders", version
end
1 change: 0 additions & 1 deletion Libraries/Network/React-RCTNetwork.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Pod::Spec.new do |s|
s.source_files = "*.{m,mm}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTNetwork"
s.static_framework = true

s.dependency "React-Core/RCTNetworkHeaders", version
end
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Pod::Spec.new do |s|
s.source_files = "*.{m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTPushNotification"
s.static_framework = true

s.dependency "React-Core/RCTPushNotificationHeaders", version
end
1 change: 0 additions & 1 deletion Libraries/RCTRequired/RCTRequired.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ Pod::Spec.new do |s|
s.source = source
s.source_files = "**/*.{c,h,m,mm,cpp}"
s.header_dir = "RCTRequired"
s.static_framework = true
end
1 change: 0 additions & 1 deletion Libraries/Settings/React-RCTSettings.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Pod::Spec.new do |s|
s.source_files = "*.{m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTSettings"
s.static_framework = true

s.dependency "React-Core/RCTSettingsHeaders", version
end
1 change: 0 additions & 1 deletion Libraries/Text/React-RCTText.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Pod::Spec.new do |s|
s.source_files = "**/*.{h,m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTText"
s.static_framework = true

s.dependency "React-Core/RCTTextHeaders", version
end
1 change: 0 additions & 1 deletion Libraries/TypeSafety/RCTTypeSafety.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Pod::Spec.new do |s|
s.source = source
s.source_files = "**/*.{c,h,m,mm,cpp}"
s.header_dir = "RCTTypeSafety"
s.static_framework = true
s.pod_target_xcconfig = {
"USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
Expand Down
1 change: 0 additions & 1 deletion Libraries/Vibration/React-RCTVibration.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Pod::Spec.new do |s|
s.source_files = "*.{m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTVibration"
s.static_framework = true

s.dependency "React-Core/RCTVibrationHeaders", version
end
36 changes: 0 additions & 36 deletions Libraries/WebSocket/React-RCTWebSocket.podspec

This file was deleted.

79 changes: 35 additions & 44 deletions RNTester/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ PODS:
- React-Core (= 1000.0.0)
- React (1000.0.0):
- React-Core (= 1000.0.0)
- React-DevSupport (= 1000.0.0)
- React-Core/DevSupport (= 1000.0.0)
- React-Core/RCTWebSocket (= 1000.0.0)
- React-RCTActionSheet (= 1000.0.0)
- React-RCTAnimation (= 1000.0.0)
- React-RCTBlob (= 1000.0.0)
Expand All @@ -37,7 +38,6 @@ PODS:
- React-RCTSettings (= 1000.0.0)
- React-RCTText (= 1000.0.0)
- React-RCTVibration (= 1000.0.0)
- React-RCTWebSocket (= 1000.0.0)
- React-ART (1000.0.0):
- React-Core/ARTHeaders (= 1000.0.0)
- React-Core (1000.0.0):
Expand Down Expand Up @@ -71,13 +71,15 @@ PODS:
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/DevSupportHeaders (1000.0.0):
- React-Core/DevSupport (1000.0.0):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-Core/Default (= 1000.0.0)
- React-Core/RCTWebSocket (= 1000.0.0)
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- React-jsinspector (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/RCTActionSheetHeaders (1000.0.0):
- Folly (= 2018.10.22.00)
Expand Down Expand Up @@ -159,10 +161,10 @@ PODS:
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/RCTWebSocketHeaders (1000.0.0):
- React-Core/RCTWebSocket (1000.0.0):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-Core/Default (= 1000.0.0)
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
Expand All @@ -171,16 +173,13 @@ PODS:
- FBReactNativeSpec (= 1000.0.0)
- Folly (= 2018.10.22.00)
- React-Core/CoreModulesHeaders (= 1000.0.0)
- ReactCommon/turbomodule/core (= 1000.0.0)
- React-cxxreact (1000.0.0):
- boost-for-react-native (= 1.63.0)
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-jsinspector (= 1000.0.0)
- React-DevSupport (1000.0.0):
- React-Core/DevSupportHeaders (= 1000.0.0)
- React-jsinspector (= 1000.0.0)
- React-RCTWebSocket (= 1000.0.0)
- React-jsi (1000.0.0):
- boost-for-react-native (= 1.63.0)
- DoubleConversion
Expand All @@ -205,9 +204,9 @@ PODS:
- React-Core/RCTAnimationHeaders (= 1000.0.0)
- React-RCTBlob (1000.0.0):
- React-Core/RCTBlobHeaders (= 1000.0.0)
- React-Core/RCTWebSocket (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-RCTNetwork (= 1000.0.0)
- React-RCTWebSocket (= 1000.0.0)
- React-RCTImage (1000.0.0):
- React-Core/RCTImageHeaders (= 1000.0.0)
- React-RCTNetwork (= 1000.0.0)
Expand All @@ -225,8 +224,6 @@ PODS:
- React-Core/RCTTextHeaders (= 1000.0.0)
- React-RCTVibration (1000.0.0):
- React-Core/RCTVibrationHeaders (= 1000.0.0)
- React-RCTWebSocket (1000.0.0):
- React-Core/RCTWebSocketHeaders (= 1000.0.0)
- ReactCommon/jscallinvoker (1000.0.0):
- DoubleConversion
- Folly (= 2018.10.22.00)
Expand Down Expand Up @@ -262,9 +259,10 @@ DEPENDENCIES:
- React (from `../`)
- React-ART (from `../Libraries/ART`)
- React-Core (from `../`)
- React-Core/DevSupport (from `../`)
- React-Core/RCTWebSocket (from `../`)
- React-CoreModules (from `../React/CoreModules`)
- React-cxxreact (from `../ReactCommon/cxxreact`)
- React-DevSupport (from `../React`)
- React-jsi (from `../ReactCommon/jsi`)
- React-jsiexecutor (from `../ReactCommon/jsiexecutor`)
- React-jsinspector (from `../ReactCommon/jsinspector`)
Expand All @@ -279,7 +277,6 @@ DEPENDENCIES:
- React-RCTTest (from `RCTTest`)
- React-RCTText (from `../Libraries/Text`)
- React-RCTVibration (from `../Libraries/Vibration`)
- React-RCTWebSocket (from `../Libraries/WebSocket`)
- ReactCommon/jscallinvoker (from `../ReactCommon`)
- ReactCommon/turbomodule/core (from `../ReactCommon`)
- ReactCommon/turbomodule/samples (from `../ReactCommon`)
Expand Down Expand Up @@ -314,8 +311,6 @@ EXTERNAL SOURCES:
:path: "../React/CoreModules"
React-cxxreact:
:path: "../ReactCommon/cxxreact"
React-DevSupport:
:path: "../React"
React-jsi:
:path: "../ReactCommon/jsi"
React-jsiexecutor:
Expand Down Expand Up @@ -344,8 +339,6 @@ EXTERNAL SOURCES:
:path: "../Libraries/Text"
React-RCTVibration:
:path: "../Libraries/Vibration"
React-RCTWebSocket:
:path: "../Libraries/WebSocket"
ReactCommon:
:path: "../ReactCommon"
yoga:
Expand All @@ -355,33 +348,31 @@ SPEC CHECKSUMS:
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
FBLazyVector: 34431b7e61740bed29b082ff81500b0ffafaffa0
FBReactNativeSpec: 0c434153f44d4a1cbd111fbde1502580475e9132
FBReactNativeSpec: e9febd2d5cc091662f172724165922b2e28d10a3
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
RCTRequired: 770d733d8b6881e0ecd1085d0eb7f57dfacc5d93
RCTTypeSafety: 8540a73bafd032be534cb683471f985dc656bfb6
React: 7c652b87c228731c51ab5764de68b6c17e6342be
React-ART: 84555d2fcff922e3fed8ce70b5fb2536fb7c163e
React-Core: 266e5912bbfd0bddb866782b9bb560d82c5b8ef4
React-CoreModules: 018c3d55a5bfbd04655489942a8c606527176eed
React-cxxreact: 8cbb09bfdf4241546c5f4a9f46d92f63295281e0
React-DevSupport: f5349e286c067443895e6ae60d808eeaabedf472
React-jsi: ec7bccfadb03c9aa26db7ba880a02b983b921316
React-jsiexecutor: 173df46fcbafe60986cd5e42bde45e693c783af9
React-jsinspector: 426757e28a6909b49f7dd126f6f1dbd2783764f8
React-RCTActionSheet: a172ba63176ca80d7440f29fdd65515b442e4232
React-RCTAnimation: 276dde8150bb1a7d9eef8f3b44db66bddebedec3
React-RCTBlob: d60bf36ef77d3fb9e39a46443ea89c68381b4650
React-RCTImage: 29cbf7ccc2b89ac7ac6d9f2c84c15cfabaeabe6b
React-RCTLinking: 387d21f8fd4423dde220bf18be9715054cfc7cf5
React-RCTNetwork: ad750ce9bd98d382020174b14537d2ffa09427e0
React-RCTPushNotification: 90e1127e8f243296eef48c35dba370588405728b
React-RCTSettings: 405b277fb5afed794564af2d99ab71315806768d
React-RCTTest: c999df66263f36ddd63328356ac5898f2089e91e
React-RCTText: 667603cc6464856a6314a05b3d605da0a7fbf8e3
React-RCTVibration: 775cffcf1040bfa92fea6982f43d5f1a438edf05
React-RCTWebSocket: c10d7eecfc66d58ece635508dc1e8ecf6b548c60
ReactCommon: 7fd06e02cb448d0260cb7219cf0057984b49de17
RCTRequired: 33f3b89d2d82ef01c02b9b4f8146c43762e509d8
RCTTypeSafety: 2b1cb2d92b779aa9a3522f67bd4f07e6b6d0797e
React: 28a654b69575941571c073a656bc06795825e7f7
React-ART: a5da06a892342d03896e0db45a7072525981f63c
React-Core: 47b8ab211d9325292811e62ee23c54b464853111
React-CoreModules: 38d8cc34497674ae3d411e644a9b17ad75ef3f74
React-cxxreact: 7c4242192149ce0205b53efaa03e3bf86ba4337c
React-jsi: 98d1f9d8a79d2720ba6a44c2d928a77f315b7e4f
React-jsiexecutor: c0ab8c80a6e88380d63f583690a50d4a723b47b5
React-jsinspector: ea0a218071a11c3687cef2480580180caa6a64c0
React-RCTActionSheet: 090e7bd7c5774d919c47c4eeff78223a7fd8c19c
React-RCTAnimation: 73d536fff417a101724d9529189c95a94263710c
React-RCTBlob: 86017e0ba937b94445c5f680fef27ab831700fe7
React-RCTImage: 7f5c9bff34905f1bc216be512ba0ae68f872208a
React-RCTLinking: d7d7f792e63a8d57380cecbb9b7a3b31f92d1bb6
React-RCTNetwork: c8f9d40297f35ea3792ea81866f33e8b45c25935
React-RCTPushNotification: acffa8af6a20e6d41b041a8c4cb4bea0de9df0dd
React-RCTSettings: dd4009546ce88c3647c32f0b5922459ab313fdca
React-RCTTest: 73df09ec226fcad6e7e058a313e5dd16cccf86a8
React-RCTText: 9078167d3bc011162326f2d8ef4dd580ec1eca17
React-RCTVibration: 63c20d89204937ff8c7bbc1e712383347e6fbd90
ReactCommon: 63d1a6355d5810a21a61efda9ac93804571a1b8b
yoga: b72aa5b3708cc93c5897f8297122d6eba1331e07

PODFILE CHECKSUM: f866eab42001b1d59349bce6b20d00912cdc700c
Expand Down
3 changes: 1 addition & 2 deletions RNTester/RCTTest/React-RCTTest.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Pod::Spec.new do |s|
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.framework = "XCTest"
s.header_dir = "RCTTest"
s.static_framework = true


s.dependency "React-Core", version
end
Loading

0 comments on commit ca9e108

Please sign in to comment.