cordova-plugin-keychain-uuid
Version:
crodova plugin for getting uuid from keychain
87 lines (42 loc) • 1.39 kB
Markdown
get iOS unique device id by **KEYCHAIN+UUID**,
you can also choose another way : [KEYCHAIN+IDFA](https://github.com/jasonz1987/cordova-plugin-keychain-idfa)
more info visit:http://www.jason-z.com/post/22
[中文文档](REAEDME_CN.md)
[](https://github.com/jasonz1987/ionic-keychain-uuid-demo)
```bash
cordova plugin add cordova-plugin-keychain-uuid
```
```javascript
var args = {
'key':'com.jason-z.test.uuid'
};
KeychainUUID.getDeviceID((id)=>{
console.log(id);
},(err)=>{
console.log(err);
})
```
```javascript
var args = {
'key':'com.jason-z.test.uuid'
};
KeychainUUID.deleteDeviceID((id)=>{
console.log(id);
},(err)=>{
console.log(err);
})
```
*you can custom **key** value by your own.*
the keychain data are stored privately by default. if you want share your data in different app (in same account),you must open `KEYCHAIN_SHARE`. you can do it by these steps.
open `Xcode->Capabilities->Keychain Sharing`, then add same group in your apps.

# Donate
If this project help you reduce time to develop, you can give me a cup of coffee :)
[](https://www.paypal.me/jasonz1987/6.66)