Save the created UUID in the user settings for the application that should be copied - if they restore the application from the backup, you will return the UUID.
If you want to be more confident, you can return the same UUID, save the generated UUID in the key chain - the keychain will remain untouched even after the application is uninstalled (not sure if this is guaranteed forever, but this is an effect).
source share