From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

The joys of UUID

The joys of UUID

- [Instructor] One very useful and simple, basic value in Swift is the UUID, or universal unique identifiers. These are random, very large numbers, which are so large, they'll be unique in any app you use. They are especially useful when you need to internally identify a struct, or dictionaries, or identify a user in server settings. Now, in the exercise files, I open up a playground so we can try a few things. You'll see there's an error right here, which we're going to ignore for the moment. So I'm just going to close that up and get back to it a little later, but let's just see how easy it is to make a UUID. It's really this simple. Let a equal UUID. It's so simple, I'm going to make another one. And I'm going to go ahead and run that, and you can see over here, I get two numbers. I'm going to pop those open by clickin' the squares here, and we can stretch this out a bit. Let me see the whole thing. You can see we've…

Contents