All Projects → Traviskn → react-native-uuid-generator

Traviskn / react-native-uuid-generator

Licence: MIT license
UUID generator for React Native utilizing native iOS and Android UUID classes

Programming Languages

objective c
16641 projects - #2 most used programming language
java
68154 projects - #9 most used programming language
javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to react-native-uuid-generator

php-uuid
RFC 4122 compliant UUID generator and parser for PHP.
Stars: ✭ 13 (-85.23%)
Mutual labels:  uuid, uuid-generator
Butterfly
分布式ID生成器框架:超高性能的发号器框架。通过引入多种新的方案,彻底解决雪花算法的时间回拨等问题,并将雪花算法原生QPS提高最少十几~二十倍
Stars: ✭ 111 (+26.14%)
Mutual labels:  uuid, uuid-generator
uuid-generator-plugin
An IntelliJ Idea plugin to generate UUID (Universally Unique Identifier), ULID (Universally Unique Lexicographically Sortable Identifier) and CUID (Collision Resistant Unique Identifier)
Stars: ✭ 30 (-65.91%)
Mutual labels:  uuid, uuid-generator
ulid-creator
A Java library for generating Universally Unique Lexicographically Sortable Identifiers (ULID)
Stars: ✭ 38 (-56.82%)
Mutual labels:  uuid, uuid-generator
fastuuid
FastUUID is a library which provides CPython bindings to Rust's UUID library
Stars: ✭ 83 (-5.68%)
Mutual labels:  uuid, uuid-generator
uuidgen-el
UUID generation implemented in elisp.
Stars: ✭ 44 (-50%)
Mutual labels:  uuid, uuid-generator
ti.admob
Use the Google AdMob SDK on iOS and Android with Titanium
Stars: ✭ 51 (-42.05%)
Mutual labels:  native
game sdk
Unity游戏接入外部sdk框架
Stars: ✭ 22 (-75%)
Mutual labels:  native
android touch
Low latency high speed android multitouch event server
Stars: ✭ 73 (-17.05%)
Mutual labels:  native
ionic3-whatsappclone
This is a template for WhatsApp for user with ionic framework. It's just a template with no backend for now. See Roadmap in Readme below
Stars: ✭ 24 (-72.73%)
Mutual labels:  native
sqlite3
The fastest and correct module for SQLite3 in Deno.
Stars: ✭ 143 (+62.5%)
Mutual labels:  native
UnityNativeTool
Allows to unload native plugins in Unity3d editor
Stars: ✭ 147 (+67.05%)
Mutual labels:  native
react-native-config-reader
🛠 Easily access any of the build configs defined in build.gradle or info.plist from your JS code.
Stars: ✭ 44 (-50%)
Mutual labels:  native
ulid
Universally Unique Lexicographically Sortable Identifier (ULID) in Crystal
Stars: ✭ 28 (-68.18%)
Mutual labels:  uuid
fuse-device
Use the basic Device functions such as UUID and current localization from Fuse
Stars: ✭ 13 (-85.23%)
Mutual labels:  uuid
hearthstone-linux
Craft your own linux native Hearthstone client
Stars: ✭ 41 (-53.41%)
Mutual labels:  native
production-ready-react-native
React Native Currency Converter App built for Production Ready React Native
Stars: ✭ 44 (-50%)
Mutual labels:  native
friendly-id
Java Friendly Id for UUID
Stars: ✭ 173 (+96.59%)
Mutual labels:  uuid
expenses-native
No description or website provided.
Stars: ✭ 90 (+2.27%)
Mutual labels:  native
SierraChartZorroPlugin
A Zorro broker API plugin for Sierra Chart, written in Win32 C++.
Stars: ✭ 22 (-75%)
Mutual labels:  uuid

react-native-uuid-generator

npm version downloads

A simple wrapper around the native iOS and Android UUID classes. Exposes a single method, getRandomUUID.

Example App Screen Capture

Getting started

$ npm install react-native-uuid-generator --save

$ react-native link react-native-uuid-generator

Usage

This library supports both callback and promise interfaces.

import UUIDGenerator from 'react-native-uuid-generator';

// Callback interface
UUIDGenerator.getRandomUUID((uuid) => {
  console.log(uuid);
});
// => "42A8A87A-F71C-446B-B81D-0CD16A709625"

// Promise interface
UUIDGenerator.getRandomUUID().then((uuid) => {
  console.log(uuid);
});
// => "BD6120BD-3612-4D56-8957-99F5D6F02C52"

Manual installation

If the react-native link command doesn't work, you can also install the native components of this library manually.

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-uuid-generator and add RNUUIDGenerator.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNUUIDGenerator.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import io.github.traviskn.rnuuidgenerator.RNUUIDGeneratorPackage; to the imports at the top of the file
  • Add new RNUUIDGeneratorPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
  include ':react-native-uuid-generator'
  project(':react-native-uuid-generator').projectDir = new File(rootProject.projectDir,   '../node_modules/react-native-uuid-generator/android')
  1. Insert the following lines inside the dependencies block in android/app/build.gradle:
  compile project(':react-native-uuid-generator')

Upgrading

See the changelog for instructions on upgrading to the latest version.

Example

Check out the example app included in the github repo to see the UUID Generator in action! I assume you already have the react-native-cli installed, as well as the required iOS or Android dependencies.

git clone https://github.com/Traviskn/react-native-uuid-generator.git

cd react-native-uuid-generator/example
npm install

Use react-native run-ios or react-native run-android to run the example.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].