0.1.0 • Published 1 year ago
react-native-appguard v0.1.0
react-native-appguard
React Native AppGuard is a package that enables the usage of NHN AppGuard's Android and iOS native modules within React Native. It provides functionalities for managing user and device IDs, as well as registering callback functions.
Installation
To install the library, use npm:
npm install react-native-appguard
Usage
Import the library in your React Native project:
import Diresu from 'react-native-appguard';
Functions
Diresu.s(u: string)
This function is used to set the user ID.
Parameters
u
: string - The user ID to be set.
Example
Diresu.s('user123');
Diresu.i(): Promise<string>
This function is used to obtain the device ID.
Returns
- Promise - A promise resolving to the device ID.
Example
Diresu.i().then((deviceId) => {
console.log('Device ID:', deviceId);
});
Diresu.p(a: boolean)
This function is used to enable or disable the detection popup.
Parameters
a
: boolean - A boolean value indicating whether to enable (true) or disable (false) the detection popup.
Example
// Enable detection popup
Diresu.p(true);
// Disable detection popup
Diresu.p(false);
Diresu.o(c: (message: string) => void)
This function is used to register a callback function.
Parameters
- c: (message: string) => void - The callback function. It takes a string message as a parameter.
Example
Diresu.o((message) => {
console.log('Callback message:', message);
});
0.1.0
1 year ago
0.0.1-alpha.7
1 year ago
0.0.1-alpha.6
1 year ago
0.0.1-alpha.5
1 year ago
0.0.1-alpha.4
1 year ago
0.0.1-alpha.3
1 year ago
0.0.1-alpha.2
1 year ago
0.0.1-alpha.1
1 year ago