A Todo List app demonstrating the use of the PowerSync Swift SDK together with Supabase.
To run this demo, you need Supabase and PowerSync projects. Detailed instructions for integrating PowerSync with Supabase can be found in the integration guide.
Follow this guide to:
- Create and configure a Supabase project.
- Create a new PowerSync instance, connecting to the database of the Supabase project. See instructions here.
- Deploy Sync Streams.
-
Open
PowerSyncExample.xcodeprojin XCode. -
Copy the
Secrets.template.swiftfile to a newSecrets.swiftfile and insert the credentials of your Supabase and PowerSync projects (more info can be found here).
From this directory
cp PowerSyncExample/Secrets.template.swift PowerSyncExample/Secrets.swift- You will need to enable
CasePathMacrosfor SwiftUI Navigation. You can do this in settings, or just build the app and a dialog will be shown to enableCasePathMacros.
If you run into build issues, try:
- Clear Swift caches
rm -rf ~/Library/Caches/org.swift.swiftpm
rm -rf ~/Library/org.swift.swiftpm- In Xcode:
- Reset Packages: File -> Packages -> Reset Package Caches
- Clean Build: Product -> Clean Build Folder.
Build the project, launch the app and sign in or register a new user.