Skip to content

Commit

Permalink
Get RN Podspec xcodeproject to compile
Browse files Browse the repository at this point in the history
Summary:
This diff includes a few changes to the `React.podspec` file:
1. Introduce a `jsi` spec for code inside the `ReactCommon/jsi` folder. This depends on the JavaScriptCore framework.
2. Introduce a `jsiexecutor` spec for the code inside the `ReactCommon/jsiexecutor` folder. These files depend on files in `ReactCommon/cxxreact`, `ReactCommon/jsi`, and Folly.
3. Since RCTCxxBridge.mm now depends on `JSIExecutor`, we need to have the `CxxBridge` spec depend on the `jsiexecutor` spec.

Reviewed By: hramos

Differential Revision: D9820323

fbshipit-source-id: 0c96d027eed30ee47b6ee0d2d86cd6b1ad7a5887
  • Loading branch information
mhorowitz authored and facebook-github-bot committed Oct 18, 2018
1 parent 6370b86 commit f85692c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 15 deletions.
14 changes: 8 additions & 6 deletions RNTester/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ PODS:
- Folly (= 2016.10.31.00)
- React/Core
- React/cxxreact
- React/jsiexecutor
- React/cxxreact (1000.0.0):
- boost-for-react-native (= 1.63.0)
- Folly (= 2016.10.31.00)
- React/jschelpers
- React/jsinspector
- React/DevSupport (1000.0.0):
- React/Core
- React/RCTWebSocket
- React/fishhook (1000.0.0)
- React/jschelpers (1000.0.0):
- React/jsi (1000.0.0):
- Folly (= 2016.10.31.00)
- React/PrivateDatabase
- React/jsiexecutor (1000.0.0):
- Folly (= 2016.10.31.00)
- React/cxxreact
- React/jsi
- React/jsinspector (1000.0.0)
- React/PrivateDatabase (1000.0.0)
- React/RCTActionSheet (1000.0.0):
- React/Core
- React/RCTAnimation (1000.0.0):
Expand Down Expand Up @@ -103,8 +105,8 @@ SPEC CHECKSUMS:
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
DoubleConversion: bb338842f62ab1d708ceb63ec3d999f0f3d98ecd
Folly: c89ac2d5c6ab169cd7397ef27485c44f35f742c7
glog: e8acf0ebbf99759d3ff18c86c292a5898282dcde
React: 1fe0eb13d90b625d94c3b117c274dcfd2e760e11
glog: 848747cb7af3aac910395f03626d7f63636e8ce6
React: 8cb457c5485e7640094a7df86fcdb6d1e56e182c
yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85

PODFILE CHECKSUM: 7af77fbc34af9646e8c6389e7e2c0b4663bb16d9
Expand Down
28 changes: 19 additions & 9 deletions React.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Pod::Spec.new do |s|
ss.dependency "Folly", folly_version
ss.dependency "React/Core"
ss.dependency "React/cxxreact"
ss.dependency "React/jsiexecutor"
ss.compiler_flags = folly_compiler_flags
ss.private_header_files = "React/Cxx*/*.h"
ss.source_files = "React/Cxx*/*.{h,m,mm}"
Expand Down Expand Up @@ -105,19 +106,29 @@ Pod::Spec.new do |s|
ss.source_files = "React/**/RCTTV*.{h,m}"
end

s.subspec "jschelpers" do |ss|
s.subspec "jsinspector" do |ss|
ss.source_files = "ReactCommon/jsinspector/*.{cpp,h}"
ss.private_header_files = "ReactCommon/jsinspector/*.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
end

s.subspec "jsiexecutor" do |ss|
ss.dependency "React/cxxreact"
ss.dependency "React/jsi"
ss.dependency "Folly", folly_version
ss.dependency "React/PrivateDatabase"
ss.compiler_flags = folly_compiler_flags
ss.source_files = "ReactCommon/jschelpers/*.{cpp,h}"
ss.private_header_files = "ReactCommon/jschelpers/*.h"
ss.source_files = "ReactCommon/jsiexecutor/jsireact/*.{cpp,h}"
ss.private_header_files = "ReactCommon/jsiexecutor/jsireact/*.h"
ss.header_dir = "jsireact"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
ss.framework = "JavaScriptCore"
end

s.subspec "jsinspector" do |ss|
ss.source_files = "ReactCommon/jsinspector/*.{cpp,h}"
ss.private_header_files = "ReactCommon/jsinspector/*.h"
s.subspec "jsi" do |ss|
ss.dependency "Folly", folly_version
ss.compiler_flags = folly_compiler_flags
ss.source_files = "ReactCommon/jsi/*.{cpp,h}"
ss.private_header_files = "ReactCommon/jsi/*.h"
ss.framework = "JavaScriptCore"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
end

Expand All @@ -128,7 +139,6 @@ Pod::Spec.new do |s|
end

s.subspec "cxxreact" do |ss|
ss.dependency "React/jschelpers"
ss.dependency "React/jsinspector"
ss.dependency "boost-for-react-native", "1.63.0"
ss.dependency "Folly", folly_version
Expand Down

0 comments on commit f85692c

Please sign in to comment.