From 0f534293afe9981e463dae97f7ccb4c7abf0589c Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Mon, 7 Apr 2025 11:23:11 -0700 Subject: [PATCH] Avoid build failure on Catalyst (x86_64) (#50514) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50514 When building React Native for mac catalyst on intel architecture, we are observing a build failure in RCTInstance. See issue: https://github.com/facebook/react-native/issues/50388 Apparently, the compiler don't understand that `errorData[@"isFatal"]` is a BOOL, so we are helping it by extracting the `boolValue`. ## Changelog: [iOS][Fixed] - Avoid build failure on Catalyst (x86_64) Reviewed By: cortinico Differential Revision: D72558024 fbshipit-source-id: 152d89b02ae250a8ae54fe2df658c018d5f63f45 --- .../react/runtime/platform/ios/ReactCommon/RCTInstance.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm index df8e878ae26..382a0ab5c2d 100644 --- a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +++ b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm @@ -609,7 +609,7 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags) name:errorData[@"name"] componentStack:errorData[@"componentStack"] exceptionId:error.id - isFatal:errorData[@"isFatal"] + isFatal:[errorData[@"isFatal"] boolValue] extraData:errorData[@"extraData"]]) { JS::NativeExceptionsManager::ExceptionData jsErrorData{errorData}; id exceptionsManager = [_turboModuleManager moduleForName:"ExceptionsManager"];