As the error tells you, identifierForVendor
returns an object of class NSUUID
, not a NSString.
If you need a NSString use this:
NSUUID *identifierForVendor = [[UIDevice currentDevice] identifierForVendor];
NSString *deviceId = [identifierForVendor UUIDString];