BlackBerry-Dynamics-for-React-Native-Text
enables Data Leakage Prevention (DLP) within <Text />
UI component for Android platform. More details about DLP on Android can be found here.
NOTE: on iOS platform DLP is supported by default via 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.66.x (deprecated)
- 0.67.x (deprecated)
- 0.68.x (deprecated)
- 0.69.x (deprecated)
- 0.70.x
- 0.71.x
- 0.72.x
BlackBerry-Dynamics-for-React-Native-Text
is dependent on BlackBerry-Dynamics-for-React-Native-Base
module.
Please install BlackBerry-Dynamics-for-React-Native-Base
first.
NOTE:
BlackBerry-Dynamics-for-React-Native-Text
should be the last package added to your project dependencies. Adding modules or UI components afterBlackBerry-Dynamics-for-React-Native-Text
can override some important configurations that may cause following exception during application launch:"Text strings must be rendered within a <Text> component"
. If this is the case please runyarn set-text-config
command to put needed configurations back. This action should be repeated when add/remove other packages. For more details please take a look at examples inDLP
sample application.
$ yarn add <path>/ui-components/BlackBerry-Dynamics-for-React-Native-Text
...
$ yarn set-text-config
$ cd ios
$ pod install
$ cd ..
$ npx react-native run-ios
$ npx react-native run-android
react-native-elements
is cross-platform React Native UI toolkit. There are many ready-to-use UI components that can extend React Native application.
react-native-elements
are implemented using original Text
and TextInput
components which means DLP is not supported by default.
In order to enable DLP within react-native-elements
it is required to update imports in <app_name>/node_modules/react-native-elements/src/*
according to following principle:
import {Text, TextInput} from 'react-native';
should be replaced with
import Text from 'BlackBerry-Dynamics-for-React-Native-Text';
import TextInput from 'BlackBerry-Dynamics-for-React-Native-TextInput';
IMPORTANT: please apply the changes described above to enable DLP within
react-native-elements
// ...
import Text from 'BlackBerry-Dynamics-for-React-Native-Text';
// ...
export default class App extends Component {
// ...
render() {
<Text selectable={true}>Content from this component cannot be copied to non-GD apps if DLP is on ...</Text>
}
}
// ...
import { Text } from 'react-native-elements';
// ...
export default class App extends Component {
// ...
render() {
<Text h1>Content from this component cannot be copied to non-GD apps if DLP is on ...</Text>
}
}
$ cd <appFolder>
$ yarn remove BlackBerry-Dynamics-for-React-Native-Text
$ cd ios
$ pod install
$ cd ..