Skip to content

Commit

Permalink
chore: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
devfixit committed Feb 3, 2024
1 parent 3929b00 commit 40fe7de
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 95 deletions.
68 changes: 45 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,53 @@
# rn-unique-identifier
# React Native Unique Identifier
### Overview
The `rn-unique-identifier-oldarch` npm package is designed to provide a simple and effective solution for generating unique and persistent identifiers in React Native applications. The identifier generated by this package remains consistent across uninstallation and reinstallation of the same application on both Android and iOS platforms.

React Native Unique Identifier Package
### New Architecture Support
use `rn-unique-identifier` npm package for new architecture support

## Installation
### Features
Cross-Platform Support: Works seamlessly on both Android and iOS platforms.
Unique and Persistent: Generates identifiers that persist across application uninstallations and reinstalls.
Simple Integration: Easily integrate the package by importing and calling getPersistentIdentifier(callback: (string) => void).

```sh
npm install rn-unique-identifier
### Installation
Install the package using npm:
```

## Usage

```js
import { multiply } from 'rn-unique-identifier';

// ...

const result = await multiply(3, 7);
npm install rn-unique-identifier-oldarch
```
### Usage
Import the module in your React Native application and use it to obtain the persistent identifier:

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT
Example App.jsx(javascript)
```
import React, { useEffect } from 'react';
import { View, Text } from 'react-native';
import { getPersistentIdentifier } from 'rn-unique-identifier-oldarch';
const App = () => {
const [result, setResult] = useState("");
useEffect(() => {
getPersistentIdentifier(
(deviceId) => {
console.log('Persistent Identifier:', identifier);
setResult(deviceId)
}
);
}, []);
return (
<View>
<Text>Check the console for the Persistent Identifier.</Text>
<Text>Btw the value is: {result}</Text>
</View>
);
};
export default App;
```

---
### Contribution
Contributions to the project are welcome! Feel free to create issues or pull requests on the GitHub repository.

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
### License
This project is licensed under the MIT License.
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ PODS:
- React-jsi (= 0.73.3)
- React-logger (= 0.73.3)
- React-perflogger (= 0.73.3)
- rn-unique-identifier (0.1.0):
- rn-unique-identifier (1.1.0):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
Expand Down Expand Up @@ -1371,7 +1371,7 @@ SPEC CHECKSUMS:
React-runtimescheduler: aa382ce525689b88459e1181b3649220f175dc31
React-utils: b22b4a51aa578b3aac1e7c19501c0b9ba358ed79
ReactCommon: e708b8be8cb317b83e31c6ccfeda8bf6c0d1a2b3
rn-unique-identifier: 2be3e01b58b6fbf82a54053072a96c35af7b7f3c
rn-unique-identifier: 6636d488189fc1c3b11c33a5c762514cb2d78ed7
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: ff0382b894475dba0b4d2a5fda860bfee5a9afad

Expand Down
Loading

0 comments on commit 40fe7de

Please sign in to comment.