This is a plugin for Nativescript that allows you to get a UUID (Universal Unique Identifier) for a device.
Inspired from StackOverflow: How to preserve identifierForVendor in ios after uninstalling ios app on device?.
Uses SAMKeychain Cocoa Pod.
Run the following command from the root of your project:
tns plugin add nativescript-uuid
const nsUuid = require("nativescript-uuid");
const uuid = nsUuid.getUUID();
console.log(`The device UUID is ${uuid}`); import {getUUID} from 'nativescript-uuid';
const uuid = getUUID();
console.log(`The device UUID is ${uuid}`);