Ranking list friends with CloudKit?

Can I make a ranking list of some type with friends using CloudKit?

I invite friend A and B. I can see the rankings of friend A and friend B. Friend A can see my ranking. Friend B can see my ranking. Friend B cannot see ranking of Friend A (and vice versa) unless it has shares its ranking with the other.

Ranking list friends with CloudKit?
 
 
Q