Utilizing iCloud to store game data

I have a question about utilizing iCloud to store data such as level locking data, and high scores.

Currently what I am doing is saving things that I need to as a .txt file in system.DocumentsDirectory. Looking at the Documentation of native.setSync

local value, err = native.setSync( "datafile3.txt", { iCloudBackup=true } )

I assume the “value” is used to store what you’re saving (which is already a saved file from elsewhere on the system.DocumentsDirectory) and the “err” is telling it to backup to iCloud? Correct me if I am wrong.

So if this is what is needed to make this work, then functioning properly it should save all of the data from my app when the user backs up to iCloud, and if the app is removed and reinstalled all of the data is recovered?

How would I go about testing this? It should conventionally work with developer/distribution profiles, correct?

Thank you.