This page provides an overview on how to use the BlackBerry Dynamics SDK for React Native. For details on BlackBerry Dynamics please see https://www.blackberry.com/dynamics
- Mac OS X
- Windows 10 (Android only)
- 0.63.x
- yarn
- BlackBerry Dynamics SDK for iOS v8.1, check environment requirements here.
- BlackBerry Dynamics SDK for Android v8.1, check environment requirements here.
Integration of BlackBerry Dynamics SDK for iOS and Android into React Native application is supported by addition of the BlackBerry-Dynamics-for-React-Native-Base
module.
- Both
XMLHttpRequest
andfetch
are secured in scope ofBlackBerry-Dynamics-for-React-Native-Networking
module. <WebView />
is secured in scope ofBlackBerry-Dynamics-for-React-Native-WebView
UI component.- On iOS
UIWebView
has been DEPRECATED by Apple for a long time and removed from react-native-webview since version 7.0.1. UIWebView
support was removed from BlackBerry Dynamics SDK for iOS since v8.0.
- On iOS
- Secure communication via WebSockets is not supported.
AsyncStorage
is secured in scope ofBlackBerry-Dynamics-for-React-Native-Async-Storage
moduleSQLite
is secured in scope ofBlackBerry-Dynamics-for-React-Native-SQLite-Storage
module
On iOS <Text />
component, <TextInput />
component and Clipboard
API are secured simply by integrating BlackBerry Dynamics.
On Android the following items are required:
<Text />
component is secured in scope ofBlackBerry-Dynamics-for-React-Native-Text
UI component<TextInput />
component is secured in scope ofBlackBerry-Dynamics-for-React-Native-TextInput
UI componentBlackBerry-Dynamics-for-React-Native-Clipboard
module secures Clipboard API on Android.
ICC provides service discovery, service consumption and service providing abilities for Dynamics React Native applications and allows to securely communicate with other Dynamics applications.
To implement some ICC capabilities in a Dynamics React Native application BlackBerry-Dynamics-for-React-Native-AppKinetics
should be used.
BlackBerry-Dynamics-for-React-Native-Base
- automatically integrates BlackBerry Dynamics SDK for iOS and Android into React Native applicationBlackBerry-Dynamics-for-React-Native-Networking
- securesXMLHttpRequest
andfetch
APIs on Android. For more details please refer to networking topic in React Native.BlackBerry-Dynamics-for-React-Native-SQLite-Storage
- secures SQLite DB usage. It is based on react-native-sqlite-storage 3rd party module.BlackBerry-Dynamics-for-React-Native-Async-Storage
- secures built-in AsyncStorage.BlackBerry-Dynamics-for-React-Native-Clipboard
- secures built-in Clipboard API.BlackBerry-Dynamics-for-React-Native-AppKinetics
- provides Inter-Container Communication capabilities.
BlackBerry-Dynamics-for-React-Native-Text
- enables DLP within UI component on AndroidBlackBerry-Dynamics-for-React-Native-TextInput
- enables DLP within UI component on AndroidBlackBerry-Dynamics-for-React-Native-WebView
- secures UI component
BasicNetworking
- shows example of usingfetch
andXMLHttpRequest
in different ways, covers different HTTP request types (GET, POST, PUT, DELETE etc.), some authentication types (basic auth, Digest, NTLM), has a possibility to send data to the server of different types (text, JSON, FormData etc.) and receive response of different types if server supports it (ArrayBuffer, text, JSON, Blob, etc.).ClipboardTestApp
- demonstrates usage of Clipboard API in terms of Data Leakage Prevention. It is possible to change DLP policy on UEM and see how it affects the clipboard within the application. If DLP is on, it will not be possible to copy clipboard data from "Dynamics" application to "non-Dynamics" application and vice-versa.DLP
- demonstrates usage of<Text />
and<TextInput />
UI components together with DLP policy option on UEM. If DLP is on, it will not be possible to do cut-copy-paste operations over data from "Dynamics" to "non-Dynamics" application and vice-versa.SQLite
- shows example of using secure SQLite DB instance in React Native application.UnitTests
- runs Jasmine unit tests forfetch
,XMLHttpRequest
,Clipboard
,AsyncStorage
,AppKinetics
andSQLite
in React Native application.WebViewBrowser
- demonstrates usage of<WebView />
UI component in React Native application.
Make sure you first setup your environment and install BlackBerry Dynamics.
To setup, build and run the sample applications please refer to the README for each sample.
To integrate BlackBerry Dynamics into a new React Native application please follow these steps.
To integrate BlackBerry Dynamics into existing React Native application:
-
Check you are using
0.63.x
version of React Native.- React Native Upgrade Helper may be used to upgrade your application prior to integrating BlackBerry Dynamics. Confirm the application builds and works correctly after upgrade.
-
Integrate BlackBerry Dynamics by adding
BlackBerry-Dynamics-for-React-Native-Base
module$ cd <appFolder>
$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-Base
Integrates Dynamics based on your current identifiers - iOS Bundle ID and Android Package Name.
$ yarn set-bundle-id (OPTIONAL)
Allows an identifier (required) and name (optional) to be updated within your application. This identifier is your iOS Bundle ID or Android Package Name and will also be used as the Entitlement ID for entitling and activating your application with the BlackBerry UEM management console.
-
Analyze your application functionality and decide what parts should be secured:
- If
fetch
API orXMLHttpRequest
is used in your code to do communication between your app and backend server this communication can be secured by addingBlackBerry-Dynamics-for-React-Native-Networking
module. See Networking Module. - If you use
AsyncStorage
capabilities it can be secured by addingBlackBerry-Dynamics-for-React-Native-Async-Storage
module. See Async-Storage Module. - If SQLite DB is used in the application it can be secured by adding
BlackBerry-Dynamics-for-React-Native-SQLite-Storage
module. See SQLite-Storage Module. - If in your application
Clipboard
API is used it can be secured by addingBlackBerry-Dynamics-for-React-Native-Clipboard
module. See Clipboard module. - If
<Text />
UI component is used you can secure cut/copy/paste operations by addingBlackBerry-Dynamics-for-React-Native-Text
UI component. See Text UI component. - If
<TextInput />
UI component is used you can secure cut/copy/paste operations by addingBlackBerry-Dynamics-for-React-Native-TextInput
UI component. See TextInput UI component. - If
<WebView />
UI component is used you can secure resource loading within WebView by addingBlackBerry-Dynamics-for-React-Native-WebView
UI component. See WebView UI component.
- If
-
Lastly, do not forget to update the imports in your code.