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

Add more specific compiler warning for @ObservedRealmObject when bound object's type does not conform to ObjectKeyIdentifiable #8355

Open
cyrussinc opened this issue Sep 7, 2023 · 0 comments

Comments

@cyrussinc
Copy link

Problem

Faced an issue with being unable to wrap an EmbeddedObject instance with @ObservedRealmObject in View body, and compiler error only returns No exact matches in call to initializer.

Solution

Replace the No exact matches in call to initializer compiler error with a @ObservedRealmObject requires {Object/EmbeddedObject} must conform to ObjectKeyIdentifiable

Alternatives

Enhance documentation to reflect the required conformance of an @ObservedRealmObject to ObjectKeyIdentifiable in RealmSwift Documentation page

How important is this improvement for you?

Fairly niche but nice to have anyway

Feature would mainly be used with

Atlas Device Sync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant