Installation
1. Package installation
- expo cli
- npm
- yarn
npx expo install react-native-render-swift-ui
npx expo install expo-build-properties
npm install react-native-render-swift-ui
npm install expo-build-properties
yarn add react-native-render-swift-ui
yarn add expo-build-properties
Next, include the following JSON in the plugins array of your project’s app.json
file
["expo-build-properties",
{ "ios":
{
"deploymentTarget": "14.0" // must be higher than 14.0
}
}]
After installation you need to run npx expo prebuild
or pod install
because this package uses native code
This package does not work with in Expo go. You need to create a Dev-Client using expo eas or prebuild. Instructions Dev-Client
3. Config plugin
To create your own components it is necessary to set up the config plugin provided with this library.
To do this, add the following json to your project's App.json
file within the plugins array.
["react-native-render-swift-ui",
{
"noClean": false,
"srcDir": "./swiftui/"
}]
The options noClean and srcDir are optional. If you dont set them, the default options will be used