UUID always returns a value.
If you want to use only one time for your application, you need to save it to iPhone Keychain. Check out the Keychain tutorial.
Follow the instructions to save to Keychain: 1) Get data from the keychain.
2) If you do not receive the data, generate a new UUID and save it in Keychain and use it.
3) If you get a UUID, then use it right away.
You can kaychain demo and demo
source share