Skip to content

Conversation

DominicGBauer
Copy link
Contributor

@DominicGBauer DominicGBauer commented Oct 16, 2024

Description

iOS application was failing on app launch with powersync-sqlite-core 0.3.0+. This was due to internalDb.get("SELECT powersync_init()") running and resulting in this error being thrown Sqlite operation failure powersync_init | error code SQLITE_READONLY. It is still unclear exactly why the get would result in an error given it is a SELECT statement with the error only appearing on iOS and not Android and will require further investigation. However, using sqldelight generated queries has resolved the issue.

Work Done

  • Replace get query with sqldelight generated query
  • Change hasSynced to true when lastSynced is changed as it currently stays false after a disconnectAndClear
  • Updated dependencies

Testing

Verified this fixes ios app launch failure and that hasSynced changes correctly after a disconnectAndClear

image

@DominicGBauer DominicGBauer merged commit 002c8e2 into main Oct 16, 2024
3 checks passed
@DominicGBauer DominicGBauer deleted the fix/ios-app-launch-fail branch October 16, 2024 15:15
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.

3 participants