Skip to content

Commit 984ea64

Browse files
authored
Add instructions for EAS builds (#445)
1 parent efff686 commit 984ea64

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

packages/react-native/README.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# PowerSync SDK for React Native
66

7-
*[PowerSync](https://www.powersync.com) is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres, MongoDB or MySQL on the server-side.*
7+
_[PowerSync](https://www.powersync.com) is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres, MongoDB or MySQL on the server-side._
88

99
This package (`packages/react-native`) is the PowerSync SDK for React Native clients. It is an extension of `packages/common`.
1010

@@ -71,13 +71,24 @@ module.exports = function (api) {
7171
};
7272
```
7373

74-
## Metro config (optional)
74+
### Expo EAS config (optional)
75+
76+
If you are using this library in an Expo project and encounter issues with multiple versions of SQLite3, the conflict might be due to `expo-updates` also depending on SQLite. To resolve this, you can configure Expo to use the third-party SQLite pod.
77+
78+
Update your `ios/Podfile.properties.json` to include the following configuration:
79+
80+
```json
81+
{
82+
"expo.updates.useThirdPartySQLitePod": "true"
83+
}
84+
```
85+
86+
### Metro config (optional)
7587

7688
When using a bare React Native app without a framework like Expo, the `@powersync/react-native` package does not work well with inline requires.
7789

7890
If you see the following error message
7991

80-
8192
```bash
8293
Super expression must either be null or a function
8394
```
@@ -86,17 +97,17 @@ then you will need to add this to your `metro.config.js`:
8697

8798
```js
8899
const config = {
89-
transformer: {
90-
getTransformOptions: async () => ({
91-
transform: {
92-
inlineRequires: {
93-
blockList: {
94-
[require.resolve("@powersync/react-native")]: true,
95-
},
96-
},
97-
},
98-
})
99-
}
100+
transformer: {
101+
getTransformOptions: async () => ({
102+
transform: {
103+
inlineRequires: {
104+
blockList: {
105+
[require.resolve('@powersync/react-native')]: true
106+
}
107+
}
108+
}
109+
})
110+
}
100111
};
101112
```
102113

0 commit comments

Comments
 (0)