Installation

Add swiftui-react-native to an iOS app on the New Architecture.

Add the packages

The library depends on Nitro Modules for its native calls.

npm install swiftui-react-native react-native-nitro-modules

Build the iOS app

With Expo, regenerate the native project and run it:

npx expo prebuild -p ios
npx expo run:ios

Without Expo, install the pods and build as usual:

cd ios && pod install

Check it works

import { Text } from 'swiftui-react-native';

export default function App() {
  return <Text>Hello from SwiftUI</Text>;
}

Next, build a screen in the quick start.