Skip to content

Commit

Permalink
Merge pull request #37 from taras-omelchuk/capacitor-base
Browse files Browse the repository at this point in the history
Updates for v12.0 release
  • Loading branch information
volodymyrtaliar committed Nov 16, 2023
2 parents 3b62ff6 + a0f1e9b commit 30a67b5
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ All the other BlackBerry Dynamics Cordova plugins require the Capacitor Base plu
- We recommend to use the latest stable version of Node.js 18.x (LTS).

#### Ionic
- Ionic 6
- Ionic 6, 7
- `--type=ionic-angular`
- `--type=ionic-react`
- `--type=ionic-vue`
Expand All @@ -25,10 +25,12 @@ All the other BlackBerry Dynamics Cordova plugins require the Capacitor Base plu
BlackBerry Dynamics SDK for iOS
- BlackBerry Dynamics SDK for iOS v11.1, check environment requirements [here](https://docs.blackberry.com/en/development-tools/blackberry-dynamics-sdk-ios/11_1).
- BlackBerry Dynamics SDK for iOS v11.2, check environment requirements [here](https://docs.blackberry.com/en/development-tools/blackberry-dynamics-sdk-ios/11_2).
- BlackBerry Dynamics SDK for iOS v12.0, check environment requirements [here](https://docs.blackberry.com/en/development-tools/blackberry-dynamics-sdk-ios/12_0).

BlackBerry Dynamics SDK for Android
BlackBerry Dynamics SDK for Android:
- BlackBerry Dynamics SDK for Android v11.1, check environment requirements [here](https://docs.blackberry.com/en/development-tools/blackberry-dynamics-sdk-android/11_1).
- BlackBerry Dynamics SDK for Android v11.2, check environment requirements [here](https://docs.blackberry.com/en/development-tools/blackberry-dynamics-sdk-android/11_2).
- BlackBerry Dynamics SDK for Android v12.0, check environment requirements [here](https://docs.blackberry.com/en/development-tools/blackberry-dynamics-sdk-android/12_0).

## Preconditions

Expand All @@ -42,15 +44,15 @@ Dynamics SDK for iOS and Android are installed as part of the `capacitor-plugin-
### BlackBerry Dynamics SDK for iOS integration
The integration uses the iOS "Dynamic Framework" version of BlackBerry Dynamics as the static library is no longer supported.
There are a few options to integrate BlackBerry Dynamics SDK for iOS.
#### Using default (11.1) released version - default
By default, `cordova-plugin-bbd-base` plugin will integrate **11.1** (11.1.0.62) version BlackBerry Dynamics SDK for iOS using following podspec: `https://software.download.blackberry.com/repository/framework/dynamics/ios/11.1.0.62/BlackBerryDynamics-11.1.0.62.podspec`.
#### Using default (12.0) released version - default
By default, `capacitor-plugin-bbd-base` plugin will integrate **12.0** (12.0.1.79) version BlackBerry Dynamics SDK for iOS using following podspec: `https://software.download.blackberry.com/repository/framework/dynamics/ios/12.0.1.79/BlackBerryDynamics-12.0.1.79.podspec`.
> NOTE: If one of the below integration methods was used there is an option to reset **default** configuration by running following command:
`$ npx set-dynamics-podspec --default`
`$ ionic cap build ios`

#### Using other released version
There is possibility to integrate other released build of BlackBerry Dynamics SDK for iOS.
Currently, the **latest** supported versions is 11.2.
Currently, the **other** supported versions are 11.1 and 11.2.
Following command should be run to use BlackBerry Dynamics SDK for iOS v11.2:
```
$ npx set-dynamics-podspec --url "https://software.download.blackberry.com/repository/framework/dynamics/ios/11.2.0.26/BlackBerryDynamics-11.2.0.26.podspec"
Expand All @@ -64,10 +66,10 @@ $ npx set-dynamics-podspec --path "/Users/<user>/Downloads/gdsdk-release-dylib-X
$ ionic cap build ios
```
### BlackBerry Dynamics SDK for Android integration
By default, `capacitor-plugin-bbd-base` plugin will integrate **11.1** (11.1.0.62) version of BlackBerry Dynamics SDK for Android.
By default, `capacitor-plugin-bbd-base` plugin will integrate **12.0** (12.0.1.79) version of BlackBerry Dynamics SDK for Android.
#### Using other released version
There is possibility to integrate other released build of BlackBerry Dynamics SDK for Android.
Currently, the **latest** supported versions is 11.2.
Currently, the **other** supported versions are 11.1 and 11.2.
Following steps should be done to use BlackBerry Dynamics SDK for Android v11.2:
- download `capacitor-plugin-bbd-base` from Github as ZIP
- unzip downloaded "BlackBerry-Dynamics-Cordova-Plugins-capacitor-base.zip" and move it to `<path>/BlackBerry_Dynamics_SDK_for_Cordova_vX.X.X.X/plugins/`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "capacitor-plugin-bbd-base",
"type": "module",
"version": "1.1.0",
"dynamicsPodSpec": "https://software.download.blackberry.com/repository/framework/dynamics/ios/11.1.0.62/BlackBerryDynamics-11.1.0.62.podspec",
"dynamicsPodSpec": "https://software.download.blackberry.com/repository/framework/dynamics/ios/12.0.1.79/BlackBerryDynamics-12.0.1.79.podspec",
"description": "BlackBerry Dynamics Capacitor Base plugin.",
"license": "SEE LICENSE IN LICENSE",
"homepage": "https://community.blackberry.com",
Expand Down
8 changes: 4 additions & 4 deletions scripts/gradle/bbd.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ext {
allprojects {
repositories {
google()
jcenter()
mavenCentral()

maven { url 'https://software.download.blackberry.com/repository/maven' }

Expand All @@ -40,9 +40,9 @@ allprojects {
}

dependencies {
implementation 'com.blackberry.blackberrydynamics:android_handheld_platform:11.1.0.62'
implementation 'com.blackberry.blackberrydynamics:android_handheld_backup_support:11.1.0.62'
implementation 'com.blackberry.blackberrydynamics:android_webview:11.1.0.62'
implementation 'com.blackberry.blackberrydynamics:android_handheld_platform:12.0.1.79'
implementation 'com.blackberry.blackberrydynamics:android_handheld_backup_support:12.0.1.79'
implementation 'com.blackberry.blackberrydynamics:android_webview:12.0.1.79'

implementation 'androidx.legacy:legacy-support-v4:1.0.0'

Expand Down
2 changes: 2 additions & 0 deletions scripts/hooks/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const notificationCenter = `NotificationCenter.default.addObserver(self, selecto
const requireHelperPhrase = "require_relative '../../node_modules/" +
"capacitor-plugin-bbd-base/scripts/hooks/ios/update_deployment_target.rb'" +
"\n";
const capacitorPodsHelperPhrase = `require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'`;
const targetVersion = '15.0';
const postInstallPhrase = [
`post_install do |installer|`,
Expand Down Expand Up @@ -261,6 +262,7 @@ export {
registerGDStateChangeHandler,
notificationCenter,
requireHelperPhrase,
capacitorPodsHelperPhrase,
postInstallPhrase,
assertDeploymentTargetReplacePhrase,
headers,
Expand Down
7 changes: 6 additions & 1 deletion scripts/hooks/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
registerGDStateChangeHandler,
notificationCenter,
requireHelperPhrase,
capacitorPodsHelperPhrase,
postInstallPhrase,
assertDeploymentTargetReplacePhrase,
headers,
Expand Down Expand Up @@ -144,7 +145,11 @@ export const addAssertDeploymentTarget = (capacitorPodFile) => {
}

if (!podFileContent.includes(requireHelperPhrase) && !podFileContent.includes(postInstallPhrase)) {
podFileContent = requireHelperPhrase + podFileContent + postInstallPhrase;
podFileContent = podFileContent + postInstallPhrase;
podFileContent = podFileContent.replace(
capacitorPodsHelperPhrase,
`${capacitorPodsHelperPhrase}\n${requireHelperPhrase}`
);
fs.writeFileSync(capacitorPodFile, podFileContent, 'utf-8');
}
}
Expand Down

0 comments on commit 30a67b5

Please sign in to comment.