Recently, when running an old RN project, the following code error was reported when running it with Xcode:
This is a problem after upgrading to XCode 12.5. Just add the following script to the ios/Podfile file. 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(module))", "RCTBridgeModuleNameForClass(Class(module)))" ) end 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 Then, re-execute the This is the end of this article about React Native reporting Cannot initialize a parameter of type'NSArray<id<RCTBridgeModule>> error (solution). For more relevant React Native error content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Detailed explanation of top command output in Linux
>>: Tips for data statistics in MySQL
This article describes the definition and usage o...
Preface Regarding the use of MySQL indexes, we ha...
1. The role of index Generally speaking, an index...
1. Common MySQL configuration All the following c...
Table of contents Create a table View the databas...
Is it the effect below? If so, please continue re...
Hello everyone, I am Tony, a teacher who only tal...
The role of virtual DOM First of all, we need to ...
The SQL query statement execution order is as fol...
1. Implementation ideas The purpose of interface ...
Table of contents docker system df docker system ...
What is DNS The full name of DNS is Domain Name S...
Table of contents Preface $attrs example: $listen...
Problem description: The following error message ...
PCIE has four different specifications. Let’s tak...