You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. No matching function for call to 'RCTBridgeModuleNameForClass'
# 在 ios/Podfile 中加入一下代码
def find_and_replace(dir, findstr, replacestr)
Dir[dir].each do |name|
text = File.read(name)
replace = text.gsub(findstr,replacestr)
if text != replace
puts "Fix: " + name
File.open(name, "w") { |file| file.puts replace }
STDOUT.flush
end
end
Dir[dir + '*/'].each(&method(:find_and_replace))
end
post_install do |installer|
## 以下 Fix for XCode 12.5
find_and_replace(
"../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm",
"_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules",
"_initializeModules:(NSArray<Class> *)modules")
find_and_replace(
"../node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm",
"RCTBridgeModuleNameForClass(strongModule))",
"RCTBridgeModuleNameForClass(Class(strongModule)))"
)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
最近为了将app项目发布到ios15版本,升级了xcode到13,遇到几个bug,这里记录解决方案。
1. No matching function for call to 'RCTBridgeModuleNameForClass'
2. undefined symbol: _swift_force_load$_swiftfileprovider
rn官方最新解决方案
3. 删除flipper相关代码
相关链接
The text was updated successfully, but these errors were encountered: