Why is Realm using RealmOptional <Int> and not Int? for additional properties?

Realm documentation on optional properties :

String, NSDateand NSDataproperties can be declared optional or optional using the standard Swift syntax. Additional numeric types are declared using RealmOptional.

Why do numeric types use non-standard RealmOptionaland not built-in optional Swift syntax?

+4
source share
1 answer

Realm , . , dynamic. Swift getters seters, . dynamic : , Objective-C. , Swift Objective-C . Int? Realm.

, String?, NSData? NSDate? . , Objective-C, nullable NSString *, nullable NSData * nullable NSDate *. Swift.

+11

Source: https://habr.com/ru/post/1613275/


All Articles