Skip to content

Commit d40db3a

Browse files
CFKevinReffacebook-github-bot
authored andcommitted
Use boost-for-react-native CocoaPod
Summary: Use the same header-only distribution of Boost that Android and the automatic ios-install-third-party.sh script uses. Greatly speeds up `pod install`, even when the distribution was already cached. The dependency tree looks like this: * React * cxxreact subspec * **Boost** (versioned, 1.63.0) * Folly * **Boost** (any version, will resolve to 1.63.0 from above) Alternative implementation of PR #16756. Fixes issue #16381. (same as #16756) * Install react-native via Cocoapods (or move a helloWorld react-native application over to use Cocoapods for dependency management) * Add CxxBridge instead of BatchedBridge to your Podfile * run pod install * run react-native run-ios [Add boost.podspec speed up download time & reduce size of the package](#16756) [IOS] [BUGFIX] [third-party-podspecs] - optimize CocoaPods installation (Boost distribution) Closes #17476 Differential Revision: D6746095 Pulled By: hramos fbshipit-source-id: 55b2b5a698691f7fca0bf4c31c4376c2b9eb5379
1 parent df2f335 commit d40db3a

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Diff for: React.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ Pod::Spec.new do |s|
139139
s.subspec "cxxreact" do |ss|
140140
ss.dependency "React/jschelpers"
141141
ss.dependency "React/jsinspector"
142-
ss.dependency "boost"
142+
ss.dependency "boost-for-react-native", "1.63.0"
143143
ss.dependency "Folly", "2016.09.26.00"
144144
ss.compiler_flags = folly_compiler_flags
145145
ss.source_files = "ReactCommon/cxxreact/*.{cpp,h}"
146146
ss.exclude_files = "ReactCommon/cxxreact/SampleCxxModule.*"
147147
ss.private_header_files = "ReactCommon/cxxreact/*.h"
148-
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Folly\"" }
148+
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Folly\"" }
149149
end
150150

151151
s.subspec "ART" do |ss|

Diff for: third-party-podspecs/Folly.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Pod::Spec.new do |spec|
88
spec.source = { :git => 'https://github.com/facebook/folly.git',
99
:tag => "v#{spec.version}" }
1010
spec.module_name = 'folly'
11-
spec.dependency 'boost'
11+
spec.dependency 'boost-for-react-native'
1212
spec.dependency 'DoubleConversion'
1313
spec.dependency 'GLog'
1414
spec.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
@@ -28,7 +28,7 @@ Pod::Spec.new do |spec|
2828
spec.libraries = "stdc++"
2929
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
3030
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
31-
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\"" }
31+
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\"" }
3232

3333
# Pinning to the same version as React.podspec.
3434
spec.platforms = { :ios => "8.0", :tvos => "9.2" }

Diff for: third-party-podspecs/GLog.podspec

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Pod::Spec.new do |spec|
1010
spec.source = { :git => 'https://github.com/google/glog.git',
1111
:tag => "v#{spec.version}" }
1212
spec.module_name = 'glog'
13+
spec.header_dir = 'glog'
1314
spec.source_files = 'src/glog/*.h',
1415
'src/demangle.cc',
1516
'src/logging.cc',

0 commit comments

Comments
 (0)