gage / react-native-device-uuid

Get iOS's UUID (identifierForVendor) for React Native Application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-device-uuid

What?

Allow developer to retrieve iOS's identifierForVendor as UUID for React Native Application.

Why?

Sometimes we need an unique identifier (e.g., when implementing special authentication flow) to identify an "user-device" pair. However, device token, which is mainly used for push notification, is not suitable in such use case. The reason is that device token can and will change. For details, please refers to Is the device token as unique as the device ID?.

How?

Install

npm install --save react-native-device-uuid

Usage

var DeviceUUID = require("react-native-device-uuid");
DeviceUUID.getUUID().then((uuid) => {
  console.log(uuid);
});

About

Get iOS's UUID (identifierForVendor) for React Native Application

License:MIT License


Languages

Language:Objective-C 63.2%Language:JavaScript 36.8%