Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kefahb/nativescript-uuid
Get the UUID for IOS and Android
https://github.com/kefahb/nativescript-uuid
Last synced: 8 days ago
JSON representation
Get the UUID for IOS and Android
- Host: GitHub
- URL: https://github.com/kefahb/nativescript-uuid
- Owner: kefahB
- Created: 2021-10-15T07:36:22.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-15T11:31:17.000Z (about 3 years ago)
- Last Synced: 2024-11-05T16:52:36.151Z (2 months ago)
- Language: TypeScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NativeScript UUID
This is a plugin for Nativescript that allows you to get a UUID (Universal Unique Identifier) for a device.
> This plugin support the NS 8 also ;-)
Inspired from [`StackOverflow: How to preserve identifierForVendor in ios after uninstalling ios app on device?`](http://stackoverflow.com/questions/21878560/how-to-preserve-identifierforvendor-in-ios-after-uninstalling-ios-app-on-device).
Uses [`SAMKeychain Cocoa Pod`](https://cocoapods.org/pods/SAMKeychain).
## Installation
Run the following command from the root of your project:
```javascript
ns plugin add @kefah/nativescript-uuid
```## Usage
#### JavaScript
```js
let uid = require("@kefah/nativescript-uuid").NativescriptUuid;
const uuid = uid.getUUID();
console.log(`The device UUID is ${uuid}`);
```#### TypeScript
```typescript
import {NativescriptUuid} from '@kefah/nativescript-uuid';const uuid = NativescriptUuid.getUUID();
console.log(`The device UUID is ${uuid}`);
```## License
Apache License Version 2.0