Skip to content

Commit aad7436

Browse files
committed
fix: boost checksum issue before CocoaPods loads the podspec
1 parent b63a95d commit aad7436

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

example/ios/Podfile

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,24 @@ require Pod::Executable.execute_command('node', ['-p',
55
{paths: [process.argv[1]]},
66
)', __dir__]).strip
77

8-
platform :ios, '13.0'
9-
prepare_react_native_project!
10-
11-
# Fix boost checksum issue by using sourceforge mirror
8+
# Fix boost checksum issue BEFORE CocoaPods loads the podspec
129
# https://github.com/facebook/react-native/issues/37748
13-
pre_install do |installer|
14-
boost_path = File.join(installer.sandbox.root, '../node_modules/react-native/third-party-podspecs/boost.podspec')
15-
if File.exist?(boost_path)
16-
boost_spec = File.read(boost_path)
17-
if boost_spec.include?('boostorg.jfrog.io')
18-
boost_spec = boost_spec.gsub(
19-
'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2',
20-
'https://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.bz2/download'
21-
)
22-
File.write(boost_path, boost_spec)
23-
Pod::UI.puts 'Patched boost podspec to use sourceforge mirror'.green
24-
end
10+
boost_path = File.join(__dir__, '../node_modules/react-native/third-party-podspecs/boost.podspec')
11+
if File.exist?(boost_path)
12+
boost_spec = File.read(boost_path)
13+
if boost_spec.include?('boostorg.jfrog.io')
14+
boost_spec = boost_spec.gsub(
15+
'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2',
16+
'https://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.bz2/download'
17+
)
18+
File.write(boost_path, boost_spec)
19+
puts '✅ Patched boost podspec to use sourceforge mirror'
2520
end
2621
end
2722

23+
platform :ios, '13.0'
24+
prepare_react_native_project!
25+
2826
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
2927
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
3028
#

0 commit comments

Comments
 (0)