I don't know if this is what you meant but this is how I see it:
Restaurant<<-->Address (city,street,needPhoneResolutoin[BOOL],phoneNumber[default value: nil])
Create a class that will handle resolution (PhoneResolver).
The resolver will have a FRC with entity: Address
, predicate: needPhoneResolution == YES AND phoneNumber == nil
.
implement the delegate methods, but handle only inserted objects (and all objects that exist after the first perform fetch call) and deleted objects (cleanup).
batch them up (at -controllerDidChangeContent:
)
perform the REST fetch
update the DB.
report failure to resolver (another fetch will be needed, or mark the address as unresolvable).
This way, you don't need to implement yourself the queue or the KVO (provided by CoreData), and by principle of locality, if a user requested the phone once (and the fetch failed), you would still keep the user request for that phone and try to fetch it every time the resolver is started.