This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct ReactNativeView: UIViewRepresentable { | |
| var moduleName: String | |
| var rootViewFactory: RCTRootViewFactory | |
| func makeUIView(context: Context) -> UIView { | |
| return rootViewFactory.view(withModuleName: moduleName) | |
| } | |
| func updateUIView(_ uiView: UIView, context: Context) { | |
| // noop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AppRegistry.registerComponent('ReactNativeScreen', () => App) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rootViewFactory.view(withModuleName: moduleName, initialProperties: ["prop1": "test"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const ReactNativeScreen = ({ prop1 }) => // ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @main | |
| struct BrownfieldSwiftUIApp: App { | |
| @UIApplicationDelegateAdaptor var delegate: AppDelegate | |
| var body: some Scene { | |
| WindowGroup { | |
| TabView { | |
| ContentView() | |
| .tabItem { | |
| Label("Home", systemImage: "house") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| target 'MyApp' do | |
| pod 'SomeLibrary' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| target 'MyApp' do | |
| pod 'SomeLibrary', :modular_headers => true | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| target 'MyApp' do | |
| config = use_native_modules! | |
| use_react_native!( | |
| :path => config[:reactNativePath], | |
| # An absolute path to your application root. | |
| :app_path => "#{Pod::Config.instance.installation_root}/.." | |
| ) | |
| # ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plugin 'cocoapods-swift-modular-headers' | |
| # Above target declarations | |
| apply_modular_headers_for_swift_dependencies() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plugin 'cocoapods-swift-modular-headers' | |
| pre_install do |installer| | |
| apply_modular_headers_for_swift_dependencies(installer) | |
| end |