Before selling my iPhone, I erased my iPhone with all of its content and settings, but my problem is that I forgot to sign out of iCloud first. I somewhat remember being asked to provide my Apple ID in order to turn off Find My iPhone, but I am not fully sure. After erasing the device, I also removed it from my iCloud's devices lists as well. My question is, will my iCloud's data still be synced on that iPhone and accessible to the new owner? As I did not sign out of iCloud before. I know that the data will still be on the iCloud's server, but will it be synced with that iPhone after resetting it as well? I just want to make sure my personal data is fully wiped out on that device from everywhere.
To expound on some of the answers - there's two different things at play here
- Signing out of your Apple ID
- Turning off "Find my iPhone"
Although it sounds innocuous, turning off "Find my iPhone" is the important part because it turns off Activation Lock, which if not turned off prevents the phone from being able to be reused.
With Activation Lock turned on (so, with Find my iPhone turned on) if someone were to steal your iPhone and then try to nuke it to factory settings, during the setup process it would say it can't do anything until the Apple ID associated with the Activation Lock enters their password. The thief isn't going to know this so the phone is useless to them or anyone else now. When word of this got around the criminal community thefts of iPhones dropped dramatically.
But signing out of your Apple ID itself isn't necessary. Once Activation Lock is turned off, resetting your iPhone is like reformatting your hard drive.
Also I think iOS warns you if you try and reset the device before signing out of Find my iPhone.
If you didn't sign out of Find my iPhone, whoever you sold it to may be contacting you soon because they can't use the phone without it signed out, but if you vaguely remember turning it off and no one has contacted you, you're probably good to go.
When dealing with Apple products, it is best you sign out your icloud account before selling. Now to your question, "will my iCloud's data still be synced on that iPhone and accessible to the new owner?" The answer is yes, your icloud account is still linked to the device, although the new user cannot access your data without authenticating with your password, but some of his new data will be synced automatically with your icloud. Signing out your icloud means you have unbinded your data with the connect device.
This article should help you resolve it https://support.apple.com/en-au/HT205064
I hope this answers your question. Thanks