Skip to content

watchOS support #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 30, 2025
Merged

watchOS support #201

merged 4 commits into from
Jun 30, 2025

Conversation

simolus3
Copy link
Contributor

@simolus3 simolus3 commented Jun 13, 2025

For all packages except for the Supabase connector (since the supabase KMP library doesn't support watchOS) and the compose integration (also no watchOS support), this adds watchOS support!

The main challenge is that watchOS doesn't seem to allow dynamic libraries, so we have to link the PowerSync core extension statically. We do this for tests in :core, but otherwise downstream users (i.e. the Swift SDK) are responsible for doing that. So, this splits the apple target into the individual platforms (iosMain, macosMain and watchosMain). iosMain and watchosMain continue to load the exension dynamically by looking up its path from the NSBundle. watchosMain instead uses cinterop to call powersync_init_static()

@simolus3 simolus3 marked this pull request as ready for review June 25, 2025 18:31
@simolus3 simolus3 requested a review from stevensJourney June 29, 2025 02:11
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.

Looks good to me :)

@simolus3 simolus3 merged commit 9c664a6 into main Jun 30, 2025
3 checks passed
@simolus3 simolus3 deleted the watchOS branch June 30, 2025 14:26
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