Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Demo/PowerSyncExample/_Secrets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ enum Secrets {
static let powerSyncEndpoint = "https://your-id.powersync.journeyapps.com"
static let supabaseURL = URL(string: "https://your-id.supabase.co")!
static let supabaseAnonKey = "anon-key"
}
}
11 changes: 7 additions & 4 deletions Demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ Follow this guide to:

## Configure The App

Open the project in XCode.
1. Open this directory in XCode.

Open the “_Secrets” file and insert the credentials of your Supabase and PowerSync projects (more info can be found [here](https://docs.powersync.com/integration-guides/supabase-+-powersync#test-everything-using-our-demo-app)).
2. Open the “_Secrets” file and insert the credentials of your Supabase and PowerSync projects (more info can be found [here](https://docs.powersync.com/integration-guides/supabase-+-powersync#test-everything-using-our-demo-app)).

### Finish XCode configuration
3. Enable CasePathMacros. We are using SwiftUI Navigation for the demo which requires this.

### Troubleshooting

If you run into build issues, try:

1. Clear Swift caches

Expand All @@ -32,7 +36,6 @@ rm -rf ~/Library/org.swift.swiftpm
- Reset Packages: File -> Packages -> Reset Package Caches
- Clean Build: Product -> Clean Build Folder.

3. Enable CasePathMacros. We are using SwiftUI Navigation for the demo which requires this.

## Run project

Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# PowerSync Swift

The SDK reference for the PowerSync Swift SDK is available [here](https://docs.powersync.com/client-sdk-references/swift).
This is the PowerSync SDK for Swift clients. The SDK reference is available [here](https://docs.powersync.com/client-sdk-references/swift).

## Beta Release

Expand Down Expand Up @@ -47,17 +47,16 @@ Add
]
```

to your `Package.swift` file and pin the dependency to a specific version. The version is required because the package is in beta.

to your `Package.swift` file and pin the dependency to a specific version. This is required because the package is in beta.

## Underlying Kotlin Dependency

The PowerSync Swift SDK currently makes use of the [PowerSync Kotlin Multiplatform SDK](https://github.com/powersync-ja/powersync-kotlin) with the API tool [SKIE](https://skie.touchlab.co/) and KMMBridge under the hood to help generate and publish the native Swift SDK. We will move to an entirely Swift native API in v1 and do not expect there to be any breaking changes.
The PowerSync Swift SDK currently makes use of the [PowerSync Kotlin Multiplatform SDK](https://github.com/powersync-ja/powersync-kotlin) with the API tool [SKIE](https://skie.touchlab.co/) and KMMBridge under the hood to help generate and publish a native Swift package. We will move to an entirely Swift native API in v1 and do not expect there to be any breaking changes. For more details, see the [Swift SDK reference](https://docs.powersync.com/client-sdk-references/swift).


## Migration from Alpha to Beta

* The `PowerSyncDatabase` no longer needs a driver argument and it must be removed.
* The interface for `PowerSyncDatabase` now uses `PowerSyncDatabaseProtocol` which may require some changes to databases uses.
* If you were using `__uploadData` and `__fetchCredentials` in your `PowerSyncBackendConnector` you must remove the `__` and update the methods to `uploadData` and `fetchCredentials`.
* `@MainThread` usage is no longer required and should be removed.
* Implementing `SuspendTaskWrapper` for database transactions is no longer required and should be removed.
See these [developer notes](https://docs.powersync.com/client-sdk-references/swift#migrating-from-the-alpha-to-the-beta-sdk) if you are migrating from the alpha to the beta version of the Swift SDK.