BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an...

32
BlackBerry Dynamics SDK for Cordova Development Guide 4.2

Transcript of BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an...

Page 1: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

BlackBerry Dynamics SDK forCordovaDevelopment Guide

4.2

Page 2: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

2018-10-24Z

 |  | 2

Page 3: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Contents

About this guide................................................................................................5

BlackBerry Dynamics background..................................................................... 6BlackBerry Dynamics API reference..................................................................................................................... 6FIPS 140-2 compliance..........................................................................................................................................6Easy Activation....................................................................................................................................................... 7Securing cut-copy-paste on devices (Data Leakage Prevention, or DLP).......................................................... 7Shared Services Framework..................................................................................................................................7Support for fingerprint authentication.................................................................................................................. 7Support for WKWebView....................................................................................................................................... 8Support for client certificates................................................................................................................................8Support for the "Do not require password" setting............................................................................................. 8Support for AngularJS and Ionic.......................................................................................................................... 9Bypassing the App Lock screen......................................................................................................................... 10Supported languages........................................................................................................................................... 10

Requirements.................................................................................................. 11BlackBerry Dynamics software versions............................................................................................................11

Compatibility with earlier releases.......................................................................................................... 11Unsupported BlackBerry Dynamics features.......................................................................................... 11

Software requirements.........................................................................................................................................11Recommended development environment: macOS, not Windows 10..................................................12Character encoding for build files: UTF-8...............................................................................................13

BlackBerry Dynamics entitlement ID and version..............................................................................................13Distinction from and use with native language identifiers....................................................................14Including BlackBerry Dynamics entitlement version metadata for the Shared Service Framework....15Setting preferences in config.xml for BlackBerry Dynamics................................................................. 16

Restricted key prefix............................................................................................................................................ 17

Steps to get started with the BlackBerry Dynamics SDK for Cordova............... 18Install the BlackBerry Dynamics SDK for Cordova............................................................................................ 18

Install BlackBerry Dynamics SDK for Android or BlackBerry Dynamics SDK for iOS........................... 18Directory structure and available plug-ins.............................................................................................. 18

Using plug-ins to enable your apps.................................................................21Installing the Configure plug-in........................................................................................................................... 21The Base plug-in...................................................................................................................................................22

Usage declaration for Face ID.................................................................................................................22Check the version of installed plug-ins.............................................................................................................. 23Security of Cordova localStorage....................................................................................................................... 23

 |  | iii

Page 4: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Sample apps................................................................................................... 25

Testing and troubleshooting........................................................................... 26Automated test support library for iOS.............................................................................................................. 26Logging and diagnostics..................................................................................................................................... 26

Log message categories..........................................................................................................................26Configure detailed logging for the Xcode console................................................................................ 26Configure selective logging for the Xcode console............................................................................... 27Configure logging in Good Control..........................................................................................................27GDLogManager class for log uploading................................................................................................. 27

Readying your app for deployment: server setup.............................................29

Legal notice.................................................................................................... 30

 |  | iv

Page 5: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

About this guideThis guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova. Theguide focuses on how to install the BlackBerry Dynamics SDK for Cordova, how to use the provided plugins, andintroduces the sample apps that are packaged with the SDK.

This guide is intended for software developers who already have an understanding of developing software withCordova. For more information about Cordova, visit cordova.apache.org.

This guide is not a tutorial on programming with Cordova. It assumes that you have working knowledge of thelanguage and concepts. The guide also assumes that you have installed the supported version of Cordova. Forinformation about how to install, see the instructions from Apache Project at https://cordova.apache.org/docs/en/latest/ or the Node.js site at https://www.npmjs.com/package/cordova

 | About this guide | 5

Page 6: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

BlackBerry Dynamics backgroundThe following sections provide some background information that can help you understand the features of theBlackBerry Dynamics SDK.

The way that these features are implemented in your environment will depend on how your administrator hasconfigured your organization's servers, your network, and other infrastructure.

BlackBerry Dynamics API referenceThe BlackBerry Dynamics SDK API reference describes the available interfaces, classes, methods, and muchmore.

You can access the BlackBerry Dynamics SDK for Cordova API reference at https://developers.blackberry.com/us/en/resources/api-reference.html.

You can access the Android API reference:

• Online at https://developers.blackberry.com/us/en/resources/api-reference.html.• In the installed directories for the BlackBerry Dynamics SDK for Android.

You can access the iOS API reference:

• Online at https://developers.blackberry.com/us/en/resources/api-reference.html.• In the installed directories for the BlackBerry Dynamics SDK for iOS. In Xcode, the BlackBerry Dynamics SDK

Reference can be viewed from the Organizer window in the Documentation section in Xcode.

FIPS 140-2 complianceBlackBerry Dynamics apps must comply with U.S. Federal Information Processing Standards (FIPS) 140-2.The BlackBerry Dynamics SDK distribution contains FIPS canisters and tools and, by default, enforces FIPScompliance.

On Android, FIPS compliance is automatic. No special build steps are required.

There are two components involved in enabling FIPS:

Component Description

BlackBerry Dynamics app The app must start in FIPS-compliant mode. The BlackBerry DynamicsSDK determines whether a service is running in FIPS mode when theapp communicates with the server to receive policies. All apps must bewritten for FIPS compliance.

Policy server (either standaloneGood Control or BlackBerry UEM)

For more details on FIPS policies, see Readying your app for deployment:server setup.

FIPS compliance enforces the following constraints:

• MD4 and MD5 are prohibited. As a result, access to NTLM-protected or NTLM2-protected web pages and filesis blocked.

• Wrapped apps are blocked.

 | BlackBerry Dynamics background | 6

Page 7: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

• In secure socket key exchanges with ephemeral keys, with servers that are not configured to use Diffie-Hellman keys of sufficient length, BlackBerry Dynamics retries with static RSA cipher suites.

Note: When you enable FIPS compliance, user certificates must use encryption that meets FIPS standards.If a user tries to import a certificate with encryption that is not compliant, the user receives an error messageindicating that the certificate is not allowed and cannot be imported.

Easy ActivationThe Easy Activation feature simplifies the provisioning process by allowing a BlackBerry Dynamics app to handoff activation to an app that is already installed on the device and can act as the activation delegate. The user hasto retrieve and manually enter an access key only the first time they install a BlackBerry Dynamics app.

Securing cut-copy-paste on devices (Data Leakage Prevention, orDLP)You can use the BlackBerry Dynamics SDK to protect certain data copied and pasted between apps on your users'devices.

For iOS, you don't need to do any additional programming to support secure cut and paste.

Server administrators must enable the Data Leakage Prevention policies in the management console.

To enable sharing among a group of apps, the apps must be provisioned from the same BlackBerry Controlservice for each user.

If the Data Leakage Prevention settings are enabled in your environment, you can work around them when youneed to debug your app. For more information, see the BlackBerry Dynamics SDK API Reference.

Shared Services FrameworkBlackBerry Dynamics-enabled apps can communicate with each other using the Shared Services Framework.There are two kinds of shared services:

• Server-side services• Client-side services

The BlackBerry Dynamics SDK contains sample apps that show how these services work.

For a conceptual background, see BlackBerry Dynamics Services Framework.

Support for fingerprint authenticationSupport for fingerprint recognition is a supplement to standard BlackBerry Dynamics secure user authentication,not a replacement for it. BlackBerry Dynamics includes the following policies related to fingerprint authentication.These settings are configured using policies in the management console:

• Allow or disallow fingerprint authentication for BlackBerry Dynamics-based apps in general.• If fingerprint authentication is allowed, you can also allow or disallow it for BlackBerry Dynamics apps

immediately after app coldstart. If you do not allow it after app coldstart, the user must enter the password forthe app.

 | BlackBerry Dynamics background | 7

Page 8: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

• Require the end user to enter a password after a specified interval.

Note: For app developers, no additional programming work is necessary for fingerprint authentication. If the appsupports Samsung Pass, some linking directives are required. See Info: Add Samsung Pass to your BlackBerryDynamics app.

For more information, see BlackBerry Dynamics and Fingerprint Authentication.

Support for WKWebViewThe BlackBerry Dynamics SDK for Cordova version 4.2 and later are compatible with iOS WKWebView. For detailsabout WKWebView support in the BlackBerry Dynamics SDK for iOS, see the BlackBerry Dynamics SDK for iOSDevelopment Guide.

To use WKWebView in a Cordova application, add the WKWebView Engine plugin, for example, by running thefollowing:

$ cordova plugin add cordova-plugin-wkwebview-engine

This plugin changes the underlying web view control to WKWebView instead of UIWebView.

Note the following support details:

• UIWebView is deprecated in iOS 12. WKWebView should be used instead.• The WKWebView Engine plugin is compatible with Cordova 6.0.0 and later.• The XmlHttpRequest interface will be redirected to the BlackBerry Dynamics secure infrastructure.

Support for client certificatesBlackBerry Dynamics supports many popular uses of client-side Public Key Infrastructure (PKI) certificates tosecure apps and communications:

• General requirements for working with PKI certs• Description of client certificate sharing among BlackBerry Dynamics apps on a device• Kerberos PKINIT: client certificates in the Kerberos authentication model. (This is not Kerberos Constrained

Delegation, or KCD).

Support for the "Do not require password" settingThe BlackBerry Dynamics Runtime supports the "Do not require password" setting in a BlackBerry Dynamicsprofile in UEM or in a security policy in standalone Good Control. When this setting is enabled by an administrator,users cannot set a password for a BlackBerry Dynamics app or BlackBerry Dynamics container. Note that thissetting does not apply to the device password.

This setting is available in BlackBerry UEM 12.7 or later and standalone Good Control 3.0.50.70 or later.

Security considerations

• Consider the security impact to your organization's environment before an administrator enables this setting.If enabling this feature does not meet security standards, consider other options, including authenticationdelegation or assigning the profile to specific users or groups that are already assigned device managementprofiles or other controls.

 | BlackBerry Dynamics background | 8

Page 9: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

• Do not enable the "Do not require password" setting and authentication delegation in the same policy set.• When the "Do not require password" setting is enabled, authentication can be accomplished only through user

interaction or autonomously. For more information, see "canAuthorizeAutonomously" in the SDK programmingreference for iOS or Android.

User experience when the rule is enabled or disabled

If a BlackBerry Dynamics app requires a password and the administrator enables the "Do not require password"setting, the next time the user opens the app, the app displays a message that a password is no longer required.As long as the feature is enabled, the user is not prompted for a password.

If the administrator disables the "Do not require password" setting, the next time the user opens the app, the appdisplays a message that a password is required. The user is prompted to specify a password.

Android: Optional APIs for the "Do not require password" policy rule

You can call the GDAndroid.getInstance().canAuthorizeAutonomously() method to determinewhether this feature is enabled for a BlackBerry Dynamics app.

Call GDAndroid.serviceInit() to start the authorization process when the app has received a GCM messageor background broadcast/explicit intent.

The GDInteraction sample app illustrates the use of these methods.

For syntax and details, see the SDK programming reference.

iOS: Optional APIs for the "Do not require password" policy rule

You can call the [GDiOS sharedInstance].canAuthorizeAutonomously method to determine whetherthis feature is enabled for a BlackBerry Dynamics app.

If the app has received an APNS message or a Background Fetch period, or has been launched in the background,you can call the [GDiOS sharedInstance].authorizeAutonomously method to start the authorizationprocess.

The SecureStore sample app illustrates the use of these methods.

For syntax and details, see the SDK programming reference.

Support for AngularJS and IonicExcept for the limitations noted below for Android, the BlackBerry Dynamics SDK for Cordova supports all of thefeatures of:

• AngularJS version 1, 2, 4, and 5• Ionic version 3

Note the following limitations for Android only:

• Synchronous HTTP requests via XMLHttpRequest are not supported. The requests are treated asasynchronous.

• File uploads with FormData() are not supported. Use the FileTransfer plug-in (cordova-plugin-bbd-filetransfer) for file uploads and downloads. For more information about this plug-in, see Directorystructure and available plug-ins.

 | BlackBerry Dynamics background | 9

Page 10: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Bypassing the App Lock screenBlackBerry Dynamics supports the ability of an app to bypass the BlackBerry Dynamics user authentication/lockscreen. Some organizations want this feature, particularly in VoIP apps where the user needs to respond quicklyto an incoming call.

Note: Enabling this policy weakens the security inherent to BlackBerry Dynamics.

For information about requesting this feature, the necessary programming for bypassing the lock screen, thesetup of a required app policy, and other details, see Bypass Unlock: BlackBerry Dynamics app Developer Guide.

Supported languagesThe BlackBerry Dynamics SDK supports the following languages. No SDK calls are required to use a particularlanguage; the interface selects the appropriate language based on the language setting the user has configuredon their device.

• English (US)• Chinese (Simplified)• Danish• Dutch• French• German• Italian• Japanese• Korean• Portuguese (Brazil)• Portuguese (Portugal)• Spanish• Swedish

 | BlackBerry Dynamics background | 10

Page 11: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Requirements

BlackBerry Dynamics software versions• BlackBerry Dynamics SDK for iOS 4.2.x• BlackBerry Dynamics Launcher Library for iOS 2.8.x

• BlackBerry Dynamics SDK for Android 4.2.x• BlackBerry Dynamics Launcher Library for Android 2.8.x

• BlackBerry Dynamics SDK for Cordova 4.2.x

Compatibility with earlier releasesThe latest release of the BlackBerry Dynamics SDK for Cordova is compatible with the latest release ofthe BlackBerry Dynamics SDK for Android and the BlackBerry Dynamics SDK for iOS.

Note: You should always build with and test against the most recent release. The most recent release has bugfixes and new features that you should test and deploy regularly.

Unsupported BlackBerry Dynamics featuresThe following features of BlackBerry Dynamics are not supported by the BlackBerry Dynamics SDK for Cordova:

• Not supported on Android: BlackBerry Dynamics Wearable Framework• Not supported on Android: Securing cut-copy-paste on devices (Data Leakage Prevention, or DLP)• Not supported on iOS: BlackBerry Dynamics Launcher Library

Software requirementsAndroid development

Item Requirement

Supported Android OS • Android 5.0 or later• For Cordova development, 6.0 or later

BlackBerry Dynamics HandheldLibrary

Minimum API level: 21

BlackBerry Dynamics WearableLibrary

Minimum API level: 21

Supported CPU architectures • ARMv7• ARMv8• x86

 | Requirements | 11

Page 12: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Item Requirement

Android Wear dependencies • Google Play Services 11.0.1• Android Wear Emulator API level 22

Suggested versions of platformand tools

• Android Studio 3 or later• The following values specified in sdk/libs/handheld/

gd/build.gradle. Other versions of tools will work,however, BlackBerry Dynamics library gradle files might need to beupdated accordingly.

• com.android.tools.build:gradle: 2.3.2• compileSdkVersion 28• buildToolsVersion "28.0.0"

iOS development

Item Requirement

Deployment target • iOS 10 or later

iOS SDK • 10.0 or later

Xcode • 8 or later• For Cordova development, 9 or later 

Supported programminglangauges

• Objective-C: latest versions supported by Apple• Swift: 3.0 or later

Cordova development

Developing a BlackBerry Dynamics SDK for Cordova solution is easiest on the macOS platform. Windows 10 is notsupported for development.

Item Requirement

Android compatibility The BlackBerry Dynamics SDK for Cordova version 4.2 requiresminimum Android API level 23. The BlackBerry Dynamics SDK forAndroid 4.2 requires minimum Android API level 21.

Both SDKs are compatible, but note that if you are using the BlackBerryDynamics SDK for Android 4.2, the BlackBerry Dynamics SDK forCordova does not support Android L devices with API level 21 or 22.

Supported Cordova libraries • 8.0.0

Recommended development environment: macOS, not Windows 10Developing an app with BlackBerry Dynamics SDK for Cordova is easiest on the macOS platform.

 | Requirements | 12

Page 13: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Windows 10 is not supported for development.

Character encoding for build files: UTF-8The BlackBerry Dynamics SDK for Android needs your build files (such as settings.json) to be in UTF-8 characterencoding.

Beware of inadvertently using an editor that adds non-UTF-8 characters or headers.

In general, Java does not work with UTF-8-BOM (byte order mark).

BlackBerry Dynamics entitlement ID and versionBlackBerry Dynamics apps are uniquely identified by a BlackBerry Dynamics entitlement ID (GDApplicationID)and entitlement version (GDApplicationVersion). The entitlement ID and entitlement version are usedto manage end-user entitlement for your apps, as well as for publishing and service provider registration.The BlackBerry Dynamics entitlement ID was formerly known as the app ID or GD App ID.

The entitlement ID is used in the app, in the BlackBerry UEM or standalone Good Control management console forapp management, and in some administrative user interfaces on the application developer portal.

For details about defining the entitlement ID and version, see Setting preferences in config.xml for BlackBerryDynamics.

Note: The entitlement ID and entitlement version are different from the native application ID and nativeapplication version. The native application ID is a unique identifier for the app that is used by the OS andassociated platforms (for example, the package name for Android or bundle identifier for iOS). The nativeapplication version is the app version number that you must change if you want to distribute a new version of anapp (see Android Studio: Version Your App). You only need to change the entitlement version if the app starts toprovide a new shared service or shared service version, or if the app stops providing a shared service or sharedservice version. For more information about when to change the entitlement ID and entitlement version, seethe BlackBerry Dynamics API reference.

Requirements for the entitlement ID and entitlement version

Requirement Description

Required for apps You must define both the entitlement ID and the entitlement version for allyour BlackBerry Dynamics apps, regardless of whether you use the BlackBerryDynamics Shared Services Framework. Developers and administrators shouldensure that the value specified for the GDApplicationVersion key in theapp configuration files is the same as the value the administrator specifiesin BlackBerry UEM or in standalone Good Control.

The entitlement version is independent of any native version identifier.For more information, see Distinction from and use with native languageidentifiers.

 | Requirements | 13

Page 14: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Requirement Description

Represent the same appacross all platforms

The same entitlement ID must be used to represent the app across allplatforms. By default, access to apps varies by the type of app:

• By default, all versions of partner or ISV apps are available to all authorizedusers in any organization that the app has been published to.

• By default, each version of a BlackBerry Dynamics app requires that theadministrator grant access in BlackBerry UEM or in standalone GoodControl before users can run the app on users' devices.

Naming scheme Develop a naming scheme to meet your needs. For example:

• Entitlement ID: com.manufacturingco.gd• Entitlement version: 1.0.0.0• Native application version: 2.0

Entitlement ID format • The general form of an entitlement ID is <company_name>.<app_name>.• The ID must use reverse domain name form, for example,

com.company.example. Use a domain name owned by your organization.• The ID must not begin with com.blackberry, com.good, com.rim, or net.rim.• The ID can contain only lower-case letters, numeric digits, hyphens, and

periods.• The string must follow the <subdomain> format defined in section 2.3.1

of RFC 1035, as amended by Section 2.1 of RFC RFC 1123.

Entitlement version value • The value must use one to four segments of digits, separate by periods(x.x.x.x).

• Each segment can be up to three digits and must not use a leading zero(for example, 01.02 is not valid). A segment can use a single 0.

• The first release of an app should use the entitlement version 1.0.0.0.

Distinction from and use with native language identifiersThe Entitlement ID and Entitlement Version are BlackBerry Dynamics specific metadata and are independent ofthe identifiers needed by the app platforms themselves. The key point is that the values and the native languageidentifiers' values can be the same but they do not necessarily have to be. Listed below by platform are theequivalent native identifiers, which are where the values of Entitlement ID and version are stored.

• AndroidManifest.xml

• packageName

• packageVersion

• Info.plist

• CFBundleIdentifier

• CFBundleVersion

Unique native identifiers for enterprise apps

If you are developing a private app for use in your enterprise, make sure that the value you choose for the app'snative identifiers (Bundle ID and others constructs used on other platforms) is unique, especially with respect toapps that are available through the public app stores.

 | Requirements | 14

Page 15: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Duplicate native identifiers can prevent the proper installation or upgrade of your own app.

For all your native identifiers, devise a naming scheme that you can be relatively certain is unique.

Mapping BlackBerry Dynamics entitlement ID to native identifiers

To take advantage of many features, such as Easy Activation, multi-authentication delegation, and the sharedservices framework, developers need to set up a map in the server between your defined Entitlement ID and thenative identifiers on the platforms for which your app is distributed. The native platforms have no knowledge ofthe Entitlement ID; thus the mapping is needed for the operating systems to take over the actual function of theapp.

Native version identifiers: * wildcard allowed for blocking app

The SDK supports use of native version identifiers in keeping with the conventions described by the majorvendors. These same conventions apply to the use of the * wildcard in the server to deny apps by native version.

• Platform: AndroidpackageVersion• A string of the format major.minor.point with no explicit requirement to use integers, although this is implied

and followed by convention.• More information from Google

• Platform:iOSCFbundleVersion• A series of integers separated by ".". No explicit limit on number of words.• More information from Apple

The * character can be used in native version identifiers, but must always be preceded by a period (.) and must bethe last character in the native version string. Examples:

• Allowed: 2.3.*• Not allowed: 2.*.3• 2.* includes 2.*.*

Including BlackBerry Dynamics entitlement version metadata for the Shared Service FrameworkFor apps that provide a service used by other apps, which is based on the Shared Services Framework, you shouldinclude the BlackBerry Dynamics Entitlement Version number directly in the app's AndroidManifest.xmlso that the SDK routines that work with services can identify the required version of the service provider. Forbackground information, see BlackBerry Dynamics entitlement ID and entitlement version.

The AppKinetics and AppKinetics Save Edit Service sample apps include example files that illustrate thenecessary entry.

In AndroidManifest.xml for an app that provides a service, the BlackBerry Dynamics entitlement version iscalled out in a <meta-data> tag in the <app> block, as shown in the following snippet.

Note: For backward compatibility, the name of the key is GDApplicationVersion, not "entitlement version".The value is defined by you, as discussed in BlackBerry Dynamics entitlement ID and entitlement version.

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.good.gd.example.appkinetics [...] <app [...] <meta-data android:name="GDApplicationVersion" android:value ="your_value_here"/> </app>

 | Requirements | 15

Page 16: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

</manifest>

Important: In settings.json, the name/value pair required is: GDApplicationVersion. Be sure that thevalues are the same in both settings.json and AndroidManifest.xml files.

Setting preferences in config.xml for BlackBerry DynamicsIn config.xml you can set certain preferences, as detailed here.

GDApplicationID and version

"GD Application ID" and "GD application version" are older terminology for what are now known as "BlackBerryDynamics application ID" and "BlackBerry Dynamics application version". (The use of the older terminologyin some programming constructs in the SDK and elsewhere remains unchanged.) Add the following lines toconfig.xml to define your GDApplicationID and GDApplicationVersion:

<preference name="GDApplicationID" value="Your_Custom_Application_ID" /><preference name="GDApplicationVersion" value="Your_Custom_Application_Version" />

Enterprise Simulation Mode

To enable or disable enterprise simulation mode, you can use the following preference in config.xml:

<preference name="GDEnterpriseSimulationMode" value="true" />

Valid values for the value attribute are true and false.

iOS only: Enterprise Discovery Scheme

On iOS only, you need to set a preference for the required discovery scheme. For background, see BlackBerryDynamics entitlement ID and version.

<preference name="BBD_Enterprise_Discovery" value="true" />

Valid values for value are true and false.

iOS only: Face ID usage declaration

This preference allows you to switch off the automatic addition of the NSFaceIDUsageDescription property in theInfo.plist file. As a best practice, you should only prevent the automatic addition of the usage declaration if theapp uses Face ID for a purpose other than BlackBerry Dynamics integration.

<preference name="addFaceIDUsage" value="Off" />

Example settings in config.xml

Be sure to nest these preferences in the individual <platform name="ios"/> or <platform name="android"/>sections.

<?xml version='1.0' encoding='utf-8'?>

 | Requirements | 16

Page 17: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

<widget id="com.good.gd.example.pg.blank" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>Test Application</name> <description> A sample Apache Cordova application that responds to the deviceready event. </description> <content src="index.html" /> <plugin name="cordova-plugin-whitelist" spec="1" /> <access origin="*" /> <allow-intent href="http://*/*" /> <allow-intent href="https://*/*" /> <allow-intent href="tel:*" /> <allow-intent href="sms:*" /> <allow-intent href="mailto:*" /> <allow-intent href="geo:*" /> <preference name="GDEnterpriseSimulationMode" value="true" /> <preference name="GDApplicationID" value="com.good.gd.example.cdv.blank.new" /> <preference name="GDApplicationVersion" value="1.0.0.1" /> <preference name="BBD_Enterprise_Discovery" value="true" /> <platform name="android"> <allow-intent href="market:*" /> </platform> <platform name="ios"> <allow-intent href="itms:*" /> <allow-intent href="itms-apps:*" /> </platform></widget>

Custom icons

You can create custom default icons for BlackBerry Dynamics apps. For more information, see the cordova guide.

Restricted key prefixNote that the key prefix "blackberry" is reserved by BlackBerry and should not be used for key values, keyattributes, or key elements. For more information and examples, see the "Application Policies Definition" page inthe appendix of the BlackBerry Dynamics SDK API Reference for Android or iOS.

 | Requirements | 17

Page 18: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Steps to get started with the BlackBerry Dynamics SDKfor CordovaFollow the steps below to start working with the BlackBerry Dynamics SDK. You can also see Getting Started withthe BlackBerry Dynamics SDK for a step-by-step walkthrough of the stages of developing a BlackBerry Dynamicsapp.

1. Install the BlackBerry Dynamics SDK for Cordova .2. Familiarize yourself with the features of the BlackBerry Dynamics SDK.

• For general information, see BlackBerry Dynamics background.• To view code samples, see Sample apps.

3. Understand the Requirements and possible constraints on your programming.4. Become familiar with available classes and methods in the SDK programming reference.5. Add the desired plugins for your target platforms, add your own code, and build your app. See Using plug-ins to

enable your apps.6. Test your app, and if necessary, troubleshoot it. To help you troubleshoot issues, you can set up Logging and

diagnostics.7. Deploy your app. For options, see Ready your app for deployment.

Install the BlackBerry Dynamics SDK for CordovaRecommended sequence for installing required components for the BlackBerry Dynamics SDK for Cordova:Although you have several options with respect to the developer tools and environment you can use, especiallyif you are an experienced and proficient Android app developer, we recommend development on macOS (notWindows) and the following sequence of installation

1. Install Android SDK.2. Download and install the BlackBerry Dynamics SDK package.

• Extract the entire zip package to a project directory appropriate to your development environment.• You also need to install the base SDK for your target platform. See Install BlackBerry Dynamics SDK for

Android or BlackBerry Dynamics SDK for iOS.3. Install the Android SDK/ADT Bundle (optionally, Android Studio).4. Install Node.js. After installation the npm command is available in your terminal shell.

Install BlackBerry Dynamics SDK for Android or BlackBerry Dynamics SDK for iOSThe BlackBerry Dynamics SDK for Cordova requires that you install the BlackBerry Dynamics SDK for Android orBlackBerry Dynamics SDK for iOS, because Cordova relies on these.

• See the BlackBerry Dynamics SDK for Android Development Guide.• See the BlackBerry Dynamics SDK for iOS Development Guide.

Directory structure and available plug-insThe directory structure and available plug-ins of the BlackBerry Dynamics SDK for Cordova are annotated below.For more information about using the plug-ins, see Using plug-ins to enable your apps.

BlackBerry_Dynamics_for_Cordova_<version> Documentation/ plugins/

 | Steps to get started with the BlackBerry Dynamics SDK for Cordova | 18

Page 19: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

cordova-plugin-bbd-all # Enables all plugins cordova-plugin-bbd-appkinetics # Securely communicates between apps. Includes a README.md. cordova-plugin-bbd-application # Accesses globally available to any BlackBerry Dynamics app. # Includes a specific README.md. cordova-plugin-bbd-base # Sets up baseline parameters cordova-plugin-bbd-filetransfer # Downloads/uploads files from/to a remote server # Includes a specific README.md. cordova-plugin-bbd-httprequest # Sends HTTP requests over the internet. Encapsulates HTTP response # returned from a HttpRequest's send function. # Includes a specific README.md. cordova-plugin-bbd-interappcommunication # Returns information about a service provider app # Includes a specific README.md. cordova-plugin-bbd-mailto # Provides functionality to securely send emails with attachments cordova-plugin-bbd-push # Encapsulates the response returned from the GDPush class. Includes a specific README.md. cordova-plugin-bbd-serversideservices # Provides an ability to use BlackBerry Dynamics Server Based Services. # It returns all the needed information about service in JSON format. # Includes a specific README.md. cordova-plugin-bbd-socket # Implements the Secure Socket communications APIs. cordova-plugin-bbd-specificpolicies # Reads app-specific policy and returns it in JSON format # Includes a specific README.md. cordova-plugin-bbd-sqlite # Instantiates a secure database object for data manipulation. cordova-plugin-bbd-storage # Represents secure file system and secure storage. # Includes a specific README.md. cordova-plugin-bbd-tokenhelper # Requests token from server-side and processes the callback on the response. # Includes a specific README.md. cordova-plugin-bbd-xmlhttprequest # Instatiates a JavaScript object for an easy way to securely retrieve data from a URL without having to do a full page refresh # Includes a specific README.md. SampleApplications/ # Individual samples com.good.gd.example.pg.apachehttp com.good.gd.example.pg.appkinetics.client com.good.gd.example.pg.appkinetics.server com.good.gd.example.pg.blank com.good.gd.example.pg.mailto com.good.gd.example.pg.onprogress com.good.gd.example.pg.policy com.good.gd.example.pg.rssreader

 | Steps to get started with the BlackBerry Dynamics SDK for Cordova | 19

Page 20: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

com.good.gd.example.pg.sqlite com.good.gd.example.pg.unittest

 | Steps to get started with the BlackBerry Dynamics SDK for Cordova | 20

Page 21: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Using plug-ins to enable your appsThe BlackBerry Dynamics SDK for Cordova comes with Cordova-style plug-ins to enable your apps. Each plug-in represents a specific BlackBerry Dynamics feature. For a description of the available plug-ins, see Directorystructure and available plug-ins.

The plug-ins are available for local installation only. You cannot install them from NPM. The SDK includes the fullset of plug-ins, so you can install them by using the cordova command and specifying the file system path.

You can use the cordova-plugin-bbd-all plug-in to install all the plug-ins with a single command. You canadd plug-ins before or after you add a platform.

In Cordova app development, it is not necessary to use an IDE because Cordova provides command-line tools forcompiling, building, and running apps. Android Studio and Xcode are also supported.

Installing the Configure plug-inYou install the Configure plug-in before you install the Base plug-in. The Configure plug-in modifies the Base plug-in so that it can be added to your Cordova projects (for example, setting the paths of the home directories). TheBase plug-in adds the configuration that enables the BlackBerry Dynamics SDK in your app.

You have three options for installing the Configure plugin.

Option 1: Use the default installation path

Instead of specifying the SDK paths, use the following:

cordova plugin add <path_to_package>/BlackBerry_Dynamics_SDK_for_Cordova_<version>/plugins/cordova-plugin-bbd-configure

If you installed the BlackBerry Dynamics SDK for Android and BlackBerry Dynamics SDK for iOS in the defaultlocations, the Configure plug-in will use the default install path.

• If installed using the Android SDK Manager tool, the default location for the BlackBerry Dynamics SDK forAndroid is $ANDROID_HOME/extras/blackberry/dynamics_sdk/sdk. The ANDROID_HOME environmentvariable must be set.

• The default location for the BlackBerry Dynamics SDK for iOS is ~/Library/Application Support/BlackBerry/Good.platform/iOS/Frameworks/GD.framework.

Option 2: Specify explicit paths

Specify the explicit path for the BlackBerry Dynamics SDK for Android and the BlackBerry Dynamics SDK for iOS:

cordova plugin add <path_to_package>/BlackBerry_Dynamics_SDK_for_Cordova_<version>/plugins/cordova-plugin-bbd-configure--variable bbdSDKForAndroid="/Users/<user>/Downloads/gdsdk-release-<version>/sdk" --variable bbdSDKForiOS="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GD.framework"

Specify the explicit path for the BlackBerry Dynamics SDK for iOS and the automatic path for the BlackBerryDynamics SDK for Android:

 | Using plug-ins to enable your apps | 21

Page 22: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

cordova plugin add <path_to_package>/BlackBerry_Dynamics_SDK_for_Cordova_<version>/plugins/cordova-plugin-bbd-configure--variable bbdSDKForiOS="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GD.framework"

Option 3: Specify that one or more SDKs are not installed

Specify that the BlackBerry Dynamics SDK for Android is not installed:

cordova plugin add <path_to_package>/BlackBerry_Dynamics_SDK_for_Cordova_<version>/plugins/cordova-plugin-bbd-configure--variable bbdSDKForiOS="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GD.framework" --variable ignoreFailure="true"

Specify that the BlackBerry Dynamics SDK for iOS in not installed:

cordova plugin add <path_to_package>/BlackBerry_Dynamics_SDK_for_Cordova_<version>/plugins/cordova-plugin-bbd-configure--variable bbdSDKForAndroid="/Users/<user>/Downloads/gdsdk-release-<version>/sdk" --variable ignoreFailure="true"

Setting ignoreFailure="true" makes the Configure plug-in ignore errors that it encounters while processing explicitor automatic SDK paths. Use this option if you want to develop a Cordova app on one platform only, or if you usethe BlackBerry Dynamics SDK for one platform only.

The Base plug-inThe Base plug-in (cordova-plugin-bbd-base) is the main and most important plug-in because it adds theconfiguration that enables the BlackBerry Dynamics SDK in your app. All of the other plug-ins depend on the Baseplug-in.

The Base plug-in supports the "mailto:" URL scheme, RFC-2368 and RFC-6068, to allow the app user to composeemail messages. To create the email message, the app will use a secure email service provider such asBlackBerry Work, if available, or a native email application, if available and allowed by the enteprise policy.

By default, the Base plug-in does not support email attachments. You can add the MailTo plug-in (cordova-plugin-bbd-mailto) to enable email attachments.

Example: Adding the Base plug-in

cd BlackBerry_Dynamics_for_Cordova_<version>/plugins cordova create <CordovaApp> <my.company.package.name> <CordovaAppName> cd <CordovaApp> cordova plugin add ../cordova-plugin-bbd-base

Usage declaration for Face IDThe BlackBerry Dynamics SDK for iOS version 4.0.0 and later supports Face ID, a facial recognition featureavailable for some iOS devices. In the BlackBerry Dynamics profile in UEM or security policy in standalone GoodControl, the Face ID option is enabled by default. For more details about Face ID, see the BlackBerry DynamicsSDK for iOS API Reference.

BlackBerry Dynamics apps that use Face ID must declare usage of the Face ID capability. The Base plug-incan add a declaration of Face ID usage to an app by inserting the NSFaceIDUsageDescription property into theInfo.plist file with the value “Enables authentication without a password.”

 | Using plug-ins to enable your apps | 22

Page 23: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

The Base plug-in adds this declaration by default. To add the declaration manually, either globally or for the iOSplatform specifically, set the following preference in the root config.xml file:

<preference name="addFaceIDUsage" value="On" />

You can set the value to “Off” to prevent the automatic addition of the usage declaration. As a best practice, youshould only prevent the automatic addition of the usage declaration if the app uses Face ID for a purpose otherthan BlackBerry Dynamics integration.

Localized versions of the usage message are available as InfoPlist.strings files in cordova-plugin-bbd-base/src/ios/resources/Localization/. To add and use the localized strings, see About Information Property ListFiles.

Check the version of installed plug-insTo check the version of the plug-ins that you've installed, use either of the following commands:

• cordova plugins list

• cordova plugin

Security of Cordova localStorageTake note of the following items about the the security of localStorage in relation to GDSecureStorage. Formore information about GDSecureStorage, see the BlackBerry Dynamics API reference.

Item Description

UselocalStorage.getLength(), notlocalStorage.length

To get the length of GDSecureStorage, do not uselocalStorage.length. Use the following method instead:localStorage.getLength()

This method returns the size of "localStorage" (GDSecureStorage).

localStorage operationssecured by the SDK

• If you use localStorage.setItem(key, value) to write values tolocalStorage, it is stored in GDSecureStorage and is protected.

• If you use localStorage.getItem(key) to read values fromlocalStorage, it is read from GDSecureStorage.

• If you use localStorage.removeItem(key) to remove some valuefrom localStorage, it is removed from GDSecureStorage.

• If you use localStorage.key(index) to get the key by index fromlocalStorage, the key is retrieved from GDSecureStorage.

• If you use localStorage.clear() to clear localStorage,GDSecureStorage is cleared.

 | Using plug-ins to enable your apps | 23

Page 24: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Item Description

localStorage operations notsecured by the SDK

• If you write values to localStorage with localStorage[key] =value the value is not stored in GDSecureStorage and is not protected.It is stored in the native Storage object.

• If you read a value from localStorage with var value =localStorage[key] the value is not retrieved from GDSecureStoragebut from the native Storage object.

• If you use localStorage.length to get the size of localStorage,this returns the length of native Storage object, not the length ofGDSecureStorage. Use localStorage.getLength() instead.

 | Using plug-ins to enable your apps | 24

Page 25: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Sample appsSample app Description

ApacheHttp Demonstrates the use of the GDHTTPRequest plug-in APIs.

AppKinetics Client and Server Demonstrates how to use the file transfer service of the AppKinetics APIs.

Blank Provides an empty skeleton app that you can use as a starting point.

Mailto Demonstrates how to use the "mailto" service to send email.

OnProgress Demonstrates the proper usage of the "onprogress" event ofGDFileTransfer plugin APIs.

Policy Demonstrates how to use app-specific policies and server-side services.

RssReader Demonstrates how to use GDHTTPRequest and GDStorage APIs to fetchRSS feeds.

SQLite Demonstrates how to use secure storage APIs.

UnitTest Demonstrates how to use all APIs supported in this version of the SDK.

 | Sample apps | 25

Page 26: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Testing and troubleshooting

Automated test support library for iOSThe BlackBerry Dynamics SDK for iOS comes with an automated test support library. It's composed of sourcecode and documentation on its use.

See the installed directory:

~/Library/Application Support/BlackBerry/Good.platform/iOS/AutomatedTestSupport/

In addition use of the automated test support library is illustrated in the Sample apps in Objective-C.

Logging and diagnosticsThe processing activity of the BlackBerry Dynamics Runtime is logged by the runtime itself. The activity log iswritten to the BlackBerry Dynamics secure container on the device after deployment. You might be asked toprovide the log file to the BlackBerry Dynamics technical support team, but this is typically only necessary forcomplex support issues.

Log message categoriesMessages in the activity log are assigned to one of four categories:

• Errors: critical failures• Warnings: failures that arise but from which the BlackBerry Dynamics Runtime has recovered• Info: normal operational activity• Detailed: additional diagnostic information used for troubleshooting complex problems

You can configure the logging system to filter some or all messages. By default, only messages that belong to theErrors, Warnings, and Info categories are printed.

The logging locations on the IDE console and device container are configured differently and independently. Inprinciple, you control the console log and the BlackBerry UEM administrator controls the container log.

Configure detailed logging for the Xcode consoleMessages printed to the Xcode console are configured in the build targets of the app project. Different targetscan have different activity logging configurations. You can set logging to be detailed or selective. Changes tothe console logging configuration take effect the next time the target is built and run. Changes made to consolelogging do not affect the container log.

1. Open the app’s Info.plist file.2. Add a row with GDConsoleLogger as its key.3. Set String as the type of the new row.4. Set GDFilterNone as the value of the new row.

After you finish: In Xcode 9.3 or later, to view the detailed logs you must open the console app (from Xcode goto Window > Devices and Simulators, or from OSX go to Applications > Utilities > Console.app) and enable thefollowing settings in the Action menu:

• Include Info Messages• Include Debug Messages

 | Testing and troubleshooting | 26

Page 27: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Configure selective logging for the Xcode consoleIf there are multiple Info.plist files, check that you are editing the correct one by opening the Info tab of theapp target being built to make sure the new settings are there.

As with detailed logging, the console will only include log messages that are not in any of the categories specifiedin the Info.plist.

To set the target’s activity logging configuration to print a selection of message categories, do the following:

1. Open the app Info.plist file.2. Add a row with GDConsoleLogger as its key or change the existing row as follows:

a) Set Array as the type of the logger row.b) For each category you don’t want to include, add a row under the logger row as an item in the logger’s array.c) Set the item to type String.d) Set the value to one of the following:

• GDFilterDetailed• GDFilterInfo• GDFilterWarnings• GDFilterErrors

Configure logging in Good ControlYou can specify the message categories that are recorded in the container log file in the Good Controlmanagement console. To configure logging, you must be a Good Control administrator. Container logging can beset for a particular installation of the app provisioned for a specific user. Selective logging for the container is notsupported.

Changes that you make to container logging are effective immediately if the app is running and connected to theBlackBerry Dynamics infrastructure. Otherwise, changes are effective as soon as app does connect. Changes tocontainer logging have no effect on the adb logcatXcode logging.

The app can export or upload the container log file using the BlackBerry Dynamics API. For more information,see the function definitions in the GDFileSystem class reference in the BlackBerry Dynamics SDK for iOS APIReference.

GDLogManager class for log uploadingYou can use the GDLogManager class that is included with the BlackBerry Dynamics SDK to monitor app logfile uploads that are initiated by end users. This class does not manage or display information about log uploadsinitiated by the BlackBerry UEM administrator's policies or explicit actions.

The following samples that are delivered with the SDK illustrate how to use GDLogManager:

• Objective-C samples: RSSReader, BypassUnlock, GreetingsClient and GreetingsServer• Swift samples: all

GDLogManager's displayed information and functions include the following:

• Size of whole upload• Amount of data uploaded so far• Events that indicate the following states:

• Upload completed• Upload abandoned or canceled• Upload suspended• Upload resumed after suspension

 | Testing and troubleshooting | 27

Page 28: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

• Actions for managing a log upload:

• Cancel upload• Suspend upload• Resume upload

For more information, see GDLogManager in the BlackBerry Dynamics API reference.

When detailed logging is disabled by policy, calling any API in the GDLogManager class has no effect. It is a bestpractice to check the setting of this policy in the app configuration using the getApplicationConfig API. Ifdetailed logging is enabled, present the log upload progress UI or any other related UI.

 | Testing and troubleshooting | 28

Page 29: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Readying your app for deployment: server setupYou want to test your app on a BlackBerry server before you deploy it into production. You need to becomefamiliar with how to setup and configure such a server. You have options available: either BlackBerry UEM or theolder Good Control.

Check with your IT or other department to see what test servers might already be available in your organization.

BlackBerry UEM preferred

BlackBerry UEM is the primary server configuration to test and deploy your app. 

If you upgrade from Good Control to BlackBerry UEM, you not only get to use the great feature set that GoodControl provides but you also get to take advantage of an enhanced feature set such as:

• Support for more policies for operating systems• Better app management• More container types• Improved administration and provisioning• Advanced connectivity and networking• Expanded compliance and integrity checking• Additional email, content, location, and certificate features• Access to BlackBerry Web Services APIs

For information on how to use BlackBerry UEM to manage BlackBerry Dynamics apps, see the BlackBerryUEM Administration Guide.

Standalone Good Control

The standalone Good Control server is also available, but BlackBerry encourages you to use BlackBerryUEM for your tests and deployment. For information about getting started with Good Control, see DeveloperBootstrap: Good Control Essentials.

 | Readying your app for deployment: server setup | 29

Page 30: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

Legal notice©2018 BlackBerry Limited. Trademarks, including but not limited to BLACKBERRY, BBM, BES, EMBLEM Design,ATHOC, MOVIRTU and SECUSMART are the trademarks or registered trademarks of BlackBerry Limited, itssubsidiaries and/or affiliates, used under license, and the exclusive rights to such trademarks are expresslyreserved. All other trademarks are the property of their respective owners.

Android, Android Wear, Android Studio, Android SDK, Google, and Google Drive are trademarks of Google Inc. Samsung, Samsung Galaxy Note, Samsung Pass, Samsung Pass SDK and S5 are trademarks of SamsungElectronics Co., Ltd. Gradle is a trademark of Gradle Inc. Apache is a trademark of The Apache SoftwareFoundation. RSA is a trademark of RSA Security. Microsoft, Active Directory, and Windows are either registeredtrademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Xamarin is atrademark of Xamarin Inc. GitHub is a trademark of GitHub Inc. All other trademarks are the property of theirrespective owners.

iOS, Swift, OS X, Apple, and Xcode are trademarks of Apple Inc. Google Play is a trademark of Google Inc. RSAis a trademark of RSA Security. Microsoft, Active Directory, and Windows are either registered trademarks ortrademarks of Microsoft Corporation in the United States and/or other countries. GitHub is a trademark of GitHubInc. Xamarin is a trademark of Xamarin Inc. All other trademarks are the property of their respective owners.

Apache Cordova is a trademark of The Apache Software Foundation. iOS Android is a trademark of Google Inc. isa trademark of Cisco Systems, Inc. and/or its affiliates in the U.S. and certain other countries. iOS® is used underlicense by Apple Inc. RSA is a trademark of RSA Security. All other trademarks are the property of their respectiveowners.

This documentation including all documentation incorporated by reference herein such as documentationprovided or made available on the BlackBerry website provided or made accessible "AS IS" and "AS AVAILABLE"and without condition, endorsement, guarantee, representation, or warranty of any kind by BlackBerry Limited andits affiliated companies ("BlackBerry") and BlackBerry assumes no responsibility for any typographical, technical,or other inaccuracies, errors, or omissions in this documentation. In order to protect BlackBerry proprietary andconfidential information and/or trade secrets, this documentation may describe some aspects of BlackBerrytechnology in generalized terms. BlackBerry reserves the right to periodically change information that is containedin this documentation; however, BlackBerry makes no commitment to provide any such changes, updates,enhancements, or other additions to this documentation to you in a timely manner or at all.

This documentation might contain references to third-party sources of information, hardware or software,products or services including components and content such as content protected by copyright and/or third-party websites (collectively the "Third Party Products and Services"). BlackBerry does not control, and is notresponsible for, any Third Party Products and Services including, without limitation the content, accuracy,copyright compliance, compatibility, performance, trustworthiness, legality, decency, links, or any other aspectof Third Party Products and Services. The inclusion of a reference to Third Party Products and Services in thisdocumentation does not imply endorsement by BlackBerry of the Third Party Products and Services or the thirdparty in any way.

EXCEPT TO THE EXTENT SPECIFICALLY PROHIBITED BY APPLICABLE LAW IN YOUR JURISDICTION, ALLCONDITIONS, ENDORSEMENTS, GUARANTEES, REPRESENTATIONS, OR WARRANTIES OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY CONDITIONS, ENDORSEMENTS, GUARANTEES,REPRESENTATIONS OR WARRANTIES OF DURABILITY, FITNESS FOR A PARTICULAR PURPOSE OR USE,MERCHANTABILITY, MERCHANTABLE QUALITY, NON-INFRINGEMENT, SATISFACTORY QUALITY, OR TITLE, ORARISING FROM A STATUTE OR CUSTOM OR A COURSE OF DEALING OR USAGE OF TRADE, OR RELATED TO THEDOCUMENTATION OR ITS USE, OR PERFORMANCE OR NON-PERFORMANCE OF ANY SOFTWARE, HARDWARE,SERVICE, OR ANY THIRD PARTY PRODUCTS AND SERVICES REFERENCED HEREIN, ARE HEREBY EXCLUDED.YOU MAY ALSO HAVE OTHER RIGHTS THAT VARY BY STATE OR PROVINCE. SOME JURISDICTIONS MAYNOT ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES AND CONDITIONS. TO THE EXTENTPERMITTED BY LAW, ANY IMPLIED WARRANTIES OR CONDITIONS RELATING TO THE DOCUMENTATION TO

 | Legal notice | 30

Page 31: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

THE EXTENT THEY CANNOT BE EXCLUDED AS SET OUT ABOVE, BUT CAN BE LIMITED, ARE HEREBY LIMITED TONINETY (90) DAYS FROM THE DATE YOU FIRST ACQUIRED THE DOCUMENTATION OR THE ITEM THAT IS THESUBJECT OF THE CLAIM.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION, IN NO EVENT SHALLBLACKBERRY BE LIABLE FOR ANY TYPE OF DAMAGES RELATED TO THIS DOCUMENTATION OR ITS USE,OR PERFORMANCE OR NON-PERFORMANCE OF ANY SOFTWARE, HARDWARE, SERVICE, OR ANY THIRDPARTY PRODUCTS AND SERVICES REFERENCED HEREIN INCLUDING WITHOUT LIMITATION ANY OF THEFOLLOWING DAMAGES: DIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, INDIRECT, SPECIAL, PUNITIVE,OR AGGRAVATED DAMAGES, DAMAGES FOR LOSS OF PROFITS OR REVENUES, FAILURE TO REALIZE ANYEXPECTED SAVINGS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, LOSS OF BUSINESSOPPORTUNITY, OR CORRUPTION OR LOSS OF DATA, FAILURES TO TRANSMIT OR RECEIVE ANY DATA,PROBLEMS ASSOCIATED WITH ANY APPLICATIONS USED IN CONJUNCTION WITH BLACKBERRY PRODUCTS ORSERVICES, DOWNTIME COSTS, LOSS OF THE USE OF BLACKBERRY PRODUCTS OR SERVICES OR ANY PORTIONTHEREOF OR OF ANY AIRTIME SERVICES, COST OF SUBSTITUTE GOODS, COSTS OF COVER, FACILITIES ORSERVICES, COST OF CAPITAL, OR OTHER SIMILAR PECUNIARY LOSSES, WHETHER OR NOT SUCH DAMAGESWERE FORESEEN OR UNFORESEEN, AND EVEN IF BLACKBERRY HAS BEEN ADVISED OF THE POSSIBILITY OFSUCH DAMAGES.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION, BLACKBERRY SHALLHAVE NO OTHER OBLIGATION, DUTY, OR LIABILITY WHATSOEVER IN CONTRACT, TORT, OR OTHERWISE TOYOU INCLUDING ANY LIABILITY FOR NEGLIGENCE OR STRICT LIABILITY.

THE LIMITATIONS, EXCLUSIONS, AND DISCLAIMERS HEREIN SHALL APPLY: (A) IRRESPECTIVE OF THE NATUREOF THE CAUSE OF ACTION, DEMAND, OR ACTION BY YOU INCLUDING BUT NOT LIMITED TO BREACH OFCONTRACT, NEGLIGENCE, TORT, STRICT LIABILITY OR ANY OTHER LEGAL THEORY AND SHALL SURVIVE AFUNDAMENTAL BREACH OR BREACHES OR THE FAILURE OF THE ESSENTIAL PURPOSE OF THIS AGREEMENTOR OF ANY REMEDY CONTAINED HEREIN; AND (B) TO BLACKBERRY AND ITS AFFILIATED COMPANIES, THEIRSUCCESSORS, ASSIGNS, AGENTS, SUPPLIERS (INCLUDING AIRTIME SERVICE PROVIDERS), AUTHORIZEDBLACKBERRY DISTRIBUTORS (ALSO INCLUDING AIRTIME SERVICE PROVIDERS) AND THEIR RESPECTIVEDIRECTORS, EMPLOYEES, AND INDEPENDENT CONTRACTORS.

IN ADDITION TO THE LIMITATIONS AND EXCLUSIONS SET OUT ABOVE, IN NO EVENT SHALL ANY DIRECTOR,EMPLOYEE, AGENT, DISTRIBUTOR, SUPPLIER, INDEPENDENT CONTRACTOR OF BLACKBERRY OR ANYAFFILIATES OF BLACKBERRY HAVE ANY LIABILITY ARISING FROM OR RELATED TO THE DOCUMENTATION.

Prior to subscribing for, installing, or using any Third Party Products and Services, it is your responsibility toensure that your airtime service provider has agreed to support all of their features. Some airtime serviceproviders might not offer Internet browsing functionality with a subscription to the BlackBerry® Internet Service.Check with your service provider for availability, roaming arrangements, service plans and features. Installationor use of Third Party Products and Services with BlackBerry's products and services may require one or morepatent, trademark, copyright, or other licenses in order to avoid infringement or violation of third party rights. Youare solely responsible for determining whether to use Third Party Products and Services and if any third partylicenses are required to do so. If required you are responsible for acquiring them. You should not install or useThird Party Products and Services until all necessary licenses have been acquired. Any Third Party Products andServices that are provided with BlackBerry's products and services are provided as a convenience to you and areprovided "AS IS" with no express or implied conditions, endorsements, guarantees, representations, or warrantiesof any kind by BlackBerry and BlackBerry assumes no liability whatsoever, in relation thereto. Your use of ThirdParty Products and Services shall be governed by and subject to you agreeing to the terms of separate licensesand other agreements applicable thereto with third parties, except to the extent expressly covered by a license orother agreement with BlackBerry.

The terms of use of any BlackBerry product or service are set out in a separate license or other agreement withBlackBerry applicable thereto. NOTHING IN THIS DOCUMENTATION IS INTENDED TO SUPERSEDE ANY EXPRESSWRITTEN AGREEMENTS OR WARRANTIES PROVIDED BY BLACKBERRY FOR PORTIONS OF ANY BLACKBERRYPRODUCT OR SERVICE OTHER THAN THIS DOCUMENTATION.

 | Legal notice | 31

Page 32: BlackBerry Dynamics SDK for Cordova Development Guide€¦ · About this guide This guide is an introduction to the BlackBerry Dynamics software development kit (SDK) for Cordova.

BlackBerry Enterprise Software incorporates certain third-party software. The license and copyright informationassociated with this software is available at http://worldwide.blackberry.com/legal/thirdpartysoftware.jsp.

BlackBerry Limited2200 University Avenue EastWaterloo, OntarioCanada N2K 0A7

BlackBerry UK Limited200 Bath RoadSlough, Berkshire SL1 3XEUnited Kingdom

Published in Canada

 | Legal notice | 32