How does iCloud work when logged in on someone else's device
Hi, can someone please help me understand how iCloud works? I'm specifically interested in understanding how iCloud works when logged in on someone else's device. For instance, let's say I have an app that lets you sync data between multiple devices, I know that if both devices are yours and you're logged under the same user, your data will sync between dose devices, but what if the second device is not yours but you want to share and collaborate data with relative.
Can I expect data to sync properly between devices if I download the same app on two devices using the same Apple account but the second device is not mine and may already be using the other's person's iCloud account? Will the app's data sync properly between devices if the app was downloaded with the same Apple account? If not, what would be the right way to have two devices sync data from a certain app if one device is someone else?
I hope it makes sense.
Thanks