ios - Xcode 中大约 100 个错误,架构 x86_64 的未定义符号:将 react-native 从 0.59.1 升级到 0.60.5
问题描述
我一直在尝试升级我的项目并将 cocoapods 用于 ios,每当我从 xcode 构建时,它都会给我 100 与 swift 相关的错误,-我的项目不依赖于 swift-升级了所有包
请找到错误的屏幕截图
我已经按照以下链接进行软件包升级 react-native-community 链接!
发现同样的错误颤动!- 没试过这个
# platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'test' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for test
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-print', :path => '../node_modules/react-native-print'
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
pod 'RNImageCropPicker', :path => '../node_modules/react-native-image-crop-picker'
pod 'react-native-sqlite-storage', :path => '../node_modules/react-native-sqlite-storage'
pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'
pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo'
pod 'react-native-contacts', :path => '../node_modules/react-native-contacts'
pod 'RNFS', :path => '../node_modules/react-native-fs'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
pod 'react-native-html-to-pdf', :path => '../node_modules/react-native-html-to-pdf'
pod 'react-native-image-resizer', :path => '../node_modules/react-native-image-resizer'
pod 'RNShare', :path => '../node_modules/react-native-share'
pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
pod 'RNSVG', :path => '../node_modules/react-native-svg'
pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions'
pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'
pod 'lottie-ios', :path => '../node_modules/lottie-ios'
pod 'Firebase/Core', '~> 6.3.0'
#pod 'OneSignal', '>= 2.9.3', '< 3.0'
# Required by RNFirebase
pod 'Firebase/Core', '~> 6.3.0'
#target 'OneSignalNotificationServiceExtension' do
# pod 'OneSignal', '>= 2.6.2', '< 3.0'
#end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'
end
end
end
use_native_modules!
end
target 'test-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'testTests' do
inherit! :search_paths
# Pods for testing
end
target 'test-tvOS' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
end```
Expecting it should have been worked easily
解决方案
尝试这个:
- 在 Xcode 中打开 ios/YourAppName.xcodeproj
- 在左侧的 Project Navigator 中右键单击 Your App Name,然后单击 New File…</li>
- 为项目创建一个空的 Swift 文件(确保在添加时选择了 Your App Name 目标)
- 当 Xcode 询问时,按 Create Bridging Header 然后不要删除 Swift 文件。重新运行您的构建。
这应该可以解决问题
在 github 上找到:https ://github.com/mxcl/PromiseKit/issues/1059#issuecomment-493925940
推荐阅读
- java - 无法找到或加载主类 - 在 Intellij 中构建工件后出错
- api - Google Drive API:强制共享文件夹的文件所有权
- python-3.x - AttributeError:“numpy.ndarray”对象没有属性“sqrt”
- scala - 如何调试 spark dropduplicate 和 join 函数调用?
- flutter - 将 shared_preferences 添加到颤振应用程序时出错
- react-native - 带有标签和抽屉导航的堆栈导航
- javascript - 文件输入在 Instagram 应用内浏览器中停止工作(仅限 Android)
- php - 当 websocket 客户端太慢时 websocket 将如何工作?
- android - 我可以在另一个类/活动中使用 ItemCount() 方法值吗?
- solr - 如何按solr中最低价格的子文档对父文档进行排序