How to update an object in Realm Swift
Updating objects is just assign a value to a property within a write transaction. See our documentation. https://realm.io/docs/swift/latest/#updating-objects So you don’t need to delete and then add an object. Just assign new value to the property in write transaction like the following. let workouts = realm.objects(WorkoutsCount.self).filter(“date = %@”, removeTodaysItem) let realm = try! Realm() if … Read more