Skip to content

Replace Realm with CoreData #9046

@i2h3

Description

@i2h3

Our file provider extension uses Realm as its persistence technology. Realm is deprecated as of September 2024. Further, MongoDB has defined the end-of-life for associated Atlas Device SDKs in September 2025. It is not maintained actively any longer.

For the rather simple use case and support it probably is the best choice to migrate the persistence layer of our file provider extension to use SwiftData (available only with macOS 14 and newer and we want to maintain support for back to macOS 12) CoreData. There barely is a reason to deviate from the first-party offering which likely will not be dropped so soon. Further, it is very common in the Apple developer community and potential contributors may consider it more accessible. Also, this will reduce build time and app size by removing a third-party dependency.

Personally, I have experience with exactly this technology in this use case with the given requirements. Putting the whole CoreData into an actor which strictly isolates it and only hands out Sendable value types avoids most of the concurrency issues one usually encounters with CoreData and is very efficient.

Migration

Due to the already integrated #9023 which will make a migration impossible due to lack of access outside the sandboxed. This is maybe a one time opportunity to have a clean cut in regard to the internal data management of the file provider extension without dragging on migration code.

References

Metadata

Metadata

Assignees

Projects

Status

📄 To do

Relationships

None yet

Development

No branches or pull requests

Issue actions