Skip to content

Boost Installation Checksum Error in React Native

Problem Statement

When running pod install in the ios directory of a React Native project (version 0.73.1 shown, but affects multiple versions), you may encounter a checksum verification error:

text
Verification checksum was incorrect, expected 6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e, 
got 5e89103d9b70bba5c91a794126b169cb67654be2051f90cf7c22ba6893ede0ff

This error occurs when CocoaPods fails to verify the integrity of the Boost library download during React Native iOS dependency installation. The root cause is a changed repository source (boostorg.jfrog.io) that returns updated package checksums, failing the verification process.

Best Solution

Update React Native to a patched version

This issue has been officially fixed in React Native releases:

  • 0.72.9 for React Native 0.72.x projects
  • 0.73.2+ for React Native 0.73.x projects

Update your project using:

bash
npm install react-native@0.73.2  # For 0.73.x projects
# OR
npm install react-native@0.72.9  # For 0.72.x projects

Then clean and reinstall dependencies:

bash
cd ios
rm -rf Pods Podfile.lock
pod repo update
pod install

Temporary Workaround: Patch boost.podspec

If you can't immediately update React Native, manually patch the boost.podspec file:

  1. Install patch management tools:
bash
npm install --save-dev patch-package postinstall-postinstall
  1. Modify node_modules/react-native/third-party-podspecs/boost.podspec:
diff
Pod::Spec.new do |spec|
  spec.name = 'boost'
  spec.version = '1.76.0' // Update to match your version
  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'
-  spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2',
+  spec.source = { :http => 'https://archives.boost.io/release/1.76.0/source/boost_1_76_0.tar.bz2',
                   :sha256 => 'f0397ba6e982c4450f27bf32a2a8b827c41' }

  # ... rest remains unchanged ...
end
  1. Save changes and create a patch file:
bash
npx patch-package react-native
  1. Automate patch application in package.json:
json
{
  "scripts": {
    "start": "react-native start",
    "postinstall": "patch-package"
  }
}

Alternative Source Change

For Boost 1.83.0, use the SourceForge mirror instead:

diff
- spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2',
+ spec.source = { :http => 'https://sourceforge.net/projects/boost/files/boost/1.83.0/boost_1_83_0.tar.bz2',
                  :sha256 => '6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e' }

Additional Fixes

Cache Clean Solution

If the issue stems from corrupted cached files:

bash
cd ios
pod cache clean --all
rm Podfile.lock
pod repo update
pod install

Minimum iOS Platform Requirement

When using Boost 1.76.0+, ensure your Podfile specifies at least iOS 13.0:

ruby
platform :ios, '13.0'  // Update from older versions (e.g., 11.0/12.0)

Explanation of the Issue

The checksum error occurs because:

  1. React Native's iOS dependencies include the Boost C++ libraries
  2. The default podspec configuration referenced JFrog artifact repositories (boostorg.jfrog.io)
  3. JFrog repository issues caused file checksums to change unexpectedly
  4. CocoaPods' integrity verification failed when checksums didn't match

Why Manual Modification Isn't Ideal

While patching the podspec works, it's temporary:

  • Manual changes are lost when reinstalling modules
  • Patch conflicts can occur during React Native upgrades
  • Future Boost versions may require different URLs

The sustainable solution is to update to a React Native version with the official fix.

Verifying the Fix

After applying any solution:

bash
cd ios
pod install  # Should complete without checksum errors

Then build your project:

bash
npx react-native run-ios

If issues persist, clean the project thoroughly:

bash
watchman watch-del-all
rm -rf node_modules
npm install
cd ios
rm -rf Pods Podfile.lock
pod install