Realm Objective C: No visible @interface for 'RLMObject' declares the selector 'createOrUpdateInRealm:withValue:' -


cannot figure out why error.

no visible @interface 'rlmobject' declares selector 'createorupdateinrealm:withvalue:'

i have included realm/realm.h header

define rlmobject in manner

class aclass = nsclassfromstring(modelname); rlmobject *m  = [[aclass alloc] init]; 

then create nsmutabledictionary contain values want partially update on rlmobject.

nsmutabledictionary *updatevalues = [[nsmutabledictionary alloc] init]; 

and call createorupdateinrealm:withvalue: on m

[m createorupdateinrealm:realm withvalue:updatevalues]; 

but error. have no idea why happens?

createorupdateinrealm:withvalue: should called on subclass, not on instance.

you should use this:

customobject *mycustomobject = [customobject createorupdateinrealm:realm withvalue:dictionary]; 

where customobject subclass of rlmobject.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -