Installing the Configure plug-in
You 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). The Base plug-in adds the configuration that enables the BlackBerry Dynamics SDK
in your app.The Configure plug-in also performs a check to determine whether you are using a supported version of
Cordova
. You have three options for installing the Configure plugin.
- If you are using aWindowscomputer, it is recommended that you run the commands below fromWindows PowerShellinstead of the standard command prompt.
- TheBlackBerry Dynamics SDK for Cordovaversion 6.0 and later uses the .aar distribution of theBlackBerry Dynamics SDK for Android, located by default in /Users/<user>/Downloads/gdsdk-release-<version>/m2repository (for more information, see Integrating the BlackBerry Dynamics SDK in .aar format). Previous versions used the default path /Users/<user>/Downloads/gdsdk-release-<version>/sdk. If the old path is used in the Configure plug-in installation command, it will be converted to the new m2repository path automatically.
Option 1: Use the default installation paths for the BlackBerry Dynamics SDK for Android and iOS
BlackBerry Dynamics SDK
for Android
and iOS
This option is recommended if you installed both the
BlackBerry Dynamics SDK for Android
and the BlackBerry Dynamics SDK for iOS
. Use the following command to use the default installation paths for the SDKs:cordova plugin add <package_path>/BlackBerry_Dynamics_SDK_for_Cordova_<version>/ plugins/cordova-plugin-bbd-configure
The default installation path for the
BlackBerry Dynamics SDK for Android
(as installed by the Android
SDK Manager) is $ANDROID_SDK_ROOT/extras/blackberry/dynamics_sdk/m2repository/. The ANDROID_SDK_ROOT environment variable must be set.The environment variable ANDROID_SDK_ROOT replaces ANDROID_HOME, which was deprecated in
BlackBerry Dynamics SDK for Cordova
version 7.0. For more information, see Android Studio: Environment variables. If you continue to use ANDROID_HOME, note the following:
- If ANDROID_HOME is defined and contains a valid SDK installation, the value defined for ANDROID_HOME is used instead of the value defined for ANDROID_SDK_ROOT.
- If a value is not defined for ANDROID_HOME, the value defined for ANDROID_SDK_ROOT is used.
- If a value for ANDROID_HOME is defined but does not exist or does not contain a valid SDK installation, the value defined for ANDROID_SDK_ROOT is used.
The default installation path for the
BlackBerry Dynamics SDK for iOS
is ~/Library/Application\ Support/BlackBerry/Good.platform/iOS/Frameworks/GD.framework.When using this option on a
macOS
computer, the Configure plug-in will use the default installation path for the SDK for Android
and the SDK for iOS
. On a Windows
computer, the Configure plug-in will use the default installation path for the SDK for Android
and no action is taken for the SDK for iOS
(iOS
development is not supported on Windows
). Option 2: Specify the explicit installation paths for the BlackBerry Dynamics SDK for Android and iOS
BlackBerry Dynamics SDK
for Android
and iOS
Use this option to specify the explicit installation path for the
BlackBerry Dynamics SDK for Android
and the BlackBerry Dynamics SDK for iOS
:cordova plugin add <package_path>/BlackBerry_Dynamics_SDK_for_Cordova_<version>/ plugins/cordova-plugin-bbd-configure --variable bbdSDKForAndroid="/Users/<user>/ Downloads/gdsdk-release-<version>/m2repository" --variable bbdSDKForiOS= "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/ SDKs/iPhoneOS.sdk/System/Library/Frameworks/GD.framework"
The following example uses the explicit path for the
BlackBerry Dynamics SDK for iOS
and the default installation path for the BlackBerry Dynamics SDK for Android
(see option 1):cordova plugin add <package_path>/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: Install the Configure plug-in for a specific platform only
Use this option if you have installed the
BlackBerry Dynamics SDK
for one platform only (Android
or iOS
), or if you want to install the Configure plug-in again and you do not want to override or change the previous installation of the plug-in for a specific platform.With this option, you can use the default installation path (option 1) or the explicit installation path (option 2) for the
BlackBerry Dynamics SDK
for Android
or iOS
. Use the bbdSDKForAndroid
or bbdSDKForiOS
variable with an empty value for the SDK platform that you do not want to install the Configure plug-in for.Use this command to install the Configure plug-in for the
BlackBerry Dynamics SDK for iOS
only:cordova plugin add <package_path>/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 bbdSDKForAndroid=""
Use this command to install the Configure plug-in for the
BlackBerry Dynamics SDK for Android
only:cordova plugin add <package_path>/BlackBerry_Dynamics_SDK_for_Cordova_<version>/ plugins/cordova-plugin-bbd-configure --variable bbdSDKForAndroid= "/Users/<user>/Downloads/gdsdk-release-<version>/m2repository" --variable bbdSDKForiOS=""
In the
BlackBerry Dynamics SDK for Cordova
version 6.0 and later, the ignoreFailure
variable that was used in previous versions of the SDK is no longer supported.