Or, perhaps more accurately, the saved scanned data is being overwritten because the list/pantry view controllers are not loading it properly. My guess is that persistence is enabled and the list/pantry view controllers are getting cached, old data somehow instead of the saved, new data. Not sure how to resolve other than a bandaid fix of not using runTransactionBlock() or overhauling our integration of Firebase to use observe() instead of observeSingleEvent(of:).
Or, perhaps more accurately, the saved scanned data is being overwritten because the list/pantry view controllers are not loading it properly. My guess is that persistence is enabled and the list/pantry view controllers are getting cached, old data somehow instead of the saved, new data. Not sure how to resolve other than a bandaid fix of not using
runTransactionBlock()
or overhauling our integration of Firebase to useobserve()
instead ofobserveSingleEvent(of:)
.