该构建在 Android 和 IOS 的调试中都运行良好。 Android 版本也能正常工作。但是通过 XCode 运行 IOS 版本会导致错误,您可以在日志中看到以下错误。
按照这些步骤构建失败
在新克隆的应用程序上
npm install // No errors
cd ios/pod update/install // No errors
cd ../react-native run-ios // No errors runs in simulator without any problems
Bundle upp app
react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios
Run vihor.xworkspace - open XCode
In AppDelegate.m Replace line
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
with
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
Navigate to product/scheme/edit scheme
set Build Configuration to Release
Run Product/Clean = Success
Run Product/Build (selected device Generic iOS Device) = Fail
(see image below)
Generic iOS Device = Symbol(s) not found for architecture amv7
Error Linker command failed with exit code 1
环境 Xcode 版本 9.2 (9C40b) react native -cli 2.0.1 react native 0.57.1
最佳答案
问题是使用了包,react-native-ffmpeg,我使用了 full-gpl 版本。但这个版本不支持32位设备。简单更新 full-gpl-lts 就可以了
关于ios - 未找到架构 armv7 的 React Native 符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56110978/