BlackBerry-Dynamics-for-React-Native-Clipboard
secures Clipboard API in React Native.
Clipboard API works in combination with Data Leakage Prevention (DLP). More details about DLP on Android can be found here.
NOTE: on iOS Clipboard API is secured by default by Dynamics runtime after
BlackBerry-Dynamics-for-React-Native-Base
module is installed and linked. More details about DLP on iOS can be found here.
- 0.63.x
BlackBerry-Dynamics-for-React-Native-Clipboard
is dependent on BlackBerry-Dynamics-for-React-Native-Base
module.
Please install BlackBerry-Dynamics-for-React-Native-Base
first.
$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-Clipboard
$ cd ios
$ pod install
$ cd ..
$ react-native run-ios
$ react-native run-android
// ...
import Clipboard from 'BlackBerry-Dynamics-for-React-Native-Clipboard';
get_Text_From_Clipboard = async () => {
var textHolder = await Clipboard.getString();
console.log('getting value from clipboard: ' + textHolder);
}
set_Text_Into_Clipboard = async () => {
console.log('setting value to clipboard');
await Clipboard.setString('some text');
}
// ...
$ cd <appFolder>
$ yarn remove BlackBerry-Dynamics-for-React-Native-Clipboard
$ cd ios
$ pod install
$ cd ..