Skip to content

Latest commit

 

History

History
50 lines (40 loc) · 1.73 KB

File metadata and controls

50 lines (40 loc) · 1.73 KB

BlackBerry-Dynamics-for-React-Native-Clipboard

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.

Supportability

React Native

  • 0.63.x

Preconditions

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.

Installation

$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-Clipboard
iOS
$ cd ios
$ pod install
$ cd ..
$ react-native run-ios
Android
$ react-native run-android

Usage

// ...
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');
}
// ...

Uninstallation

$ cd <appFolder>
$ yarn remove BlackBerry-Dynamics-for-React-Native-Clipboard
iOS
$ cd ios
$ pod install
$ cd ..