Replies: 2 comments 5 replies
|
I am going to move this issue to a discussion and post my response there so it can get better visibility. |
|
Thanks for raising this. SwiftData, which is an evolution of the legacy Core Data framework, is closed-source and constrained to Apple platforms, so as you've likely noticed, you cannot use it directly with Skip. You may also have noticed that we do have our own SkipSQL framework, which is much simpler than SwiftData/Core Data but does include a minimal ORM layer to map your Swift types to a SQLite schema. It doesn't have many of the nice affordances of SwiftData (like CloudKit integration), nor can it import Core Data models, but it should be sufficient for many local persistence needs, and it does work with both transpiled Skip Lite and compiled Skip Fuse projects. Numerous production Skip apps are currently using it. One ongoing project of interest is the pointfreeco sqlite-data project, which is much closer in breadth and functionality to SwiftData. We would like to get this working at some point (which would only work for Skip Fuse projects), but it is blocked on the underlying GRDB package's inability to support Android due to that platform's lack of a built-in SQLite module (which necessitates using a source build of sqlite, as we do in SkipSQL). We still hold out hope for this, but it might require forking sqlite-data to use a custom source build of SQLite. Another option is the swift-sqlcipher project (which we maintain). This is a combination source build of SQLite+SQLCipher along with a fork of the venerable SQLite.swift that uses it. It will only work in Skip Fuse mode, but is a bit more flexible and capable that SkipSQL. Finally, I should mention that if your real goal is to provide cloud synchronization of persistent data and don't care much about sqlite compatibility, we do support Firebase's FireStore through the SkipFirebase framework and Supabase through the SkipSupabase framework. So that's the landscape of database persistence at this point. There are likely other options (such as building something yourself atop swift-sqlcipher), and we would love to hear more from the community about what persistence needs they have and how we can help achieve them! |
Uh oh!
There was an error while loading. Please reload this page.
Hello there,
Firstly, thanks for your awesome project!
I've a question though, is there any chance that Skip can have a framework for translating SwiftData models into similarly local database for the Android side (like SQLite?)?
It would be a key factor for people like me that targeted iOS17+ just because of SwiftData, such framework doesn't need to make replica of SwiftData in Android for sure, just to translate how SwiftData codes works for the counterpart framework in Android.
There are macros that you know for sure that really make the work easy to use SwiftData and to make same data available in the Android with same code would be an awesome and epic work.
I know it's not a small request, but I would be truly happy to finally be able to use Skip to bring my apps into Android.
Thanks.
All reactions