Bright Lee
Bright Lee

Reputation: 2326

Xamain.iOS doesn't has CFUUIDRef class?

I'm making app with using Xamarin.forms.

I want to create UUID. But I can't find any c# version of 'CFUUIDXXXX'.

Anyone knows what the class name is?

If it doesn't exist, I have a question. Looking Xamarin's API document is fastest way to know whether it exist or not? If it doesn't exist, It seems like that Xamarin.iOS doesn't inject all the class from iOS native class? Is it correct?

I also know about Guid. But I was told that there is no guarantee it's unique.

And also there is "UIDevice.CurrentDevice.IdentifierForVendor". Is it good enough to use as UUID?

Thanks.

Upvotes: 0

Views: 107

Answers (1)

Sven-Michael Stübe
Sven-Michael Stübe

Reputation: 14760

You can use NSUUID(in Xamarin NSUuid) instead.

This is the new younger cousin to CFUUID. NSUUID just popped up in iOS 6. It is pretty much exactly the same as CFUUID except it has a nice, modern Objective-C interface.

Here is a good comparison of all Id-Types: https://possiblemobile.com/2013/04/unique-identifiers/

Upvotes: 1

Related Questions