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
Table of contents Written in front 1. Ngixn image...
When implementing this function, the method I bor...
The server reports an error 502 when synchronizin...
Look at the code: Copy code The code is as follows...
This article example shares the specific code of ...
Every time I design a web page or a form, I am tr...
undefined In JavaScript, if we want to determine ...
After the user logs out, if the back button on the...
1. Form 1. The role of the form HTML forms are us...
1. Introduction Docker has an orchestration tool ...
Table of contents 1. Vue installation Method 1: C...
1. To prohibit all IP addresses from accessing th...
Table of contents 1. Falling into the pit 2. Stru...
Table of contents origin Virtual Memory Paging an...
First run the docker container Run the command as...