Device ID in Messaging Service?

In messaging service, when we see the Messages table then there is a column name ‘Device ID’. Are you using this code to get the device id ‘[[[UIDevice currentDevice] identifierForVendor] UUIDString]’?

Yes:

#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR

    UIDevice *device = [UIDevice currentDevice];

    NSString *deviceId = [device.identifierForVendor UUIDString];

    deviceRegistration.deviceToken = device.name;

    deviceRegistration.deviceId = deviceId;

    deviceRegistration.os = @"IOS";

    deviceRegistration.osVersion = device.systemVersion;

#else

    deviceRegistration.os = @"OSX";

    NSString *deviceId = [self serialNumber];

    deviceRegistration.deviceId = deviceId;

#endif

Thanks this is helpful!