HomeiOS Developmentios - Error in Declaring Non-Elective Map Property in Realm Swift Object

ios – Error in Declaring Non-Elective Map Property in Realm Swift Object


I’ve this realm object with a map property:

class UserModel: Object {
       @Continued var uploadMap = Map<String, UploadingModel>()
}

the place UploadingModel is one other realm object.

as soon as I ran the app I obtained this error:

*** Terminating app as a consequence of uncaught exception 'RLMException',
purpose: 'Map<String, UploadingModel> property 
'uploadMap' have to be marked as non-obligatory.'

Within the official documentation: realm-swift there may be an instance that initialize the map just like the above with out marking it as non-obligatory.
Additionally, I exploit different realm sorts like Checklist<UploadingModel>() and no error is thrown.

How can I keep away from mark it as non-obligatory and why the error is thrown?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments