Client-Side Setup
Include the PowerSync SDK in your project
The next step after configuring your database and connecting it to PowerSync is to include the appropriate PowerSync client SDK package in your app project. On a high level, this involves the following steps:
Install the SDK (see below).
Integrate with your Backend [Optional]
Download data from your database
Write mutations to your backend
PowerSync currently supports apps built in Flutter, React Native & Expo, JS Web, Kotlin (public alpha), and Swift (private alpha). Please see the steps based on your type of app:
Add the PowerSync pub.dev package to your project:
See the full SDK reference for further details and getting started instructions:
FlutterPowerSync is not compatible with Expo Go. PowerSync uses a native plugin and is therefore only compatible with Expo Dev Builds.
Add the PowerSync React Native NPM package to your project:
Run the below command in your project folder:
Some peer dependencies and polyfills are required
This SDK connects to a PowerSync instance via HTTP streams (default) or WebSockets. Different polyfill configurations are required for each method.
See the Readme for the necessary peer dependencies and polyfills.
Also see this section for additional development requirements on Android and iOS.
See the full SDK reference for further details and getting started instructions:
React Native & ExpoAdd the PowerSync JS Web NPM package to your project:
See the full SDK reference for further details and getting started instructions:
JavaScript WebAdd the PowerSync SDK to your project by adding the following to your build.gradle.kts
file:
Cocoapods
We recommend using Cocoapods (as opposed to SMP) for iOS targets. Add the following to the cocoapods
config in your build.gradle.kts
Note: The linkOnly
attribute is set to true
and framework is set to isStatic = true
to ensure that the powersync-sqlite-core
binaries are only statically linked.
See the full SDK reference for further details and getting started instructions:
Kotlin Multiplatform (Alpha)Next Steps
For an overview of the client-side steps required to set up PowerSync in your app, continue reading the next sections.
For a walkthrough with example implementations for your platform, see the Getting Started section of the corresponding SDK reference linked above.
Last updated