Search code examples
iosuidevice

Will Apple reject my app if I use the UUID of device?


I am using UUID of current device. I have to send that ID to a server for registering my device.

So I used a bit of code like:

NSString *uuidString = nil;

CFUUIDRef uuid = CFUUIDCreate(NULL);

if (uuid) {
    uuidString = (NSString *)CFBridgingRelease(CFUUIDCreateString(NULL, uuid));
    CFRelease(uuid);
}

And I am sending that uuidString to the server.

My concern is that Apple will reject my app for using this UUID and sending to a server?

Please give me idea about this, it's Very important for me now.


Solution

  • 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.