Skip to content

Deprecate PowerSync.Maui, expand PowerSync.Common's supported runtimes - #94

Open
LucDeCaf wants to merge 4 commits into
dotnet-10from
remove-maui
Open

Deprecate PowerSync.Maui, expand PowerSync.Common's supported runtimes#94
LucDeCaf wants to merge 4 commits into
dotnet-10from
remove-maui

Conversation

@LucDeCaf

@LucDeCaf LucDeCaf commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

This PR folds PowerSync.Maui's functionality into PowerSync.Common, making PSMaui obsolete.

PSMaui bundles mobile builds of the PS SQLite Core extension with its nupkg. It also overrides LoadPowerSyncExtension to include logic for loading the extension on mobile platforms.

This PR moves that logic to be in PSCommon by default.

Migration

  1. Replace any instances of PowerSync.Maui.SQLite.MAUISQLiteDBOpenFactory with PowerSync.Common.MDSQLite.MDSQLiteDBOpenFactory.

  2. Replace any instances of PowerSync.Maui.SQLite.MAUISQLiteAdapter with PowerSync.Common.MDSQLite.MDSQLiteAdapter.

  3. Remove any references to PowerSync.Maui and remove from your .csproj file.

Considerations

  • For purely desktop targeting apps (net8.0;net9.0;net10.0), this PR technically just adds package bloat, however the extra runtimes are not included in the final app bundle.
  • I'm not sure how adding more native libraries will impact future attempts to target more esoteric platforms like Unity or Blazor; I plan to make a small Unity POC to check for potential concerns.

Other Changes

  • The ios and maccatalyst .xcframeworks are unzipped, stripped of unneeded platforms, and rezipped before bundling. The bundle size savings from this are alone enough to offset the size costs of including all platforms in PSCommon for mobile targeting apps.
  • .xcframework files are now shipped as .xcframework.zip, since Apple is still able to work with them in that format.

AI Usage

I had a long conversation with Claude which ultimately led to me brute forcing my way into the current approach of unconditional runtimes/* downloading with conditional per-target runtimes/<rid> inclusion. I also asked it to handle stripping the additional platforms from the .xcframework files. I reviewed everything myself and tested using the MAUITodo demo on iOS and Android and the CommandLine demo on macOS. I will test on a physical iOS and Android device before publishing.

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.

1 participant