How to update locally persisted data with a data from cloud

I'm new in app designing so it might be a stupud question. I'm building an iOS app with MapKit and I want to display some annotations. I would like to store info abut them locally on device (e.g. using Realm) but I also want to update this data from cloud (e.g. from Firebase) and I don't know how to combine this two functions. I don't want to download this data from cloud every time I load the map, but I want to be able to update data from time to time (for example add a new point or change details about existing annotations). What's the best way to do that?
How to update locally persisted data with a data from cloud
 
 
Q