Why do you think Apple will reject this?
Apple is just not allowing you to identify device any more, by using the UDID
or the MAC address of the device.
If you generate a unique number, which you do, then there should be no problem. Just be aware that the UUID
you create with the code you posted will be different every time you call the code.
Thus if you use it to track a user then you should generate it once and save the generated UUID
somewhere.