- Use realm to save data.
- Config the realm use defaultconfig.
- then , I addOrUpdate some
RLMModels - It's success.
I changed the config use
RLMRealmConfiguration *config = [RLMRealmConfiguration defaultConfiguration]; config.fileURL = [[[config.fileURL URLByDeletingLastPathComponent] URLByAppendingPathComponent:@"myname"] URLByAppendingPathExtension:@"realm"]; [RLMRealmConfiguration setDefaultConfiguration:config];I
addOrUpdatethe sameRLMModelsconsole print error:
2017-11-09 10:50:18.293801+0800 LNLibBase_Example[96588:8779968] *** Terminating app due to uncaught exception 'RLMException', reason: 'Object is already managed by another Realm. Use create instead to copy it into this Realm.'