From 5f9d777fdcb6407bba77e4bf19dcdb95cae32d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?= Date: Tue, 9 Jan 2024 15:56:28 +0100 Subject: [PATCH] feat: implement RCTReactController and RCTSwiftUIAppDelegate --- .../Libraries/AppDelegate/RCTAppSetupUtils.h | 2 + .../AppDelegate/RCTReactController.h | 12 + .../AppDelegate/RCTReactController.mm | 120 +++++++++ .../AppDelegate/RCTSwiftUIAppDelegate.h | 48 ++++ .../AppDelegate/RCTSwiftUIAppDelegate.mm | 230 ++++++++++++++++++ .../React/Base/RCTBridgeDelegate.h | 4 + .../React/CoreModules/RCTAlertController.mm | 5 +- .../React/CoreModules/RCTAppearance.mm | 2 +- .../rn-tester/RNTester-visionOS/App.swift | 20 +- .../RNTester-visionOS/AppDelegate.swift | 28 +-- .../ReactRootViewRepresentable.swift | 35 +-- .../RNTesterPods.xcodeproj/project.pbxproj | 4 - 12 files changed, 457 insertions(+), 53 deletions(-) create mode 100644 packages/react-native/Libraries/AppDelegate/RCTReactController.h create mode 100644 packages/react-native/Libraries/AppDelegate/RCTReactController.mm create mode 100644 packages/react-native/Libraries/AppDelegate/RCTSwiftUIAppDelegate.h create mode 100644 packages/react-native/Libraries/AppDelegate/RCTSwiftUIAppDelegate.mm diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h index 0351d65ed502ed..f908e5e2f735d3 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h +++ b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h @@ -55,6 +55,8 @@ void RCTAppSetupPrepareApp( RCT_EXTERN_C_BEGIN + +// TODO: Rebase with this PR: https://github.com/facebook/react-native/pull/42172/files //[[deprecated("Use the 3-argument overload of RCTAppSetupPrepareApp instead")]] void RCTAppSetupPrepareApp( // UIApplication *application, // BOOL turboModuleEnabled); diff --git a/packages/react-native/Libraries/AppDelegate/RCTReactController.h b/packages/react-native/Libraries/AppDelegate/RCTReactController.h new file mode 100644 index 00000000000000..daa32da29f6d58 --- /dev/null +++ b/packages/react-native/Libraries/AppDelegate/RCTReactController.h @@ -0,0 +1,12 @@ +#import +#import + +@interface RCTReactController : UIViewController + +@property (nonatomic, strong) NSString * _Nonnull moduleName; +@property (nonatomic, strong) NSDictionary * _Nullable initialProps; + +- (instancetype _Nonnull)initWithModuleName:(NSString * _Nonnull)moduleName + initProps:(NSDictionary * _Nullable)initProps; + +@end diff --git a/packages/react-native/Libraries/AppDelegate/RCTReactController.mm b/packages/react-native/Libraries/AppDelegate/RCTReactController.mm new file mode 100644 index 00000000000000..4e63a9f09806e1 --- /dev/null +++ b/packages/react-native/Libraries/AppDelegate/RCTReactController.mm @@ -0,0 +1,120 @@ +#import "RCTReactController.h" +#import +#import +#import +#import +#import +#import +#import "RCTAppSetupUtils.h" +#import + +#if RN_DISABLE_OSS_PLUGIN_HEADER +#import +#else +#import +#endif +#import +#import +#import +#import +#import +#import +#import +#if USE_HERMES +#import +#else +#import +#endif +#import +#import +#import +#import +#import +#import +#import + +static NSString *const kRNConcurrentRoot = @"concurrentRoot"; + +static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabricEnabled) +{ + NSMutableDictionary *mutableProps = [initialProps mutableCopy] ?: [NSMutableDictionary new]; + // Hardcoding the Concurrent Root as it it not recommended to + // have the concurrentRoot turned off when Fabric is enabled. + mutableProps[kRNConcurrentRoot] = @(isFabricEnabled); + return mutableProps; +} + + +@implementation RCTReactController + +- (instancetype)initWithModuleName:(NSString *)moduleName initProps:(NSDictionary *)initProps { + if (self = [super init]) { + _moduleName = moduleName; + _initialProps = initProps; + } + return self; +} + +- (void)loadView { + BOOL fabricEnabled = self.fabricEnabled; + BOOL enableBridgeless = self.bridgelessEnabled; + + NSDictionary *initProps = updateInitialProps([self prepareInitialProps], fabricEnabled); + + UIView *rootView; + if (enableBridgeless) { + // TODO: Fix Bridgeless mode +// RCTFabricSurface *surface = [_reactHost createSurfaceWithModuleName:self.moduleName initialProperties:initProps]; + +// RCTSurfaceHostingProxyRootView *surfaceHostingProxyRootView = [[RCTSurfaceHostingProxyRootView alloc] +// initWithSurface:surface +// sizeMeasureMode:RCTSurfaceSizeMeasureModeWidthExact | RCTSurfaceSizeMeasureModeHeightExact]; + +// rootView = (RCTRootView *)surfaceHostingProxyRootView; + } else { + RCTBridge* bridge = [RCTSharedApplication().delegate performSelector:@selector(bridge)]; + rootView = [self createRootViewWithBridge:bridge moduleName:self.moduleName initProps:initProps]; + } + + // Set rootView to the main of this view controller. + self.view = rootView; +} + +- (UIView *)createRootViewWithBridge:(RCTBridge *)bridge + moduleName:(NSString *)moduleName + initProps:(NSDictionary *)initProps +{ + BOOL enableFabric = self.fabricEnabled; + UIView *rootView = RCTAppSetupDefaultRootView(bridge, moduleName, initProps, enableFabric); + + rootView.backgroundColor = [UIColor systemBackgroundColor]; + + return rootView; +} + +- (NSDictionary *)prepareInitialProps +{ + return self.initialProps; +} + +- (BOOL)newArchEnabled +{ + return [RCTSharedApplication().delegate performSelector:@selector(newArchEnabled)]; +} + +- (BOOL)turboModuleEnabled +{ + return [self newArchEnabled]; +} + +- (BOOL)fabricEnabled +{ + return [self newArchEnabled]; +} + +- (BOOL)bridgelessEnabled +{ + return [RCTSharedApplication().delegate performSelector:@selector(bridgelessEnabled)]; +} + +@end diff --git a/packages/react-native/Libraries/AppDelegate/RCTSwiftUIAppDelegate.h b/packages/react-native/Libraries/AppDelegate/RCTSwiftUIAppDelegate.h new file mode 100644 index 00000000000000..bde00ea5ee9cd7 --- /dev/null +++ b/packages/react-native/Libraries/AppDelegate/RCTSwiftUIAppDelegate.h @@ -0,0 +1,48 @@ +#import +#import + +@class RCTBridge; +@protocol RCTBridgeDelegate; +@protocol RCTComponentViewProtocol; +@class RCTRootView; +@class RCTSurfacePresenterBridgeAdapter; + +NS_ASSUME_NONNULL_BEGIN + +@interface RCTSwiftUIAppDelegate : UIResponder + +@property (nonatomic, strong, nonnull) UIWindow *window; +@property (nonatomic, strong, nullable) RCTBridge *bridge; +@property (nonatomic, strong, nullable) NSDictionary *initialProps; + +@property (nonatomic, strong, nullable) RCTSurfacePresenterBridgeAdapter *bridgeAdapter; + +/// This method returns a map of Component Descriptors and Components classes that needs to be registered in the +/// new renderer. The Component Descriptor is a string which represent the name used in JS to refer to the native +/// component. The default implementation returns an empty dictionary. Subclasses can override this method to register +/// the required components. +/// +/// @return a dictionary that associate a component for the new renderer with his descriptor. +- (NSDictionary> *_Nullable)thirdPartyFabricComponents; + +/// This method controls whether the `turboModules` feature of the New Architecture is turned on or off. +/// +/// @note: This is required to be rendering on Fabric (i.e. on the New Architecture). +/// @return: `true` if the Turbo Native Module are enabled. Otherwise, it returns `false`. +- (BOOL)turboModuleEnabled; + +/// This method controls whether the App will use the Fabric renderer of the New Architecture or not. +/// +/// @return: `true` if the Fabric Renderer is enabled. Otherwise, it returns `false`. +- (BOOL)fabricEnabled; + +/// This method controls whether React Native's new initialization layer is enabled. +/// +/// @return: `true` if the new initialization layer is enabled. Otherwise returns `false`. +- (BOOL)bridgelessEnabled; + +- (NSURL *)bundleURL; + +@end + +NS_ASSUME_NONNULL_END diff --git a/packages/react-native/Libraries/AppDelegate/RCTSwiftUIAppDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTSwiftUIAppDelegate.mm new file mode 100644 index 00000000000000..a225b71e15fbb5 --- /dev/null +++ b/packages/react-native/Libraries/AppDelegate/RCTSwiftUIAppDelegate.mm @@ -0,0 +1,230 @@ +#import "RCTSwiftUIAppDelegate.h" +#import +#import +#import +#import +#import +#import +#import "RCTAppSetupUtils.h" +#import + +#if RN_DISABLE_OSS_PLUGIN_HEADER +#import +#else +#import +#endif +#import +#import +#import +#import +#import +#import +#import +#if USE_HERMES +#import +#else +#import +#endif +#import +#import +#import +#import +#import +#import +#import + +@interface RCTSwiftUIAppDelegate () < + RCTTurboModuleManagerDelegate, + RCTComponentViewFactoryComponentProvider, + RCTContextContainerHandling> { + std::shared_ptr _reactNativeConfig; + facebook::react::ContextContainer::Shared _contextContainer; +} +@end + +@interface RCTSwiftUIAppDelegate () { + std::shared_ptr _runtimeScheduler; +} +@end + +@implementation RCTSwiftUIAppDelegate { + RCTHost *_reactHost; +} + +- (instancetype)init +{ + if (self = [super init]) { + _contextContainer = std::make_shared(); + _reactNativeConfig = std::make_shared(); + _contextContainer->insert("ReactNativeConfig", _reactNativeConfig); + } + return self; +} + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + RCTSetNewArchEnabled([self newArchEnabled]); + BOOL enableTM = self.turboModuleEnabled; + BOOL fabricEnabled = self.fabricEnabled; + BOOL enableBridgeless = self.bridgelessEnabled; + + RCTAppSetupPrepareApp(application, enableTM, *_reactNativeConfig); + + if (enableBridgeless) { + // Enable native view config interop only if both bridgeless mode and Fabric is enabled. + RCTSetUseNativeViewConfigsInBridgelessMode(fabricEnabled); + + // Enable TurboModule interop by default in Bridgeless mode + RCTEnableTurboModuleInterop(YES); + RCTEnableTurboModuleInteropBridgeProxy(YES); + + [self createReactHost]; + [RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self; + + // Continue creating RCTFabricSurface in RCTReactController + } else { + if (!self.bridge) { + self.bridge = [self createBridgeWithDelegate:self launchOptions:launchOptions]; + } + + if ([self newArchEnabled]) { + self.bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:self.bridge + contextContainer:_contextContainer]; + self.bridge.surfacePresenter = self.bridgeAdapter.surfacePresenter; + + [RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self; + } + } + + return true; +} + +- (RCTBridge *)createBridgeWithDelegate:(id)delegate launchOptions:(NSDictionary *)launchOptions +{ + return [[RCTBridge alloc] initWithDelegate:delegate launchOptions:launchOptions]; +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge { + [NSException raise:@"RCTBridgeDelegate::sourceURLForBridge not implemented" + format:@"Subclasses must implement a valid sourceURLForBridge method"]; + return nil; +} + +- (NSURL *)bundleURL { + [NSException raise:@"RCTAppDelegate::bundleURL not implemented" + format:@"Subclasses must implement a valid getBundleURL method"]; + return nullptr; +} + +#pragma mark - RCTCxxBridgeDelegate +- (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge +{ + _runtimeScheduler = std::make_shared(RCTRuntimeExecutorFromBridge(bridge)); + if ([self newArchEnabled]) { + std::shared_ptr callInvoker = + std::make_shared(_runtimeScheduler); + RCTTurboModuleManager *turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge + delegate:self + jsInvoker:callInvoker]; + _contextContainer->erase("RuntimeScheduler"); + _contextContainer->insert("RuntimeScheduler", _runtimeScheduler); + return RCTAppSetupDefaultJsExecutorFactory(bridge, turboModuleManager, _runtimeScheduler); + } else { + return RCTAppSetupJsExecutorFactoryForOldArch(bridge, _runtimeScheduler); + } +} + +#pragma mark - RCTTurboModuleManagerDelegate + +- (Class)getModuleClassFromName:(const char *)name +{ +#if RN_DISABLE_OSS_PLUGIN_HEADER + return RCTTurboModulePluginClassProvider(name); +#else + return RCTCoreModulesClassProvider(name); +#endif +} + +- (std::shared_ptr)getTurboModule:(const std::string &)name + jsInvoker:(std::shared_ptr)jsInvoker +{ + return nullptr; +} + +- (std::shared_ptr)getTurboModule:(const std::string &)name + initParams: + (const facebook::react::ObjCTurboModule::InitParams &)params +{ + return nullptr; +} + +- (id)getModuleInstanceFromClass:(Class)moduleClass +{ + return RCTAppSetupDefaultModuleFromClass(moduleClass); +} + +#pragma mark - RCTComponentViewFactoryComponentProvider + +- (NSDictionary> *)thirdPartyFabricComponents +{ + return @{}; +} + +#pragma mark - New Arch Utilities + +- (void)createReactHost +{ + __weak __typeof(self) weakSelf = self; + _reactHost = [[RCTHost alloc] initWithBundleURL:[self bundleURL] + hostDelegate:nil + turboModuleManagerDelegate:self + jsEngineProvider:^std::shared_ptr() { + return [weakSelf createJSRuntimeFactory]; + }]; + [_reactHost setBundleURLProvider:^NSURL *() { + return [weakSelf bundleURL]; + }]; + [_reactHost setContextContainerHandler:self]; + [_reactHost start]; +} + +#pragma mark - New Arch Enabled settings + +- (BOOL)newArchEnabled +{ +#if USE_NEW_ARCH + return YES; +#else + return NO; +#endif +} + +- (BOOL)turboModuleEnabled +{ + return [self newArchEnabled]; +} + +- (BOOL)fabricEnabled +{ + return [self newArchEnabled]; +} + +- (BOOL)bridgelessEnabled +{ + return NO; +} + +- (std::shared_ptr)createJSRuntimeFactory +{ +#if USE_HERMES + return std::make_shared(_reactNativeConfig, nullptr); +#else + return std::make_shared(); +#endif +} + +- (void)didCreateContextContainer:(std::shared_ptr)contextContainer +{ + contextContainer->insert("ReactNativeConfig", _reactNativeConfig); +} + +@end diff --git a/packages/react-native/React/Base/RCTBridgeDelegate.h b/packages/react-native/React/Base/RCTBridgeDelegate.h index 0e081964bc2ec2..0d9ec0a2b137bc 100644 --- a/packages/react-native/React/Base/RCTBridgeDelegate.h +++ b/packages/react-native/React/Base/RCTBridgeDelegate.h @@ -10,6 +10,8 @@ @class RCTBridge; @protocol RCTBridgeModule; +NS_ASSUME_NONNULL_BEGIN + @protocol RCTBridgeDelegate /** @@ -77,3 +79,5 @@ - (NSDictionary *)extraLazyModuleClassesForBridge:(RCTBridge *)bridge; @end + +NS_ASSUME_NONNULL_END diff --git a/packages/react-native/React/CoreModules/RCTAlertController.mm b/packages/react-native/React/CoreModules/RCTAlertController.mm index 1e7c3c680d9e57..4beec85bdb7763 100644 --- a/packages/react-native/React/CoreModules/RCTAlertController.mm +++ b/packages/react-native/React/CoreModules/RCTAlertController.mm @@ -53,9 +53,8 @@ - (void)show:(BOOL)animated completion:(void (^)(void))completion { UIUserInterfaceStyle style = self.overrideUserInterfaceStyle; if (style == UIUserInterfaceStyleUnspecified) { - style = RCTSharedApplication().delegate.window.overrideUserInterfaceStyle - ? RCTSharedApplication().delegate.window.overrideUserInterfaceStyle - : UIUserInterfaceStyleUnspecified; + UIUserInterfaceStyle overridenStyle = RCTSharedApplication().delegate.window.overrideUserInterfaceStyle; + style = overridenStyle ? overridenStyle : UIUserInterfaceStyleUnspecified; } self.overrideUserInterfaceStyle = style; diff --git a/packages/react-native/React/CoreModules/RCTAppearance.mm b/packages/react-native/React/CoreModules/RCTAppearance.mm index 543bc1b791bead..2ad68a589464e2 100644 --- a/packages/react-native/React/CoreModules/RCTAppearance.mm +++ b/packages/react-native/React/CoreModules/RCTAppearance.mm @@ -70,7 +70,7 @@ @implementation RCTAppearance { - (instancetype)init { if ((self = [super init])) { - UITraitCollection *traitCollection = RCTSharedApplication().delegate.window.traitCollection; + UITraitCollection *traitCollection = RCTKeyWindow().traitCollection; _currentColorScheme = RCTColorSchemePreference(traitCollection); [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appearanceChanged:) diff --git a/packages/rn-tester/RNTester-visionOS/App.swift b/packages/rn-tester/RNTester-visionOS/App.swift index a77459b078c50c..aeba6cb0f1f016 100644 --- a/packages/rn-tester/RNTester-visionOS/App.swift +++ b/packages/rn-tester/RNTester-visionOS/App.swift @@ -7,14 +7,32 @@ // import SwiftUI +import React @main struct NavTestApp: App { + @Environment(\.openWindow) private var openWindow @UIApplicationDelegateAdaptor var delegate: AppDelegate var body: some Scene { WindowGroup { - Text("Hey") + ReactRootViewRepresentable(moduleName: "RNTesterApp") + .ornament(attachmentAnchor: .scene(.bottom)) { + HStack { + Button("Button 1") { + openWindow(id: "SecondWindow") + } + Button("Button 2") {} + Button("Button 3") {} + Button("Button 4") {} + } + .padding() + .glassBackgroundEffect() + } } + + WindowGroup(id: "SecondWindow") { + ReactRootViewRepresentable(moduleName: "Test") + } } } diff --git a/packages/rn-tester/RNTester-visionOS/AppDelegate.swift b/packages/rn-tester/RNTester-visionOS/AppDelegate.swift index 5a189f419d42e6..856b02bcb3dcd7 100644 --- a/packages/rn-tester/RNTester-visionOS/AppDelegate.swift +++ b/packages/rn-tester/RNTester-visionOS/AppDelegate.swift @@ -1,29 +1,13 @@ -// -// AppDelegate.swift -// RNTester-visionOS -// -// Created by Oskar Kwaśniewski on 21/12/2023. -// Copyright © 2023 Facebook. All rights reserved. -// - -import Foundation import UIKit import React -import ReactCommon import React_RCTAppDelegate -import CxxStdlib - -class AppDelegate: NSObject, UIApplicationDelegate, ObservableObject { - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { - let cxxString = std.string("Swift with C++") - let reactNativeConfig = facebook.react.EmptyReactNativeConfig() - - return true +class AppDelegate: RCTSwiftUIAppDelegate { + override func sourceURL(for bridge: RCTBridge) -> URL { + self.bundleURL() } -// override func sourceURL(for bridge: RCTBridge!) -> URL! { -// RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "js/RNTesterApp.ios") -// } + override func bundleURL() -> URL { + RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "js/RNTesterApp.ios") + } } diff --git a/packages/rn-tester/RNTester-visionOS/ReactRootViewRepresentable.swift b/packages/rn-tester/RNTester-visionOS/ReactRootViewRepresentable.swift index 524ca7675761a3..5332343eed162e 100644 --- a/packages/rn-tester/RNTester-visionOS/ReactRootViewRepresentable.swift +++ b/packages/rn-tester/RNTester-visionOS/ReactRootViewRepresentable.swift @@ -1,25 +1,16 @@ -// -// ReactRootViewRepresentable.swift -// RNTester-visionOS -// -// Created by Oskar Kwaśniewski on 21/12/2023. -// Copyright © 2023 Facebook. All rights reserved. -// - import SwiftUI -//import React - -struct ReactRootViewRepresentable: UIViewRepresentable { -// var bridge: RCTBridge -// var moduleName: String -// - func updateUIView(_ uiView: UIViewType, context: Context) { - // Do nothing - } -// - func makeUIView(context: Context) -> some UIView { - let rootView = UIView() //RCTRootView(bridge: bridge, moduleName: moduleName, initialProperties: nil) +import React +import React_RCTAppDelegate - return rootView - } +struct ReactRootViewRepresentable: UIViewControllerRepresentable { + var moduleName: String + var initialProps: [AnyHashable: Any]? + + func makeUIViewController(context: Context) -> UIViewController { + RCTReactController(moduleName: moduleName, initProps: initialProps) + } + + func updateUIViewController(_ uiViewController: UIViewController, context: Context) { + // noop + } } diff --git a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj index 9c0ac9c23dd082..80eee7478fe64b 100644 --- a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj +++ b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj @@ -1125,7 +1125,6 @@ MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTDeprecation/RCTDeprecation-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTFabric/React-RCTFabric-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTTypeSafety/RCTTypeSafety-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React/React-Core-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/ReactCommon/ReactCommon-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_Codegen/React-Codegen-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_Fabric/React-Fabric-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_NativeModulesApple/React-NativeModulesApple-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_RCTAppDelegate/React-RCTAppDelegate-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/SocketRocket/SocketRocket-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/fmt/fmt-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/folly/RCT-Folly-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/glog/glog-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/jsi/React-jsi-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_debug/React-debug-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_debug/React-rendererdebug-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_graphics/React-graphics-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_imagemanager/React-ImageManager-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_utils/React-utils-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/yoga/Yoga-visionOS.modulemap\""; PRODUCT_BUNDLE_IDENTIFIER = "com.meta.RNTester.localDevelopment.RNTester-visionOS"; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "xros xrsimulator"; @@ -1133,7 +1132,6 @@ SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_INCLUDE_PATHS = "$(inherited) \"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit-visionOS\" \"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit-iOS\""; "SWIFT_INCLUDE_PATHS[arch=*]" = "$(inherited) \"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit-visionOS\" \"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit-iOS\""; - SWIFT_OBJC_INTEROP_MODE = objcxx; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,7"; @@ -1224,14 +1222,12 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTDeprecation/RCTDeprecation-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTFabric/React-RCTFabric-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTTypeSafety/RCTTypeSafety-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React/React-Core-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/ReactCommon/ReactCommon-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_Codegen/React-Codegen-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_Fabric/React-Fabric-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_NativeModulesApple/React-NativeModulesApple-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_RCTAppDelegate/React-RCTAppDelegate-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/SocketRocket/SocketRocket-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/fmt/fmt-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/folly/RCT-Folly-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/glog/glog-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/jsi/React-jsi-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_debug/React-debug-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_debug/React-rendererdebug-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_graphics/React-graphics-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_imagemanager/React-ImageManager-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_utils/React-utils-visionOS.modulemap\" -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/yoga/Yoga-visionOS.modulemap\""; PRODUCT_BUNDLE_IDENTIFIER = "com.meta.RNTester.localDevelopment.RNTester-visionOS"; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "xros xrsimulator"; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_INCLUDE_PATHS = "$(inherited) \"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit-visionOS\" \"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit-iOS\""; - SWIFT_OBJC_INTEROP_MODE = objcxx; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,7"; };