【发布时间】:2018-10-23 14:24:13
【问题描述】:
有谁知道这个异常是什么意思以及如何解决它?
Exception - unrecognized selector sent to instance was thrown while invoking addNetworkingHandler on target BlobMdule with params ()
因为 react-native-firebase 的新版本,在我将 React 添加到 Podfile 后出现。我是否必须先从 XCode 项目中“取消链接”React,将 React 添加到 Podfile,然后运行 pod install?我在网上找不到任何教程或文档,可以提供有关如何解决问题的建议。
感谢您的帮助:D
我的播客文件:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'DasHGR' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for DasHGR
# 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', :subspecs => [
'Core',
'CxxBridge', # Include this for RN >= 0.47
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
# the following ones are the ones taken from "Libraries" in Xcode:
'RCTAnimation',
'RCTActionSheet',
'RCTBlob',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket'
]
# Explicitly include Yoga if you are using RN >= 0.42.0
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
# Third party deps podspec link
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 'RNFS', :path => '../node_modules/react-native-fs'
target 'DasHGRTests' do
inherit! :search_paths
# Pods for testing
end
# Required by RNFirebase
pod 'Firebase/Core', '~> 5.9.0'
pod 'Firebase/Messaging', '~> 5.9.0'
pod 'Fabric', '~> 1.7.11'
pod 'Crashlytics', '~> 3.10.7'
# pod 'Firebase/Performance', '~> 5.9.0'
# The following is needed to ensure the "archive" step works in XCode.
# It removes React from the Pods project, as it is already included in the main project.
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
end
target 'DasHGR-tvOS' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for DasHGR-tvOS
target 'DasHGR-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
【问题讨论】:
-
你是如何解决这个问题的?将 firebase 添加到 podfile 后,我遇到了同样的问题。
-
@KubwimanaAdrien 看看我的回复stackoverflow.com/a/54316600/6489268 是否有帮助...?!
标签: ios react-native cocoapods