Skip to content

Commit

Permalink
Remove 's.static_framework = true' requirement for podspec (facebook#…
Browse files Browse the repository at this point in the history
…25816)

Summary:
As part of the fix for facebook#25349 I added `s.static_framework = true` to each podspec in repo (see facebook#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.

I don't think this needs a changelog entry since its just a refinement of facebook#25619.
Pull Request resolved: facebook#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 TMomemt committed Aug 2, 2019
1 parent 2ac46f4 commit 280a93d
Show file tree
Hide file tree
Showing 31 changed files with 64 additions and 114 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/CameraRoll/React-RCTCameraRoll.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,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/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/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/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
73 changes: 40 additions & 33 deletions RNTester/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ PODS:
- glog (0.3.5)
- 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 @@ -23,7 +24,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 @@ -57,13 +57,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 @@ -145,10 +147,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 @@ -157,6 +159,7 @@ 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
Expand Down Expand Up @@ -192,6 +195,7 @@ 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)
Expand All @@ -215,8 +219,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 @@ -247,6 +249,8 @@ 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`)
Expand All @@ -268,6 +272,9 @@ DEPENDENCIES:
- React-RCTWebSocket (from `../Libraries/WebSocket`)
- React-turbomodule-core (from `../ReactCommon/turbomodule/core`)
- React-turbomodule-samples (from `../ReactCommon/turbomodule/samples`)
- ReactCommon/jscallinvoker (from `../ReactCommon`)
- ReactCommon/turbomodule/core (from `../ReactCommon`)
- ReactCommon/turbomodule/samples (from `../ReactCommon`)
- yoga (from `../ReactCommon/yoga`)

SPEC REPOS:
Expand Down Expand Up @@ -329,40 +336,40 @@ EXTERNAL SOURCES:
:path: "../ReactCommon/turbomodule/core"
React-turbomodule-samples:
:path: "../ReactCommon/turbomodule/samples"
ReactCommon:
:path: "../ReactCommon"
yoga:
:path: "../ReactCommon/yoga"

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: bb578b8286c0068879a41ac092c9690cc3ede523
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
8 changes: 0 additions & 8 deletions RNTester/RNTesterPods.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@
E7DB20F822B2BD53005AC45F /* libReact-ART.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-ART.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB20FA22B2BD53005AC45F /* libReact-Core.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-Core.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB20FC22B2BD53005AC45F /* libReact-cxxreact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-cxxreact.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB20FE22B2BD53005AC45F /* libReact-DevSupport.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-DevSupport.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB210222B2BD53005AC45F /* libReact-jsi.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-jsi.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB210422B2BD53005AC45F /* libReact-jsiexecutor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-jsiexecutor.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB210622B2BD53005AC45F /* libReact-jsinspector.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-jsinspector.a"; sourceTree = BUILT_PRODUCTS_DIR; };
Expand All @@ -150,7 +149,6 @@
E7DB211622B2BD53005AC45F /* libReact-RCTSettings.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-RCTSettings.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB211822B2BD53005AC45F /* libReact-RCTText.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-RCTText.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB211A22B2BD53005AC45F /* libReact-RCTVibration.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-RCTVibration.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB211C22B2BD53005AC45F /* libReact-RCTWebSocket.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libReact-RCTWebSocket.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB212222B2BD53005AC45F /* libyoga.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libyoga.a; sourceTree = BUILT_PRODUCTS_DIR; };
E7DB212422B2C342005AC45F /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libOCMock.a; sourceTree = "<group>"; };
E7DB212622B2C342005AC45F /* OCMockObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMockObject.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -255,7 +253,6 @@
E7DB20F822B2BD53005AC45F /* libReact-ART.a */,
E7DB20FA22B2BD53005AC45F /* libReact-Core.a */,
E7DB20FC22B2BD53005AC45F /* libReact-cxxreact.a */,
E7DB20FE22B2BD53005AC45F /* libReact-DevSupport.a */,
E7DB210222B2BD53005AC45F /* libReact-jsi.a */,
E7DB210422B2BD53005AC45F /* libReact-jsiexecutor.a */,
E7DB210622B2BD53005AC45F /* libReact-jsinspector.a */,
Expand All @@ -269,7 +266,6 @@
E7DB211622B2BD53005AC45F /* libReact-RCTSettings.a */,
E7DB211822B2BD53005AC45F /* libReact-RCTText.a */,
E7DB211A22B2BD53005AC45F /* libReact-RCTVibration.a */,
E7DB211C22B2BD53005AC45F /* libReact-RCTWebSocket.a */,
E7DB212222B2BD53005AC45F /* libyoga.a */,
F94084777080D7B374FB4783 /* libPods-RNTester.a */,
8210317F3CE28B1945488740 /* libPods-RNTesterIntegrationTests.a */,
Expand Down Expand Up @@ -537,7 +533,6 @@
"\"${PODS_ROOT}/Headers/Public/DoubleConversion\"",
"\"${PODS_ROOT}/Headers/Public/React-ART\"",
"\"${PODS_ROOT}/Headers/Public/React-Core\"",
"\"${PODS_ROOT}/Headers/Public/React-DevSupport\"",
"\"${PODS_ROOT}/Headers/Public/React-Fabric\"",
"\"${PODS_ROOT}/Headers/Public/React-RCTActionSheet\"",
"\"${PODS_ROOT}/Headers/Public/React-RCTAnimation\"",
Expand All @@ -552,7 +547,6 @@
"\"${PODS_ROOT}/Headers/Public/React-RCTSettings\"",
"\"${PODS_ROOT}/Headers/Public/React-RCTText\"",
"\"${PODS_ROOT}/Headers/Public/React-RCTVibration\"",
"\"${PODS_ROOT}/Headers/Public/React-RCTWebSocket\"",
"\"${PODS_ROOT}/Headers/Public/React-cxxreact\"",
"\"${PODS_ROOT}/Headers/Public/React-fishhook\"",
"\"${PODS_ROOT}/Headers/Public/React-jsi\"",
Expand Down Expand Up @@ -594,7 +588,6 @@
"\"${PODS_ROOT}/Headers/Public/DoubleConversion\"",
"\"${PODS_ROOT}/Headers/Public/React-ART\"",
"\"${PODS_ROOT}/Headers/Public/React-Core\"",
"\"${PODS_ROOT}/Headers/Public/React-DevSupport\"",
"\"${PODS_ROOT}/Headers/Public/React-Fabric\"",
"\"${PODS_ROOT}/Headers/Public/React-RCTActionSheet\"",
"\"${PODS_ROOT}/Headers/Public/React-RCTAnimation\"",
Expand All @@ -609,7 +602,6 @@
"\"${PODS_ROOT}/Headers/Public/React-RCTSettings\"",
"\"${PODS_ROOT}/Headers/Public/React-RCTText\"",
"\"${PODS_ROOT}/Headers/Public/React-RCTVibration\"",
"\"${PODS_ROOT}/Headers/Public/React-RCTWebSocket\"",
"\"${PODS_ROOT}/Headers/Public/React-cxxreact\"",
"\"${PODS_ROOT}/Headers/Public/React-fishhook\"",
"\"${PODS_ROOT}/Headers/Public/React-jsi\"",
Expand Down
20 changes: 15 additions & 5 deletions React-Core.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ boost_compiler_flags = '-Wno-documentation'

header_subspecs = {
'ARTHeaders' => 'Libraries/ART/**/*.h',
'DevSupportHeaders' => 'React/{DevSupport/*.h,Inspector/*.h}',
'CoreModulesHeaders' => 'React/CoreModules/**/*.h',
'RCTActionSheetHeaders' => 'Libraries/ActionSheetIOS/*.h',
'RCTAnimationHeaders' => 'Libraries/NativeAnimation/{Drivers/*,Nodes/*,*}.{h}',
Expand All @@ -34,9 +33,7 @@ header_subspecs = {
'RCTPushNotificationHeaders' => 'Libraries/PushNotificationIOS/*.h',
'RCTSettingsHeaders' => 'Libraries/Settings/*.h',
'RCTTextHeaders' => 'Libraries/Text/**/*.h',
'RCTSettingsHeaders' => 'Libraries/Settings/*.h',
'RCTVibrationHeaders' => 'Libraries/Vibration/*.h',
'RCTWebSocketHeaders' => 'Libraries/WebSocket/*.h',
}

Pod::Spec.new do |s|
Expand All @@ -50,12 +47,11 @@ Pod::Spec.new do |s|
s.source = source
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.header_dir = "React"
s.static_framework = true
s.framework = "JavaScriptCore"
s.library = "stdc++"
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Folly\"" }
s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""}
s.default_subspec = "Default"
s.default_subspec = "Default"

s.subspec "Default" do |ss|
ss.source_files = "React/**/*.{c,h,m,mm,S,cpp}"
Expand All @@ -73,6 +69,20 @@ Pod::Spec.new do |s|
ss.private_header_files = "React/Cxx*/*.h"
end

s.subspec "DevSupport" do |ss|
ss.source_files = "React/DevSupport/*.{h,mm,m}",
"React/Inspector/*.{h,mm,m}"

ss.dependency "React-Core/Default", version
ss.dependency "React-Core/RCTWebSocket", version
ss.dependency "React-jsinspector", version
end

s.subspec "RCTWebSocket" do |ss|
ss.source_files = "Libraries/WebSocket/*.{h,m}"
ss.dependency "React-Core/Default", version
end

# Add a subspec containing just the headers for each
# pod that should live under <React/*.h>
header_subspecs.each do |name, headers|
Expand Down
4 changes: 2 additions & 2 deletions React.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ Pod::Spec.new do |s|
s.cocoapods_version = ">= 1.2.0"

s.dependency "React-Core", version
s.dependency "React-DevSupport", version
s.dependency "React-Core/DevSupport", version
s.dependency "React-Core/RCTWebSocket", version
s.dependency "React-RCTActionSheet", version
s.dependency "React-RCTAnimation", version
s.dependency "React-RCTBlob", version
Expand All @@ -53,5 +54,4 @@ Pod::Spec.new do |s|
s.dependency "React-RCTSettings", version
s.dependency "React-RCTText", version
s.dependency "React-RCTVibration", version
s.dependency "React-RCTWebSocket", version
end
Loading

0 comments on commit 280a93d

Please sign in to comment.