Deprecate PowerSync.Maui, expand PowerSync.Common's supported runtimes - #94
Open
LucDeCaf wants to merge 4 commits into
Open
Deprecate PowerSync.Maui, expand PowerSync.Common's supported runtimes#94LucDeCaf wants to merge 4 commits into
PowerSync.Maui, expand PowerSync.Common's supported runtimes#94LucDeCaf wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
LoadPowerSyncExtensionto include logic for loading the extension on mobile platforms.This PR moves that logic to be in PSCommon by default.
Migration
Replace any instances of
PowerSync.Maui.SQLite.MAUISQLiteDBOpenFactorywithPowerSync.Common.MDSQLite.MDSQLiteDBOpenFactory.Replace any instances of
PowerSync.Maui.SQLite.MAUISQLiteAdapterwithPowerSync.Common.MDSQLite.MDSQLiteAdapter.Remove any references to
PowerSync.Mauiand remove from your.csprojfile.Considerations
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.Other Changes
iosandmaccatalyst.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..xcframeworkfiles 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-targetruntimes/<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.