Question

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.

Was it helpful?

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.

OTHER TIPS

Not an anser to the original question I know, but just to point out that there'a NSUUID now so you can avoid all that CF boilerplate.

NSString *uuidString = [[NSUUID UUID] UUIDString];

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top