Skip to content

Conversation

simolus3
Copy link
Contributor

@simolus3 simolus3 commented Sep 16, 2025

In Swift 6.2, released with XCode 26, the Swift implementation of the backend connector fails to compile. The reason is that it receives a database instance through the callback, which we can't properly mark as Sendable.
This PR adds a Kotlin workaround for that by exposing a connector interface that doesn't need that parameter.

Additionally, this fixes getCrudTransactions() to not be suspend (it returns a Flow so it doesn't have to be) and adds a helper exposing that flow as a sequence of results (because flows can't throw with SKIE). This will allow us to add getCrudTransactions() to the Swift SDK.

This will be adopted in Swift with powersync-ja/powersync-swift#79

Copy link
Contributor

@stevensJourney stevensJourney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with these changes

@simolus3 simolus3 merged commit 22acdd7 into main Sep 16, 2025
18 of 29 checks passed
@simolus3 simolus3 deleted the swift-improvements branch September 16, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants