草庐IT

exisiting

全部标签

ios - swift 3 : Realm creates additional object instead of updating the exisiting one

在我的AppDelegate中letrealm=try!Realm()print("numberofusers")print(realm.objects(User.self).count)if!realm.objects(User.self).isEmpty{ifrealm.objects(User.self).first!.isLogged{User.current.setFromRealm(user:realm.objects(User.self).first!)letstoryboard=UIStoryboard(name:"Main",bundle:nil)letviewCon