How To Fix “React Native / iOS SDK. No matching function for call to ‘RCTBridgeModuleNameForClass’ after update iOS SDK to 14.5”?
Are you having problems with the issue “React Native / iOS SDK. No matching function for call to ‘RCTBridgeModuleNameForClass’ after update iOS SDK to 14.5“? How to fix it? In today’s article, I will provide solutions for you to solve the issues. Please follow the below steps to get the problem resolved now
How did “React Native / iOS SDK. No matching function for call to ‘RCTBridgeModuleNameForClass’ after update iOS SDK to 14.5” occur?
React Native / iOS SDK. No matching function for call to ‘RCTBridgeModuleNameForClass’ after update iOS SDK to 14.5
When you work with Error Solution, you may get the issue React Native / iOS SDK. No matching function for call to ‘RCTBridgeModuleNameForClass’ after update iOS SDK to 14.5. Don’t worry, we are here to provide you solutions in order to resolve your problem.
How to fix “React Native / iOS SDK. No matching function for call to ‘RCTBridgeModuleNameForClass’ after update iOS SDK to 14.5”?
Question: How To Solve No matching function for call to ‘RCTBridgeModuleNameForClass’ after update iOS SDK to 14.5 Error in React navtive ?
Answer : First, open your Podfile within your React Native project. This code should be added to the bottom of your podfile/ios. Save Podfile. After that, run pod install
strongTag2$nbsp;on terminal. Next, run/build your project!
Solution 1
Step 1: Open your React Native Podfile first.
Step 2: This code should be added at the bottom of your podfile/ios.
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
Step 3: Get Podfile.
After that, Step 4: on terminal
You can then run/build again your project at $strongTag8
Solution 2
This can be added to your Podfile.
Podfile
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)))")
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
You will then find errors related to Flipper.
Flipper-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: 'atomic_notify_one<unsigned long>' is unavailable
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# use_flipper!()
Commented out # flipper_post_install(installer)
within post_install do |installer|
Finally, reinstall your pods and rebuil your project.
Final words
The above are useful solutions that can help you fix “React Native / iOS SDK. No matching function for call to ‘RCTBridgeModuleNameForClass’ after update iOS SDK to 14.5” problem, if you can’t solve it well. Please leave a message.