标签:
每日更新关注:http://weibo.com/hanjunqiang
新浪微博!
一.错误信息:Attempting to modify object outside of a write transaction - call beginWriteTransaction on an RLMRealm instance first.企图在 写入事务 外修改对象 应该先在RLMRealm实例对象前 调用beginWriteTransaction
代码部分:
//ManagementCamViewController *manager = [[ManagementCamViewController alloc] init]; ?manager.ipcamModel = curNode.nodeData;? //curNode.nodeData; [curNode.nodeData copy];? [self.navigationController pushViewController:manager animated:YES];</span>
二.错误信息:Realm accessed from incorrect thread Realm从错误的线程存取
解决:
//[[RLMRealm defaultRealm] beginWriteTransaction]; ?_ipcamModel.cacheImgPath = spath; ?[[RLMRealm defaultRealm] commitWriteTransaction];</span>
//RLMRealm *realm = [RLMRealm defaultRealm];? [realm transactionWithBlock:^{ ?_ipcamModel.cacheImgPath = spath; ?}];</span>
//dispatch_barrier_async(_concurrentQueue, ^{});</span>
Realm数据库的时候是不能在模拟器运行的时候用RealmBrowser打开的,就像打开了就不能在运行模拟器中运行该程序?这个愚蠢的错误 不会只有我自己犯过吧
iOS开发者交流QQ群: 446310206
每日更新关注:http://weibo.com/hanjunqiang
新浪微博!
标签:
原文地址:http://blog.csdn.net/qq_31810357/article/details/52088268