🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-native-device-uuid

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-device-uuid

Get the device UUID for iOS device

1.2.0
latest
Source
npm
Version published
Weekly downloads
184
-31.6%
Maintainers
1
Weekly downloads
 
Created
Source

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);
});

Troubleshooting

DeviceUUID just hangs and does not log the uuid to the console (#2), thanks to @irfaan

  • In XCode, in the project navigator, right click Libraries
  • Add Files to [your project's name]
  • Go to node_modules
  • react-native-device-uuid and add the .xcodeproj file
  • In XCode, in the project navigator, select your project
  • Add the lib*.a from the react-native-device-uuid project to your project's Build Phases - Link Binary With Libraries. Select the .a file.
  • Go to the Build Settings tab.
  • Make sure 'All' is toggled on (instead of 'Basic').
  • Look for Header Search Paths and make sure it contains both $(SRCROOT)/../react-native/React and $(SRCROOT)/../../React - mark both as recursive.

Keywords

javascript

FAQs

Package last updated on 20 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts