Code Monkey home page Code Monkey logo

blackberry-dynamics-react-native-sdk's Introduction

BlackBerry Dynamics SDK for React Native

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

Supportability

Development environment

  • Mac OS X
  • Windows 10 (Android only)

React Native

  • 0.63.x

Package manager

  • yarn

BlackBerry Dynamics

  • BlackBerry Dynamics SDK for iOS v8.1, check environment requirements here.
  • BlackBerry Dynamics SDK for Android v8.1, check environment requirements here.
  • BlackBerry Dynamics SDK for iOS v9.0, check environment requirements here.
  • BlackBerry Dynamics SDK for Android v9.0, check environment requirements here.

Features

Integration with BlackBerry Dynamics

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.

Secure connectivity

  • Both XMLHttpRequest and fetch are secured in scope of BlackBerry-Dynamics-for-React-Native-Networking module.
  • <WebView /> is secured in scope of BlackBerry-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.
  • Secure communication via WebSockets is not supported.

Secure storage

  • AsyncStorage is secured in scope of BlackBerry-Dynamics-for-React-Native-Async-Storage module
  • SQLite is secured in scope of BlackBerry-Dynamics-for-React-Native-SQLite-Storage module

Data Leakage Prevention (DLP)

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 of BlackBerry-Dynamics-for-React-Native-Text UI component
  • <TextInput /> component is secured in scope of BlackBerry-Dynamics-for-React-Native-TextInput UI component
  • BlackBerry-Dynamics-for-React-Native-Clipboard module secures Clipboard API on Android.

Inter-Container Communication (ICC)

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.

Package contents

Modules

  • BlackBerry-Dynamics-for-React-Native-Base - automatically integrates BlackBerry Dynamics SDK for iOS and Android into React Native application
  • BlackBerry-Dynamics-for-React-Native-Networking - secures XMLHttpRequest and fetch 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.

UI components

  • BlackBerry-Dynamics-for-React-Native-Text - enables DLP within UI component on Android
  • BlackBerry-Dynamics-for-React-Native-TextInput - enables DLP within UI component on Android
  • BlackBerry-Dynamics-for-React-Native-WebView - secures UI component

Sample Applications

  • BasicNetworking - shows example of using fetch and XMLHttpRequest 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 for fetch, XMLHttpRequest, Clipboard, AsyncStorage, AppKinetics and SQLite in React Native application.
  • WebViewBrowser - demonstrates usage of <WebView /> UI component in React Native application.

Preconditions

Make sure you first setup your environment and install BlackBerry Dynamics.

How To Guides

Sample applications

To setup, build and run the sample applications please refer to the README for each sample.

Integrate into new React Native application

To integrate BlackBerry Dynamics into a new React Native application please follow these steps.

Integrate into existing React Native application

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 or XMLHttpRequest is used in your code to do communication between your app and backend server this communication can be secured by adding BlackBerry-Dynamics-for-React-Native-Networking module. See Networking Module.
    • If you use AsyncStorage capabilities it can be secured by adding BlackBerry-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 adding BlackBerry-Dynamics-for-React-Native-Clipboard module. See Clipboard module.
    • If <Text /> UI component is used you can secure cut/copy/paste operations by adding BlackBerry-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 adding BlackBerry-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 adding BlackBerry-Dynamics-for-React-Native-WebView UI component. See WebView UI component.
  • Lastly, do not forget to update the imports in your code.

blackberry-dynamics-react-native-sdk's People

Contributors

msohm avatar 2lambda123 avatar dependabot[bot] avatar jeffinwithya avatar volodymyrtaliar avatar taras-omelchuk avatar natebakescakes avatar bthornton32 avatar gghangura avatar imgbotapp avatar penify-dev[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.