Closed typester closed 9 years ago
Current version is not friendly for Swift.
Because NSClassFromString for pure swift class is not working correctly, so that JSONMapping functions in relation class is not work. (see also #28)
NSClassFromString
This patch brings:
+[RLMSchema classForString:]
Class modelClass = NSClassFromString([[self class] className]);
[self class]
Then we can use Realm+JSON perfectly as expected.
But it require Realm 0.80 or above.
Thanks
RLMObject+Copying needs fixing NSClassFromString too.
RLMObject+Copying
Current version is not friendly for Swift.
Because
NSClassFromString
for pure swift class is not working correctly, so that JSONMapping functions in relation class is not work. (see also #28)This patch brings:
+[RLMSchema classForString:]
instead ofNSClassFromString
Class modelClass = NSClassFromString([[self class] className]);
, instead, just use[self class]
Then we can use Realm+JSON perfectly as expected.
But it require Realm 0.80 or above.