That was 12 years ago! But you're spot on, because they barely changed anything in those 12 years and everyone rolled their own solutions.
This year, they've _finally_ introduced a higher-level API that does what you're describing, but it's still in beta: https://developer.apple.com/documentation/cloudkit/cksynceng...