-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
feat: remove CRSQLite and support MacOS in expo sqlite #32181
feat: remove CRSQLite and support MacOS in expo sqlite #32181
Conversation
Subscribed to pull request
Generated by CodeMention |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for having the great pr!
i was hoping to keep cr-sqlite until sdk 53. to support macos, you could just specify the xcframework as ios only. then we don't have to remove cr-sqlite.
also be good to update the expo-module.config.js for ios -> apple
e.g.
{
"name": "expo-sqlite",
"platforms": ["apple", "android"],
"apple": {
"modules": ["SQLiteModule", "SQLiteModuleNext"]
},
"android": {
"modules": ["expo.modules.sqlite.SQLiteModule", "expo.modules.sqlite.SQLiteModuleNext"]
}
}
Thank you, @Kudo! I am at a work event this week but if I get some time to make these changes, I will. If not, I can get to it early next week. Really appreciate everyone's time on this and I will keep an eye out for any additional change requests. |
Co-authored-by: Kudo Chien <[email protected]>
Co-authored-by: Kudo Chien <[email protected]>
Thanks for the review, @Kudo! I think I have implemented the requested changes (including to bring back the crsqlite framework, and updating the changelog). Happy to make additional changes. Have a great day. |
I think I forgot to restore one of the files. I'm able to reproduce the test failure locally for Error is:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my fault to paste outdated expo-module.config.json. will update your pr and see if the ci getting passed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fine tune changelog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here we go 🚀 thanks again for having the great contribution!
Thank you for all the help! Y'all have a great contribution process here. |
Why
I love using Expo wherever I can. I've recently been building with React Native for Windows and MacOS and wanted to use the Expo SQLite package.
I did some hacky patching a few weeks ago and wrote about it here. One of the big challenges I ran into was getting CRSQLite to play nice with everything once I updated the Podspec to work for MacOS.
With the upcoming CRSQLite deprecation and removal, I figured I'd bring it up to y'all. I put together a feature request with these details, and figured I'd at least put my patch findings into an actual PR that can be commented on, used, modified, or discarded if this isn't interesting.
How
This PR primarily does two things:
macos
in the platforms of the Podspec for Expo SQLite, which does just about everything a user would need to enable the library in a React Native MacOS project.Alternative to 2: I think to make it work without removing CRSQLite, we just need to add the Mac platform in the XCFramework bundle. I tried to build it from source and generate a new bundle but I couldn't get it to work, and with the upcoming deprecation/removal, I thought maybe a PR like this could just remove the library entirely, haha.
Test Plan
If you follow my blog post, you can step through the decisions I made for all these changes, along with a basic test that runs the basic CRUD operations code from a Mac app. I've seen this work myself, but if you folks want more thorough tests, I'd be happy to contribute with some guidance.
Checklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).