4

I am developing iOS Swift.

I have convert the NSUUID to String like the following:

var bdAddr: NSUUID?
var text: String = bdAddr!.UUIDString

But how to convert String to NSUUID in Swift?

Paulo Mattos
  • 18,845
  • 10
  • 77
  • 85
Wun
  • 6,211
  • 11
  • 56
  • 101

1 Answers1

9

If you look at Apple's NSUUID documentation You'll see a method -initWithUUIDString: that initializes the NSUUID object with the string representation of a UUID.

Paul
  • 2,698
  • 22
  • 27