-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
How frequently does the bug occur?
Always
Description
I am using Realm 20.0.3 (latest) and had worked without any issues in Xcode 26 Beta 1. Now we're getting closer to iOS 26 release and Beta 6 does not compile our project anymore, the problem being conformance to Sendable:
Conformance of 'RLMObjectBase' to 'Sendable' is unavailable
Previously we used @unchecked Sendable
on our subclasses of Realm objects, because we handled threading issues ourselves by using frozen()
or similar approaches. Now Realm objects are forced to be non-Sendable and conformance cannot be added anymore - even with @unchecked
. So, we need to refactor half our data layer, create adapters with same fields, which does create a lot of boilerplate. :(
So the question is, is Realm planning to implement Sendable conformance (such as: __attribute__((swift_attr("@unchecked Sendable")))
, or we should start treating Realm objects differently, since they are going to create many Sendable related issues.
Stacktrace & log output
None.
Can you reproduce the bug?
Yes, every time.
Reproduction Steps
- Create a new Project and import RealmSwift.
- Create a Realm Model subclass:
class Model : Object { }
. - Use
Model
in an API that requiresSendable
conformance. - Add
@unchecked Sendable
toModel
:
class Model : Object, @unchecked Sendable { ... }
- See the error.
Version
20.0.3
What Atlas Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
iOS 26 Beta 8
Build environment
Xcode version: Xcode 26 Beta 6
Dependency manager and version: SPM