Skip to content
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

fix: ios app failing on launch #71

Merged
merged 1 commit into from
Oct 16, 2024
Merged

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