LoginSignup
7
5

More than 5 years have passed since last update.

NSUUIDからNSStringへの変換

Posted at

NSUUIDから文字列に変換する必要があったのでメモ。
E621E1F8-C36C-495A-93FC-0C247A3E6E5Fのような文字列が取得できる。

sample.m
// UUIDを取得
NSUUID *uuid = [NSUUID UUID]
// UUIDから文字列に変換
NSString *uuidString = [uuid UUIDString];
// UUIDから文字列に変換2
NSString *uuidString2 = uuid.UUIDString;
7
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
5