From 724af318074853a2d78adcf371c70400da56b9fc Mon Sep 17 00:00:00 2001 From: Rupesh Chaudhari <30570616+hrupesh@users.noreply.github.com> Date: Tue, 5 Jul 2022 14:21:24 +0530 Subject: [PATCH] fix: Use `facebook::jsi` instead of `jsi` (#1109) This PR fixes the Build error in React Native 0.69 for iOS --- ios/React Utils/JSConsoleHelper.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/React Utils/JSConsoleHelper.mm b/ios/React Utils/JSConsoleHelper.mm index b09a960..b167104 100644 --- a/ios/React Utils/JSConsoleHelper.mm +++ b/ios/React Utils/JSConsoleHelper.mm @@ -37,18 +37,18 @@ return nil; } - jsi::Runtime* jsiRuntime = (jsi::Runtime*)cxxBridge.runtime; + facebook::jsi::Runtime* jsiRuntime = (facebook::jsi::Runtime*)cxxBridge.runtime; return ^(RCTLogLevel level, NSString* message) { [bridge runOnJS:^{ if (jsiRuntime != nullptr) { - jsi::Runtime& runtime = *jsiRuntime; + facebook::jsi::Runtime& runtime = *jsiRuntime; auto logFunctionName = [JSConsoleHelper getLogFunctionNameForLogLevel:level]; try { auto console = runtime.global().getPropertyAsObject(runtime, "console"); auto log = console.getPropertyAsFunction(runtime, logFunctionName); - log.call(runtime, jsi::String::createFromAscii(runtime, [message UTF8String])); - } catch (jsi::JSError& jsError) { + log.call(runtime, facebook::jsi::String::createFromAscii(runtime, [message UTF8String])); + } catch (facebook::jsi::JSError& jsError) { NSLog(@"%@", message); NSLog(@"Failed to call `console.%s`: %s", logFunctionName, jsError.getMessage().c_str()); }