There is a temporary solution on Error installing boost Verification checksum was incorrect #843.
Below are the steps which I followed to solve the Boost issue in React Native. I have 0.70.5 version of React Native in my project.
Step 1: delete folder node_modules, file package-lock.json, pods and podfile.lock
Step 2: Install patch-package (note: it also work with yarn)
npm install --save-dev patch-package postinstall-postinstall
Step 3: npm install
Step 4: Modify your Modify boost.podspec: in directory node_modules/react-native/third-party-podspecs/boost.podspec (Note: if you have a version of React Native higher than 0.70, then change the Boost version to 1.83.0)
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
Pod::Spec.new do |spec|
spec.name = 'boost'
# change the version below line
spec.version = '1.76.0'
spec.license = { :type => 'Boost Software License', :file => "LICENSE_1_0.txt" }
spec.homepage = 'http://www.boost.org'
spec.summary = 'Boost provides free peer-reviewed portable C++ source libraries.'
spec.authors = 'Rene Rivera'
https://
spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2',
:sha256 => 'f0397ba6e982c4450f27bf32a2a8b827c41' }
# Pinning to the same version as React.podspec.
spec.platforms = { :ios => '13.0', :tvos => '13.0' }
spec.requires_arc = false
spec.module_name = 'boost'
spec.header_dir = 'boost'
spec.preserve_path = 'boost'
end
The only changes are in these two lines, else they are the same:
spec.version = '1.76.0'
'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2',
Step 5: run the below command to create a patch file based on your changes
npx patch-package react-native
Step 6: Modify your package.json
"scripts": {
"postinstall": "patch-package"
}
Step 7: run npm install
and pod install
. patch-package will automatically apply the patch to the boost.podspec file.
Below is my patch file which I created by the above command react-native+0.70.5.patch
diff --git a/node_modules/react-native/third-party-podspecs/boost.podspec b/node_modules/react-native/third-party-podspecs/boost.podspec
index 2f1fcc4..0f83c02 100644
--- a/node_modules/react-native/third-party-podspecs/boost.podspec
+++ b/node_modules/react-native/third-party-podspecs/boost.podspec
@@ -10,11 +10,11 @@ Pod::Spec.new do |spec|
spec.homepage = 'http://www.boost.org'
spec.summary = 'Boost provides free peer-reviewed portable C++ source libraries.'
spec.authors = 'Rene Rivera'
- spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2',
+ spec.source = { :http => 'https://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.bz2',
:sha256 => 'f0397ba6e982c4450f27bf37a5623a14636ea583318c41' }
# Pinning to the same version as React.podspec.
- spec.platforms = { :ios => '11.0', :tvos => '11.0' }
+ spec.platforms = { :ios => '13.0', :tvos => '13.0' }
spec.requires_arc = false
spec.module_name = 'boost'
Also update podfile iOS version to 13.0 minimum to support Boost 1.76.0. Otherwise you will run into this issue.
Note: The platform of the target App_New
(iOS 12.4) may not be compatible with Boost (1.76.0) which has a minimum requirement of iOS 13.0 - tvOS 13.0.
platform: ios, '13.0'