react-native: Archive fails on XCode 13.1 with React Native 0.66.1 and use_frameworks!
Description
Archive of the app fails with an error:
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing Recent Messages
Dylib (/Users/vytautas/Library/Developer/Xcode/DerivedData/TestApp-ferjgbytfspgkvgspawguupwmviq/Build/Intermediates.noindex/ArchiveIntermediates/TestApp/BuildProductsPath/Release-iphoneos/fmt/fmt.framework/fmt) was built for newer iOS version (10.0) than being linked (9.0)
Ignoring file /Users/vytautas/Library/Developer/Xcode/DerivedData/TestApp-ferjgbytfspgkvgspawguupwmviq/Build/Intermediates.noindex/ArchiveIntermediates/TestApp/BuildProductsPath/Release-iphoneos/DoubleConversion/DoubleConversion.framework/DoubleConversion, building for iOS-armv7 but attempting to link with file built for iOS-arm64
Ignoring file /Users/vytautas/Library/Developer/Xcode/DerivedData/TestApp-ferjgbytfspgkvgspawguupwmviq/Build/Intermediates.noindex/ArchiveIntermediates/TestApp/BuildProductsPath/Release-iphoneos/glog/glog.framework/glog, building for iOS-armv7 but attempting to link with file built for iOS-arm64
Undefined symbol: double_conversion::DoubleToStringConverter::ToPrecision(double, int, double_conversion::StringBuilder*) const
Undefined symbol: double_conversion::DoubleToStringConverter::ToShortestIeeeNumber(double, double_conversion::StringBuilder*, double_conversion::DoubleToStringConverter::DtoaMode) const
Undefined symbol: double_conversion::DoubleToStringConverter::ToExponential(double, int, double_conversion::StringBuilder*) const
Undefined symbol: double_conversion::DoubleToStringConverter::ToFixed(double, int, double_conversion::StringBuilder*) const
Undefined symbol: google::base::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)
Undefined symbol: double_conversion::StringToDoubleConverter::StringToIeee(char const*, int, int*, bool) const
Undefined symbol: google::base::CheckOpMessageBuilder::ForVar2()
Undefined symbol: google::LogMessageFatal::LogMessageFatal(char const*, int)
Undefined symbol: google::base::CheckOpMessageBuilder::~CheckOpMessageBuilder()
Undefined symbol: google::LogMessageFatal::LogMessageFatal(char const*, int, google::CheckOpString const&)
Undefined symbol: google::base::CheckOpMessageBuilder::NewString()
Undefined symbol: google::LogMessage::stream()
Undefined symbol: void google::MakeCheckOpValueString<char>(std::__1::basic_ostream<char, std::__1::char_traits<char> >*, char const&)
Undefined symbol: google::LogMessageFatal::~LogMessageFatal()
Version
0.66.1
Output of react-native info
System:
OS: macOS 11.6.1
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 656.85 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.4 - ~/.nvm/versions/node/v14.17.4/bin/node
Yarn: 1.22.11 - ~/.nvm/versions/node/v14.17.4/bin/yarn
npm: 6.14.14 - ~/.nvm/versions/node/v14.17.4/bin/npm
Watchman: 2021.09.06.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /Users/vytautas/.rvm/gems/ruby-2.7.2/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
Android SDK: Not Found
IDEs:
Android Studio: Arctic Fox 2020.3.1 Patch 3 Arctic Fox 2020.3.1 Patch 3
Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
Languages:
Java: 14.0.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps to reproduce
- Create new app with
react-native init
; - Update Podfile:
- Add
use_frameworks!
; - Remove
use_flipper!()
;
- Add
- Reinstall pods with
pod install
; - Archive the app.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17
I’ve resolved the issue by dropping the
armv7
support.Added this to my Podfile:
And set
ARCHS = "${ARCHS_STANDARD_64_BIT}";
in the target’s build settings.I have managed to fix this issue by replacing ‘
Folly
’ to ‘RCT-Folly
’ at Podfile static_framework row, and setONLY_ACTIVE_ARCH
to YES at post_install