I have just started using Realm.io on iOS and am attempting to populate objects but am getting the following:
Invalid value nil for property
How can I make a property optional?
Realm objects are regular Swift or Objective-C classes, but they also bring a few additional features like live queries. The Swift SDK memory maps Realm objects directly to native Swift or Objective-C objects, which means there's no need to use a special data access library, such as an ORM .
@Persisted is used to declare properties on Object subclasses which should be managed by Realm. Int, Bool, String, ObjectId and Date properties can be indexed by passing indexed: true to the initializer.
You can’t at the moment. Only relationships can be nil at this point. We’re working on adding this soon though!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With