diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b19a7b16..2e807ccb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: key: dependency-cache-${{ hashFiles('package.json', '*/package.json') }} - run: npm install - id: files - uses: dwieeb/get-changed-files@main + uses: imhoffd/get-changed-files@v2 with: format: 'json' - id: packages @@ -38,7 +38,7 @@ jobs: with: files: ${{ steps.files.outputs.all }} lint: - runs-on: macOS + runs-on: macos-latest timeout-minutes: 30 needs: - setup @@ -58,7 +58,7 @@ jobs: - run: npm install - run: npm run lint verify-ios: - runs-on: macOS + runs-on: macos-latest if: needs.setup.outputs.plugins != '[]' timeout-minutes: 30 needs: @@ -136,7 +136,7 @@ jobs: - run: npm run verify:web working-directory: ${{ matrix.plugin }} # deploy: -# runs-on: macOS +# runs-on: macos-latest # if: github.event_name == 'push' && github.ref == 'refs/heads/main' # timeout-minutes: 30 # needs: diff --git a/.github/workflows/needs-reply.yml b/.github/workflows/needs-reply.yml index 974d666b1..5426890e8 100644 --- a/.github/workflows/needs-reply.yml +++ b/.github/workflows/needs-reply.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Close old issues that need reply - uses: dwieeb/needs-reply@master + uses: imhoffd/needs-reply@v2 with: repo-token: ${{ secrets.BOT_TOKEN }} issue-label: 'needs reply' diff --git a/action-sheet/CHANGELOG.md b/action-sheet/CHANGELOG.md index 52aa347f7..341e42bfb 100644 --- a/action-sheet/CHANGELOG.md +++ b/action-sheet/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.4.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/action-sheet@0.4.3...@capacitor/action-sheet@0.4.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/action-sheet + + + + + ## [0.4.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/action-sheet@0.4.2...@capacitor/action-sheet@0.4.3) (2021-02-10) **Note:** Version bump only for package @capacitor/action-sheet diff --git a/action-sheet/README.md b/action-sheet/README.md index 05777f761..9069e0132 100644 --- a/action-sheet/README.md +++ b/action-sheet/README.md @@ -13,7 +13,7 @@ npx cap sync This plugin will use the following project variables (defined in your app's `variables.gradle` file): -- `$androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.3.0-rc01`) +- `$androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.3.0`) ## Example diff --git a/action-sheet/android/build.gradle b/action-sheet/android/build.gradle index 4ede1fedd..71de89f27 100644 --- a/action-sheet/android/build.gradle +++ b/action-sheet/android/build.gradle @@ -1,7 +1,7 @@ ext { junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.1' androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2.0' - androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.3.0-rc01' + androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.3.0' androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.2' androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.3.0' } diff --git a/action-sheet/package.json b/action-sheet/package.json index 27508492e..fd556efca 100644 --- a/action-sheet/package.json +++ b/action-sheet/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/action-sheet", - "version": "0.4.3", + "version": "0.4.4", "description": "The Action Sheet API provides access to native Action Sheets, which come up from the bottom of the screen and display actions a user can take.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/app-launcher/CHANGELOG.md b/app-launcher/CHANGELOG.md index 7775972ff..9645253dd 100644 --- a/app-launcher/CHANGELOG.md +++ b/app-launcher/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.5.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/app-launcher@0.5.3...@capacitor/app-launcher@0.5.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/app-launcher + + + + + ## [0.5.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/app-launcher@0.5.2...@capacitor/app-launcher@0.5.3) (2021-02-10) **Note:** Version bump only for package @capacitor/app-launcher diff --git a/app-launcher/package.json b/app-launcher/package.json index d406647d5..067acc4b3 100644 --- a/app-launcher/package.json +++ b/app-launcher/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/app-launcher", - "version": "0.5.3", + "version": "0.5.4", "description": "The AppLauncher API allows to open other apps", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.2", "rollup": "^2.32.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/app/CHANGELOG.md b/app/CHANGELOG.md index 252c72b5c..d608b363b 100644 --- a/app/CHANGELOG.md +++ b/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.3.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/app@0.3.3...@capacitor/app@0.3.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/app + + + + + ## [0.3.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/app@0.3.2...@capacitor/app@0.3.3) (2021-02-10) **Note:** Version bump only for package @capacitor/app diff --git a/app/package.json b/app/package.json index 1118f86ee..1f9c3e3d6 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/app", - "version": "0.3.3", + "version": "0.3.4", "description": "The App API handles high level App state and events.For example, this API emits events when the app enters and leaves the foreground, handles deeplinks, opens other apps, and manages persisted plugin state.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/browser/CHANGELOG.md b/browser/CHANGELOG.md index c6eb24219..b1b1f4084 100644 --- a/browser/CHANGELOG.md +++ b/browser/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.4.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/browser@0.4.3...@capacitor/browser@0.4.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/browser + + + + + ## [0.4.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/browser@0.4.2...@capacitor/browser@0.4.3) (2021-02-10) **Note:** Version bump only for package @capacitor/browser diff --git a/browser/package.json b/browser/package.json index 254c48876..3d20c5b93 100644 --- a/browser/package.json +++ b/browser/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/browser", - "version": "0.4.3", + "version": "0.4.4", "description": "The Browser API provides the ability to open an in-app browser and subscribe to browser events.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/camera/CHANGELOG.md b/camera/CHANGELOG.md index d54024a55..45efdca7d 100644 --- a/camera/CHANGELOG.md +++ b/camera/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.4.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/camera@0.4.0...@capacitor/camera@0.4.1) (2021-02-27) + +**Note:** Version bump only for package @capacitor/camera + + + + + # [0.4.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/camera@0.3.2...@capacitor/camera@0.4.0) (2021-02-10) diff --git a/camera/README.md b/camera/README.md index f38fa68d2..936b7c96b 100644 --- a/camera/README.md +++ b/camera/README.md @@ -39,7 +39,7 @@ Additionally, because the Camera API launches a separate Activity to handle taki This plugin will use the following project variables (defined in your app's `variables.gradle` file): - `$androidxExifInterfaceVersion`: version of `androidx.exifinterface:exifinterface` (default: `1.3.2`) -- `$androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.3.0-rc01`) +- `$androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.3.0`) ## PWA Notes diff --git a/camera/android/build.gradle b/camera/android/build.gradle index b88a9c76b..6616a81c0 100644 --- a/camera/android/build.gradle +++ b/camera/android/build.gradle @@ -4,7 +4,7 @@ ext { androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.3.0' androidxExifInterfaceVersion = project.hasProperty('androidxExifInterfaceVersion') ? rootProject.ext.androidxExifInterfaceVersion : '1.3.2' androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.2' - androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.3.0-rc01' + androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.3.0' } buildscript { diff --git a/camera/android/src/main/java/com/capacitorjs/plugins/camera/CameraPlugin.java b/camera/android/src/main/java/com/capacitorjs/plugins/camera/CameraPlugin.java index 9c03484d9..f6f1b88dc 100644 --- a/camera/android/src/main/java/com/capacitorjs/plugins/camera/CameraPlugin.java +++ b/camera/android/src/main/java/com/capacitorjs/plugins/camera/CameraPlugin.java @@ -140,7 +140,7 @@ private void showPhotos(final PluginCall call) { private boolean checkCameraPermissions(PluginCall call) { // if the manifest does not contain the camera permissions key, we don't need to ask the user - boolean needCameraPerms = hasDefinedPermissions(new String[] { Manifest.permission.CAMERA }); + boolean needCameraPerms = isPermissionDeclared(CAMERA); boolean hasCameraPerms = !needCameraPerms || getPermissionState(CAMERA) == PermissionState.GRANTED; boolean hasPhotoPerms = getPermissionState(PHOTOS) == PermissionState.GRANTED; @@ -484,7 +484,7 @@ public void requestPermissions(PluginCall call) { // If the camera permission is defined in the manifest, then we have to prompt the user // or else we will get a security exception when trying to present the camera. If, however, // it is not defined in the manifest then we don't need to prompt and it will just work. - if (hasDefinedPermissions(new String[] { Manifest.permission.CAMERA })) { + if (isPermissionDeclared(CAMERA)) { // just request normally super.requestPermissions(call); } else { @@ -511,7 +511,7 @@ public Map getPermissionStates() { Map permissionStates = super.getPermissionStates(); // If Camera is not in the manifest and therefore not required, say the permission is granted - if (!hasDefinedPermissions(new String[] { Manifest.permission.CAMERA })) { + if (!isPermissionDeclared(CAMERA)) { permissionStates.put(CAMERA, PermissionState.GRANTED); } diff --git a/camera/package.json b/camera/package.json index 185970919..fe5e0c9bd 100644 --- a/camera/package.json +++ b/camera/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/camera", - "version": "0.4.0", + "version": "0.4.1", "description": "The Camera API provides the ability to take a photo with the camera or choose an existing one from the photo album.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/clipboard/CHANGELOG.md b/clipboard/CHANGELOG.md index ae577728e..d3d16d732 100644 --- a/clipboard/CHANGELOG.md +++ b/clipboard/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.4.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/clipboard@0.4.3...@capacitor/clipboard@0.4.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/clipboard + + + + + ## [0.4.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/clipboard@0.4.2...@capacitor/clipboard@0.4.3) (2021-02-10) **Note:** Version bump only for package @capacitor/clipboard diff --git a/clipboard/package.json b/clipboard/package.json index eebb1ee43..10b1c0cce 100644 --- a/clipboard/package.json +++ b/clipboard/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/clipboard", - "version": "0.4.3", + "version": "0.4.4", "description": "The Clipboard API enables copy and pasting to/from the system clipboard.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/device/CHANGELOG.md b/device/CHANGELOG.md index 4d8bf7c71..c0e1f83f0 100644 --- a/device/CHANGELOG.md +++ b/device/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.5.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/device@0.5.3...@capacitor/device@0.5.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/device + + + + + ## [0.5.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/device@0.5.2...@capacitor/device@0.5.3) (2021-02-10) **Note:** Version bump only for package @capacitor/device diff --git a/device/package.json b/device/package.json index e0c885f1d..c62959265 100644 --- a/device/package.json +++ b/device/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/device", - "version": "0.5.3", + "version": "0.5.4", "description": "The Device API exposes internal information about the device, such as the model and operating system version, along with user information such as unique ids.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -45,10 +45,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -60,11 +60,11 @@ "rollup": "^2.29.0", "swiftlint": "^1.0.1", "ts-node": "^9.1.1", - "typescript": "~4.0.3", + "typescript": "~4.1.5", "uvu": "^0.5.1" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/dialog/CHANGELOG.md b/dialog/CHANGELOG.md index 8a987f530..560940ed5 100644 --- a/dialog/CHANGELOG.md +++ b/dialog/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.4.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/dialog@0.4.3...@capacitor/dialog@0.4.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/dialog + + + + + ## [0.4.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/dialog@0.4.2...@capacitor/dialog@0.4.3) (2021-02-10) **Note:** Version bump only for package @capacitor/dialog diff --git a/dialog/package.json b/dialog/package.json index f907f8143..e2019a684 100644 --- a/dialog/package.json +++ b/dialog/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/dialog", - "version": "0.4.3", + "version": "0.4.4", "description": "The Dialog API provides methods for triggering native dialog windows for alerts, confirmations, and input prompts", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/filesystem/CHANGELOG.md b/filesystem/CHANGELOG.md index 20ecad208..ae9e1cd50 100644 --- a/filesystem/CHANGELOG.md +++ b/filesystem/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.5.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/filesystem@0.4.0...@capacitor/filesystem@0.5.0) (2021-02-27) + + +### Bug Fixes + +* **filesystem:** is not requesting permission on public directories ([#246](https://github.com/ionic-team/capacitor-plugins/issues/246)) ([aa897ab](https://github.com/ionic-team/capacitor-plugins/commit/aa897ab4269e34cd5d762ed645030054ddda7dd6)) + + +### Features + +* **filesystem:** Allow the use of absolute urls on iOS and web ([#250](https://github.com/ionic-team/capacitor-plugins/issues/250)) ([03ad97c](https://github.com/ionic-team/capacitor-plugins/commit/03ad97c1b7450e864504198853aac2b3bdc4b8a4)) + + + + + # [0.4.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/filesystem@0.3.2...@capacitor/filesystem@0.4.0) (2021-02-10) diff --git a/filesystem/android/src/main/java/com/capacitorjs/plugins/filesystem/FilesystemPlugin.java b/filesystem/android/src/main/java/com/capacitorjs/plugins/filesystem/FilesystemPlugin.java index 68a00c5b7..92f714eae 100644 --- a/filesystem/android/src/main/java/com/capacitorjs/plugins/filesystem/FilesystemPlugin.java +++ b/filesystem/android/src/main/java/com/capacitorjs/plugins/filesystem/FilesystemPlugin.java @@ -52,7 +52,7 @@ public void readFile(PluginCall call) { return; } - if (!isPublicDirectory(directory) && !isStoragePermissionGranted()) { + if (isPublicDirectory(directory) && !isStoragePermissionGranted()) { requestAllPermissions(call, "permissionCallback"); } else { try { @@ -90,7 +90,7 @@ public void writeFile(PluginCall call) { String directory = getDirectoryParameter(call); if (directory != null) { - if (!isPublicDirectory(directory) && !isStoragePermissionGranted()) { + if (isPublicDirectory(directory) && !isStoragePermissionGranted()) { requestAllPermissions(call, "permissionCallback"); } else { // create directory because it might not exist @@ -182,7 +182,7 @@ public void appendFile(PluginCall call) { public void deleteFile(PluginCall call) { String file = call.getString("path"); String directory = getDirectoryParameter(call); - if (!isPublicDirectory(directory) && !isStoragePermissionGranted()) { + if (isPublicDirectory(directory) && !isStoragePermissionGranted()) { requestAllPermissions(call, "permissionCallback"); } else { try { @@ -203,7 +203,7 @@ public void mkdir(PluginCall call) { String path = call.getString("path"); String directory = getDirectoryParameter(call); boolean recursive = call.getBoolean("recursive", false).booleanValue(); - if (!isPublicDirectory(directory) && !isStoragePermissionGranted()) { + if (isPublicDirectory(directory) && !isStoragePermissionGranted()) { requestAllPermissions(call, "permissionCallback"); } else { try { @@ -227,7 +227,7 @@ public void rmdir(PluginCall call) { File fileObject = implementation.getFileObject(path, directory); - if (!isPublicDirectory(directory) && !isStoragePermissionGranted()) { + if (isPublicDirectory(directory) && !isStoragePermissionGranted()) { requestAllPermissions(call, "permissionCallback"); } else { if (!fileObject.exists()) { @@ -260,7 +260,7 @@ public void readdir(PluginCall call) { String path = call.getString("path"); String directory = getDirectoryParameter(call); - if (!isPublicDirectory(directory) && !isStoragePermissionGranted()) { + if (isPublicDirectory(directory) && !isStoragePermissionGranted()) { requestAllPermissions(call, "permissionCallback"); } else { try { @@ -285,7 +285,7 @@ public void getUri(PluginCall call) { File fileObject = implementation.getFileObject(path, directory); - if (!isPublicDirectory(directory) && !isStoragePermissionGranted()) { + if (isPublicDirectory(directory) && !isStoragePermissionGranted()) { requestAllPermissions(call, "permissionCallback"); } else { JSObject data = new JSObject(); @@ -301,7 +301,7 @@ public void stat(PluginCall call) { File fileObject = implementation.getFileObject(path, directory); - if (!isPublicDirectory(directory) && !isStoragePermissionGranted()) { + if (isPublicDirectory(directory) && !isStoragePermissionGranted()) { requestAllPermissions(call, "permissionCallback"); } else { if (!fileObject.exists()) { diff --git a/filesystem/ios/Plugin.xcworkspace/contents.xcworkspacedata b/filesystem/ios/Plugin.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..afad624ec --- /dev/null +++ b/filesystem/ios/Plugin.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/filesystem/ios/Plugin/Filesystem.swift b/filesystem/ios/Plugin/Filesystem.swift index bea7bdd00..b2fefb5e7 100644 --- a/filesystem/ios/Plugin/Filesystem.swift +++ b/filesystem/ios/Plugin/Filesystem.swift @@ -136,32 +136,31 @@ import Foundation /** * Get the SearchPathDirectory corresponding to the JS string */ - @objc public func getDirectory(directory: String) -> FileManager.SearchPathDirectory { - switch directory { - case "DOCUMENTS": - return .documentDirectory - case "CACHE": - return .cachesDirectory - default: - return .documentDirectory + public func getDirectory(directory: String?) -> FileManager.SearchPathDirectory? { + if let directory = directory { + switch directory { + case "CACHE": + return .cachesDirectory + default: + return .documentDirectory + } } + return nil } /** * Get the URL for this file, supporting file:// paths and * files with directory mappings. */ - @objc public func getFileUrl(at path: String, in directory: String) -> URL? { - if path.starts(with: "file://") { - return URL(string: path) - } - - let directory = getDirectory(directory: directory) + @objc public func getFileUrl(at path: String, in directory: String?) -> URL? { + if let directory = getDirectory(directory: directory) { + guard let dir = FileManager.default.urls(for: directory, in: .userDomainMask).first else { + return nil + } - guard let dir = FileManager.default.urls(for: directory, in: .userDomainMask).first else { - return nil + return dir.appendingPathComponent(path) + } else { + return URL(string: path) } - - return dir.appendingPathComponent(path) } } diff --git a/filesystem/ios/Plugin/FilesystemPlugin.swift b/filesystem/ios/Plugin/FilesystemPlugin.swift index c0d5160ae..b52338aa5 100644 --- a/filesystem/ios/Plugin/FilesystemPlugin.swift +++ b/filesystem/ios/Plugin/FilesystemPlugin.swift @@ -8,7 +8,6 @@ import Capacitor @objc(FilesystemPlugin) public class FilesystemPlugin: CAPPlugin { private let implementation = Filesystem() - let defaultDirectory = "DOCUMENTS" /** * Read a file from the filesystem. @@ -20,7 +19,7 @@ public class FilesystemPlugin: CAPPlugin { handleError(call, "path must be provided and must be a string.") return } - let directory = call.getString("directory") ?? defaultDirectory + let directory = call.getString("directory") guard let fileUrl = implementation.getFileUrl(at: file, in: directory) else { handleError(call, "Invalid path") @@ -53,7 +52,7 @@ public class FilesystemPlugin: CAPPlugin { return } - let directory = call.getString("directory") ?? defaultDirectory + let directory = call.getString("directory") guard let fileUrl = implementation.getFileUrl(at: file, in: directory) else { handleError(call, "Invalid path") @@ -86,7 +85,7 @@ public class FilesystemPlugin: CAPPlugin { return } - let directory = call.getString("directory") ?? defaultDirectory + let directory = call.getString("directory") guard let fileUrl = implementation.getFileUrl(at: file, in: directory) else { handleError(call, "Invalid path") return @@ -108,7 +107,7 @@ public class FilesystemPlugin: CAPPlugin { return } - let directory = call.getString("directory") ?? defaultDirectory + let directory = call.getString("directory") guard let fileUrl = implementation.getFileUrl(at: file, in: directory) else { handleError(call, "Invalid path") return @@ -132,7 +131,7 @@ public class FilesystemPlugin: CAPPlugin { } let recursive = call.getBool("recursive") ?? false - let directory = call.getString("directory") ?? defaultDirectory + let directory = call.getString("directory") guard let fileUrl = implementation.getFileUrl(at: path, in: directory) else { handleError(call, "Invalid path") return @@ -155,7 +154,7 @@ public class FilesystemPlugin: CAPPlugin { return } - let directory = call.getString("directory") ?? defaultDirectory + let directory = call.getString("directory") guard let fileUrl = implementation.getFileUrl(at: path, in: directory) else { handleError(call, "Invalid path") return @@ -180,7 +179,7 @@ public class FilesystemPlugin: CAPPlugin { return } - let directory = call.getString("directory") ?? defaultDirectory + let directory = call.getString("directory") guard let fileUrl = implementation.getFileUrl(at: path, in: directory) else { handleError(call, "Invalid path") return @@ -205,7 +204,7 @@ public class FilesystemPlugin: CAPPlugin { return } - let directory = call.getString("directory") ?? defaultDirectory + let directory = call.getString("directory") guard let fileUrl = implementation.getFileUrl(at: path, in: directory) else { handleError(call, "Invalid path") return @@ -231,7 +230,7 @@ public class FilesystemPlugin: CAPPlugin { return } - let directory = call.getString("directory") ?? defaultDirectory + let directory = call.getString("directory") guard let fileUrl = implementation.getFileUrl(at: path, in: directory) else { handleError(call, "Invalid path") return @@ -252,7 +251,7 @@ public class FilesystemPlugin: CAPPlugin { return } - let directory = call.getString("directory") ?? defaultDirectory + let directory = call.getString("directory") let toDirectory = call.getString("toDirectory") ?? directory guard let fromUrl = implementation.getFileUrl(at: from, in: directory) else { @@ -281,7 +280,7 @@ public class FilesystemPlugin: CAPPlugin { return } - let directory = call.getString("directory") ?? defaultDirectory + let directory = call.getString("directory") let toDirectory = call.getString("toDirectory") ?? directory guard let fromUrl = implementation.getFileUrl(at: from, in: directory) else { diff --git a/filesystem/package.json b/filesystem/package.json index fea114df8..7ff84f181 100644 --- a/filesystem/package.json +++ b/filesystem/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/filesystem", - "version": "0.4.0", + "version": "0.5.0", "description": "The Filesystem API provides a NodeJS-like API for working with files on the device.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/filesystem/src/web.ts b/filesystem/src/web.ts index c9aba575d..4727f3385 100644 --- a/filesystem/src/web.ts +++ b/filesystem/src/web.ts @@ -19,11 +19,10 @@ import type { StatResult, WriteFileOptions, WriteFileResult, + Directory, } from './definitions'; -import { Directory } from './definitions'; export class FilesystemWeb extends WebPlugin implements FilesystemPlugin { - DEFAULT_DIRECTORY = Directory.Data; DB_VERSION = 1; DB_NAME = 'Disc'; @@ -105,10 +104,10 @@ export class FilesystemWeb extends WebPlugin implements FilesystemPlugin { directory: Directory | undefined, uriPath: string | undefined, ): string { - directory = directory || this.DEFAULT_DIRECTORY; const cleanedUriPath = uriPath !== undefined ? uriPath.replace(/^[/]+|[/]+$/g, '') : ''; - let fsPath = '/' + directory; + let fsPath = ''; + if (directory !== undefined) fsPath += '/' + directory; if (uriPath !== '') fsPath += '/' + cleanedUriPath; return fsPath; } @@ -351,10 +350,8 @@ export class FilesystemWeb extends WebPlugin implements FilesystemPlugin { if (entry === undefined) { entry = (await this.dbRequest('get', [path + '/'])) as EntryObj; } - if (entry === undefined) throw Error('Entry does not exist.'); - return { - uri: entry.path, + uri: entry?.path || path, }; } diff --git a/geolocation/CHANGELOG.md b/geolocation/CHANGELOG.md index ffa320b47..2bf9ef820 100644 --- a/geolocation/CHANGELOG.md +++ b/geolocation/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.4.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/geolocation@0.4.0...@capacitor/geolocation@0.4.1) (2021-02-27) + +**Note:** Version bump only for package @capacitor/geolocation + + + + + # [0.4.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/geolocation@0.3.2...@capacitor/geolocation@0.4.0) (2021-02-10) diff --git a/geolocation/android/src/main/java/com/capacitorjs/plugins/geolocation/GeolocationPlugin.java b/geolocation/android/src/main/java/com/capacitorjs/plugins/geolocation/GeolocationPlugin.java index 9cee28dc5..f1871c8a6 100644 --- a/geolocation/android/src/main/java/com/capacitorjs/plugins/geolocation/GeolocationPlugin.java +++ b/geolocation/android/src/main/java/com/capacitorjs/plugins/geolocation/GeolocationPlugin.java @@ -38,7 +38,7 @@ public void load() { */ @PluginMethod public void getCurrentPosition(final PluginCall call) { - if (!hasRequiredPermissions()) { + if (getPermissionState("location") != PermissionState.GRANTED) { requestAllPermissions(call, "completeCurrentPosition"); } else { getPosition(call); @@ -86,7 +86,7 @@ public void error(String message) { @PluginMethod(returnType = PluginMethod.RETURN_CALLBACK) public void watchPosition(PluginCall call) { call.save(); - if (!hasRequiredPermissions()) { + if (getPermissionState("location") != PermissionState.GRANTED) { requestAllPermissions(call, "completeWatchPosition"); } else { startWatch(call); diff --git a/geolocation/package.json b/geolocation/package.json index 4e098a83c..5fd5e1980 100644 --- a/geolocation/package.json +++ b/geolocation/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/geolocation", - "version": "0.4.0", + "version": "0.4.1", "description": "The Geolocation API provides simple methods for getting and tracking the current position of the device using GPS, along with altitude, heading, and speed information if available.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/haptics/CHANGELOG.md b/haptics/CHANGELOG.md index 9e75d40d9..e83b91f44 100644 --- a/haptics/CHANGELOG.md +++ b/haptics/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.3.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/haptics@0.3.3...@capacitor/haptics@0.3.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/haptics + + + + + ## [0.3.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/haptics@0.3.2...@capacitor/haptics@0.3.3) (2021-02-10) **Note:** Version bump only for package @capacitor/haptics diff --git a/haptics/package.json b/haptics/package.json index 72a33bc82..6297e6208 100644 --- a/haptics/package.json +++ b/haptics/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/haptics", - "version": "0.3.3", + "version": "0.3.4", "description": "The Haptics API provides physical feedback to the user through touch or vibration.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/keyboard/CHANGELOG.md b/keyboard/CHANGELOG.md index 9125e1cc0..6927684f9 100644 --- a/keyboard/CHANGELOG.md +++ b/keyboard/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.5.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/keyboard@0.5.3...@capacitor/keyboard@0.5.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/keyboard + + + + + ## [0.5.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/keyboard@0.5.2...@capacitor/keyboard@0.5.3) (2021-02-10) **Note:** Version bump only for package @capacitor/keyboard diff --git a/keyboard/README.md b/keyboard/README.md index 61c88dc4a..8d86143d6 100644 --- a/keyboard/README.md +++ b/keyboard/README.md @@ -44,7 +44,7 @@ On iOS, the keyboard can be configured with the following options: ```json { - "pluginsConfig": { + "plugins": { "Keyboard": { "resize": "body", "style": "dark" diff --git a/keyboard/package.json b/keyboard/package.json index e0489593a..84c713608 100644 --- a/keyboard/package.json +++ b/keyboard/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/keyboard", - "version": "0.5.3", + "version": "0.5.4", "description": "The Keyboard API provides keyboard display and visibility control, along with event tracking when the keyboard shows and hides.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,11 +44,11 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/cli": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/cli": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -58,10 +58,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/local-notifications/CHANGELOG.md b/local-notifications/CHANGELOG.md index cbcb3e62a..7c8a9c696 100644 --- a/local-notifications/CHANGELOG.md +++ b/local-notifications/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.5.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/local-notifications@0.4.0...@capacitor/local-notifications@0.5.0) (2021-02-27) + + +### Bug Fixes + +* **local-notifications:** Checking for null schedule in notification JSObject ([#258](https://github.com/ionic-team/capacitor-plugins/issues/258)) ([73cb416](https://github.com/ionic-team/capacitor-plugins/commit/73cb4168329622bb5a6625c900090a01fc5eca99)) +* **local-notifications:** Make getPending not return already fired notifications ([#256](https://github.com/ionic-team/capacitor-plugins/issues/256)) ([fb96f8a](https://github.com/ionic-team/capacitor-plugins/commit/fb96f8ab8c4776528e5825be6c2e19567462eef8)) +* **local-notifications:** Opt out of Capacitor date serialization ([#264](https://github.com/ionic-team/capacitor-plugins/issues/264)) ([6e447d5](https://github.com/ionic-team/capacitor-plugins/commit/6e447d54aff3cac47df540addf2a0bf05238c158)) + + +### Features + +* **local-notifications:** Support setting seconds in Schedule "on" ([#253](https://github.com/ionic-team/capacitor-plugins/issues/253)) ([4ec8d06](https://github.com/ionic-team/capacitor-plugins/commit/4ec8d06e0cb52403e541a05e5c3518d4c5ea754e)) + + + + + # [0.4.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/local-notifications@0.3.0...@capacitor/local-notifications@0.4.0) (2021-02-10) diff --git a/local-notifications/README.md b/local-notifications/README.md index a5d6d998b..39a8f751f 100644 --- a/local-notifications/README.md +++ b/local-notifications/README.md @@ -9,6 +9,30 @@ npm install @capacitor/local-notifications npx cap sync ``` +## Configuration + +On Android, the Local Notifications can be configured with the following options: + +- `smallIcon`: It allows you to set the default icon for the local notification. +- `iconColor`: It allows you to set the default color for the local notification icon. +- `sound`: It allows you to set the default notification sound. On Android 26+ it sets the default channel sound and can’t be changed unless the app is uninstalled. + +```json +{ + "plugins": { + "LocalNotifications": { + "smallIcon": "ic_stat_icon_config_sample", + "iconColor": "#488AFF", + "sound": "beep.wav" + } + } +} +``` + +## Doze + +If the device has entered [Doze](https://developer.android.com/training/monitoring-device-state/doze-standby) mode, your application may have restricted capabilities. If you need your notification to fire even during Doze, schedule your notification by using `allowWhileIdle: true`. Make use of `allowWhileIdle` judiciously, as these notifications [can only fire once per 9 minutes, per app.](https://developer.android.com/training/monitoring-device-state/doze-standby#assessing_your_app) + ## API @@ -382,6 +406,7 @@ Enables basic storage and retrieval of dates and times. | **`day`** | number | | **`hour`** | number | | **`minute`** | number | +| **`second`** | number | #### Attachment diff --git a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/DateMatch.java b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/DateMatch.java index f1a131724..323ed22f7 100644 --- a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/DateMatch.java +++ b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/DateMatch.java @@ -16,6 +16,7 @@ public class DateMatch { private Integer day; private Integer hour; private Integer minute; + private Integer second; // Unit used to save the last used unit for a trigger. // One of the Calendar constants values @@ -63,6 +64,14 @@ public void setMinute(Integer minute) { this.minute = minute; } + public Integer getSecond() { + return second; + } + + public void setSecond(Integer second) { + this.second = second; + } + /** * Gets a calendar instance pointing to the specified date. * @@ -72,7 +81,6 @@ private Calendar buildCalendar(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.MILLISECOND, 0); - cal.set(Calendar.SECOND, 0); return cal; } @@ -102,6 +110,8 @@ private long postponeTriggerIfNeeded(Calendar current, Calendar next) { incrementUnit = Calendar.DAY_OF_MONTH; } else if (unit == Calendar.MINUTE) { incrementUnit = Calendar.HOUR_OF_DAY; + } else if (unit == Calendar.SECOND) { + incrementUnit = Calendar.MINUTE; } if (incrementUnit != -1) { @@ -133,12 +143,31 @@ private Calendar buildNextTriggerTime(Date date) { next.set(Calendar.MINUTE, minute); if (unit == -1) unit = Calendar.MINUTE; } + if (second != null) { + next.set(Calendar.SECOND, second); + if (unit == -1) unit = Calendar.SECOND; + } return next; } @Override public String toString() { - return "DateMatch{" + "year=" + year + ", month=" + month + ", day=" + day + ", hour=" + hour + ", minute=" + minute + '}'; + return ( + "DateMatch{" + + "year=" + + year + + ", month=" + + month + + ", day=" + + day + + ", hour=" + + hour + + ", minute=" + + minute + + ", second=" + + second + + '}' + ); } @Override @@ -152,7 +181,8 @@ public boolean equals(Object o) { if (month != null ? !month.equals(dateMatch.month) : dateMatch.month != null) return false; if (day != null ? !day.equals(dateMatch.day) : dateMatch.day != null) return false; if (hour != null ? !hour.equals(dateMatch.hour) : dateMatch.hour != null) return false; - return minute != null ? minute.equals(dateMatch.minute) : dateMatch.minute == null; + if (minute != null ? !minute.equals(dateMatch.minute) : dateMatch.minute != null) return false; + return second != null ? second.equals(dateMatch.second) : dateMatch.second == null; } @Override @@ -162,6 +192,7 @@ public int hashCode() { result = 31 * result + (day != null ? day.hashCode() : 0); result = 31 * result + (hour != null ? hour.hashCode() : 0); result = 31 * result + (minute != null ? minute.hashCode() : 0); + result = 31 + result + (second != null ? second.hashCode() : 0); return result; } @@ -171,7 +202,8 @@ public int hashCode() { * @return */ public String toMatchString() { - String matchString = year + separator + month + separator + day + separator + hour + separator + minute + separator + unit; + String matchString = + year + separator + month + separator + day + separator + hour + separator + minute + separator + second + separator + unit; return matchString.replace("null", "*"); } @@ -192,6 +224,17 @@ public static DateMatch fromMatchString(String matchString) { date.setMinute(getValueFromCronElement(split[4])); date.setUnit(getValueFromCronElement(split[5])); } + + if (split != null && split.length == 7) { + date.setYear(getValueFromCronElement(split[0])); + date.setMonth(getValueFromCronElement(split[1])); + date.setDay(getValueFromCronElement(split[2])); + date.setHour(getValueFromCronElement(split[3])); + date.setMinute(getValueFromCronElement(split[4])); + date.setSecond(getValueFromCronElement(split[5])); + date.setUnit(getValueFromCronElement(split[6])); + } + return date; } diff --git a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotification.java b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotification.java index 176c05af9..288a4635d 100644 --- a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotification.java +++ b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotification.java @@ -33,7 +33,6 @@ public class LocalNotification { private List attachments; private LocalNotificationSchedule schedule; private String channelId; - private String source; public String getTitle() { @@ -221,7 +220,12 @@ public static LocalNotification buildNotificationFromJSObject(JSObject jsonObjec localNotification.setAttachments(LocalNotificationAttachment.getAttachments(jsonObject)); localNotification.setGroupSummary(jsonObject.getBoolean("groupSummary", false)); localNotification.setChannelId(jsonObject.getString("channelId")); - localNotification.setSchedule(new LocalNotificationSchedule(jsonObject)); + + JSObject schedule = jsonObject.getJSObject("schedule"); + if (schedule != null) { + localNotification.setSchedule(new LocalNotificationSchedule(schedule)); + } + localNotification.setExtra(jsonObject.getJSObject("extra")); localNotification.setOngoing(jsonObject.getBoolean("ongoing", false)); localNotification.setAutoCancel(jsonObject.getBoolean("autoCancel", true)); diff --git a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationSchedule.java b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationSchedule.java index ade6c554e..5a8113172 100644 --- a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationSchedule.java +++ b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationSchedule.java @@ -20,21 +20,18 @@ public class LocalNotificationSchedule { private Boolean whileIdle; - public LocalNotificationSchedule(JSObject jsonNotification) throws ParseException { - JSObject schedule = jsonNotification.getJSObject("schedule"); - if (schedule != null) { - // Every specific unit of time (always constant) - buildEveryElement(schedule); - // Count of units of time from every to repeat on - buildCountElement(schedule); - // At specific moment of time (with repeating option) - buildAtElement(schedule); - // Build on - recurring times. For e.g. every 1st day of the month at 8:30. - buildOnElement(schedule); - - // Schedule this notification to fire even if app is idled (Doze) - this.whileIdle = schedule.getBoolean("allowWhileIdle", false); - } + public LocalNotificationSchedule(JSObject schedule) throws ParseException { + // Every specific unit of time (always constant) + buildEveryElement(schedule); + // Count of units of time from every to repeat on + buildCountElement(schedule); + // At specific moment of time (with repeating option) + buildAtElement(schedule); + // Build on - recurring times. For e.g. every 1st day of the month at 8:30. + buildOnElement(schedule); + + // Schedule this notification to fire even if app is idled (Doze) + this.whileIdle = schedule.getBoolean("allowWhileIdle", false); } public LocalNotificationSchedule() {} @@ -67,6 +64,7 @@ private void buildOnElement(JSObject schedule) { on.setDay(onJson.getInteger("day")); on.setHour(onJson.getInteger("hour")); on.setMinute(onJson.getInteger("minute")); + on.setSecond(onJson.getInteger("second")); } } diff --git a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/TimedNotificationPublisher.java b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/TimedNotificationPublisher.java index e62f9ac33..7c68e2c52 100644 --- a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/TimedNotificationPublisher.java +++ b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/TimedNotificationPublisher.java @@ -36,10 +36,12 @@ public void onReceive(Context context, Intent intent) { JSObject notificationJson = storage.getSavedNotificationAsJSObject(Integer.toString(id)); LocalNotificationsPlugin.fireReceived(notificationJson); notificationManager.notify(id, notification); - rescheduleNotificationIfNeeded(context, intent, id); + if (!rescheduleNotificationIfNeeded(context, intent, id)) { + storage.deleteNotification(Integer.toString(id)); + } } - private void rescheduleNotificationIfNeeded(Context context, Intent intent, int id) { + private boolean rescheduleNotificationIfNeeded(Context context, Intent intent, int id) { String dateString = intent.getStringExtra(CRON_KEY); if (dateString != null) { DateMatch date = DateMatch.fromMatchString(dateString); @@ -50,6 +52,9 @@ private void rescheduleNotificationIfNeeded(Context context, Intent intent, int alarmManager.setExact(AlarmManager.RTC, trigger, pendingIntent); SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Logger.debug(Logger.tags("LN"), "notification " + id + " will next fire at " + sdf.format(new Date(trigger))); + return true; } + + return false; } } diff --git a/local-notifications/ios/Plugin/LocalNotificationsPlugin.swift b/local-notifications/ios/Plugin/LocalNotificationsPlugin.swift index 33b3942ad..a5f525b35 100644 --- a/local-notifications/ios/Plugin/LocalNotificationsPlugin.swift +++ b/local-notifications/ios/Plugin/LocalNotificationsPlugin.swift @@ -30,6 +30,7 @@ public class LocalNotificationsPlugin: CAPPlugin { override public func load() { self.bridge?.notificationRouter.localNotificationHandler = self.notificationDelegationHandler self.notificationDelegationHandler.plugin = self + self.shouldStringifyDatesInCalls = false } /** diff --git a/local-notifications/package.json b/local-notifications/package.json index 13938ccad..f335ea5a2 100644 --- a/local-notifications/package.json +++ b/local-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/local-notifications", - "version": "0.4.0", + "version": "0.5.0", "description": "The Local Notifications API provides a way to schedule device notifications locally (i.e. without a server sending push notifications).", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,11 +44,11 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/cli": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/cli": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -58,10 +58,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/local-notifications/src/definitions.ts b/local-notifications/src/definitions.ts index 0859fb740..c084ca801 100644 --- a/local-notifications/src/definitions.ts +++ b/local-notifications/src/definitions.ts @@ -734,6 +734,7 @@ export interface ScheduleOn { day?: number; hour?: number; minute?: number; + second?: number; } export type ScheduleEvery = diff --git a/motion/CHANGELOG.md b/motion/CHANGELOG.md index ec710eb21..196f90e63 100644 --- a/motion/CHANGELOG.md +++ b/motion/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.3.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/motion@0.3.2...@capacitor/motion@0.3.3) (2021-02-27) + +**Note:** Version bump only for package @capacitor/motion + + + + + ## [0.3.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/motion@0.3.1...@capacitor/motion@0.3.2) (2021-02-10) **Note:** Version bump only for package @capacitor/motion diff --git a/motion/package.json b/motion/package.json index aa36f2ec1..6605ebcce 100644 --- a/motion/package.json +++ b/motion/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/motion", - "version": "0.3.2", + "version": "0.3.3", "description": "The Motion API tracks accelerometer and device orientation (compass heading, etc.)", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -39,10 +39,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "eslint": "^7.11.0", @@ -50,10 +50,10 @@ "prettier-plugin-java": "~1.0.0", "rimraf": "^3.0.0", "rollup": "^2.29.0", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "eslintConfig": { diff --git a/network/CHANGELOG.md b/network/CHANGELOG.md index 2468c4fec..e5f3e3cfa 100644 --- a/network/CHANGELOG.md +++ b/network/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.4.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/network@0.4.3...@capacitor/network@0.4.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/network + + + + + ## [0.4.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/network@0.4.2...@capacitor/network@0.4.3) (2021-02-10) **Note:** Version bump only for package @capacitor/network diff --git a/network/android/src/main/java/com/capacitorjs/plugins/network/NetworkPlugin.java b/network/android/src/main/java/com/capacitorjs/plugins/network/NetworkPlugin.java index 5af658047..1c3162c95 100644 --- a/network/android/src/main/java/com/capacitorjs/plugins/network/NetworkPlugin.java +++ b/network/android/src/main/java/com/capacitorjs/plugins/network/NetworkPlugin.java @@ -10,18 +10,16 @@ import com.getcapacitor.annotation.CapacitorPlugin; import com.getcapacitor.annotation.Permission; -@CapacitorPlugin(name = "Network", permissions = { @Permission(strings = { Manifest.permission.ACCESS_NETWORK_STATE }) }) +@CapacitorPlugin(name = "Network") public class NetworkPlugin extends Plugin { private Network implementation; public static final String NETWORK_CHANGE_EVENT = "networkStatusChange"; - private static final String PERMISSION_NOT_SET = Manifest.permission.ACCESS_NETWORK_STATE + " not set in AndroidManifest.xml"; /** * Monitor for network status changes and fire our event. */ @Override - @SuppressWarnings("MissingPermission") public void load() { implementation = new Network(getContext()); implementation.setStatusChangeListener(this::updateNetworkStatus); @@ -39,14 +37,9 @@ protected void handleOnDestroy() { * Get current network status information. * @param call */ - @SuppressWarnings("MissingPermission") @PluginMethod public void getStatus(PluginCall call) { - if (hasRequiredPermissions()) { - call.resolve(getStatusJSObject(implementation.getNetworkStatus())); - } else { - call.reject(PERMISSION_NOT_SET); - } + call.resolve(getStatusJSObject(implementation.getNetworkStatus())); } /** @@ -65,13 +58,8 @@ protected void handleOnPause() { implementation.stopMonitoring(getActivity()); } - @SuppressWarnings("MissingPermission") private void updateNetworkStatus() { - if (hasRequiredPermissions()) { - notifyListeners(NETWORK_CHANGE_EVENT, getStatusJSObject(implementation.getNetworkStatus())); - } else { - Logger.error(getLogTag(), PERMISSION_NOT_SET, null); - } + notifyListeners(NETWORK_CHANGE_EVENT, getStatusJSObject(implementation.getNetworkStatus())); } /** diff --git a/network/package.json b/network/package.json index 9814cf781..d68e17d30 100644 --- a/network/package.json +++ b/network/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/network", - "version": "0.4.3", + "version": "0.4.4", "description": "The Network API provides network and connectivity information.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/push-notifications/CHANGELOG.md b/push-notifications/CHANGELOG.md index d325d8e75..1d03c1ef6 100644 --- a/push-notifications/CHANGELOG.md +++ b/push-notifications/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.3.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/push-notifications@0.3.3...@capacitor/push-notifications@0.3.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/push-notifications + + + + + ## [0.3.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/push-notifications@0.3.2...@capacitor/push-notifications@0.3.3) (2021-02-10) **Note:** Version bump only for package @capacitor/push-notifications diff --git a/push-notifications/README.md b/push-notifications/README.md index 59d5ef566..ff664f46e 100644 --- a/push-notifications/README.md +++ b/push-notifications/README.md @@ -68,6 +68,19 @@ An empty Array can be provided if none of the previous options are desired. `pus } ``` +## Silent Push Notifications / Data-only Notifications +#### iOS +This plugin does not support iOS Silent Push (Remote Notifications). We recommend using native code solutions for handling these types of notifications, see [Pushing Background Updates to Your App](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app). + +#### Android +This plugin does support data-only notifications, but will NOT call `pushNotificationReceived` if the app has been killed. To handle this scenario, you will need to create a service that extends `FirebaseMessagingService`, see [Handling FCM Messages](https://firebase.google.com/docs/cloud-messaging/android/receive). + +## Common Issues +On Android, there are various system and app states that can affect the delivery of push notifications: + +* If the device has entered [Doze](https://developer.android.com/training/monitoring-device-state/doze-standby) mode, your application may have restricted capabilities. To increase the chance of your notification being received, consider using [FCM high priority messages](https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message). +* There are differences in behavior between development and production. Try testing your app outside of being launched by Android Studio. Read more [here](https://stackoverflow.com/a/50238790/1351469). + --- ## API diff --git a/push-notifications/package.json b/push-notifications/package.json index 673a6c853..b457920eb 100644 --- a/push-notifications/package.json +++ b/push-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/push-notifications", - "version": "0.3.3", + "version": "0.3.4", "description": "The Push Notifications API provides access to native push notifications.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,11 +44,11 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/cli": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/cli": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -58,10 +58,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/screen-reader/CHANGELOG.md b/screen-reader/CHANGELOG.md index a61101715..eba4c513f 100644 --- a/screen-reader/CHANGELOG.md +++ b/screen-reader/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.3.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/screen-reader@0.3.3...@capacitor/screen-reader@0.3.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/screen-reader + + + + + ## [0.3.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/screen-reader@0.3.2...@capacitor/screen-reader@0.3.3) (2021-02-10) **Note:** Version bump only for package @capacitor/screen-reader diff --git a/screen-reader/package.json b/screen-reader/package.json index 61140cf70..26a7efc2b 100644 --- a/screen-reader/package.json +++ b/screen-reader/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/screen-reader", - "version": "0.3.3", + "version": "0.3.4", "description": "The Screen Reader API provides access to TalkBack/VoiceOver/etc. and provides simple text-to-speech capabilities for visual accessibility.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/share/CHANGELOG.md b/share/CHANGELOG.md index a7ce35755..5ab6f28b8 100644 --- a/share/CHANGELOG.md +++ b/share/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.5.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/share@0.5.0...@capacitor/share@0.5.1) (2021-02-27) + +**Note:** Version bump only for package @capacitor/share + + + + + # [0.5.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/share@0.4.2...@capacitor/share@0.5.0) (2021-02-10) diff --git a/share/package.json b/share/package.json index 14461dbd0..2ce863a5f 100644 --- a/share/package.json +++ b/share/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/share", - "version": "0.5.0", + "version": "0.5.1", "description": "The Share API provides methods for sharing content in any sharing-enabled apps the user may have installed.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/splash-screen/CHANGELOG.md b/splash-screen/CHANGELOG.md index b00a4c386..6a7ecfd0c 100644 --- a/splash-screen/CHANGELOG.md +++ b/splash-screen/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.3.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/splash-screen@0.3.3...@capacitor/splash-screen@0.3.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/splash-screen + + + + + ## [0.3.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/splash-screen@0.3.2...@capacitor/splash-screen@0.3.3) (2021-02-10) **Note:** Version bump only for package @capacitor/splash-screen diff --git a/splash-screen/package.json b/splash-screen/package.json index 8f310093f..bef867694 100644 --- a/splash-screen/package.json +++ b/splash-screen/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/splash-screen", - "version": "0.3.3", + "version": "0.3.4", "description": "The Splash Screen API provides methods for showing or hiding a Splash image.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,11 +44,11 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/cli": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/cli": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -58,10 +58,10 @@ "rimraf": "^3.0.2", "rollup": "^2.32.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/status-bar/CHANGELOG.md b/status-bar/CHANGELOG.md index b4a4ce1ed..7f992e6a2 100644 --- a/status-bar/CHANGELOG.md +++ b/status-bar/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.4.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/status-bar@0.4.3...@capacitor/status-bar@0.4.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/status-bar + + + + + ## [0.4.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/status-bar@0.4.2...@capacitor/status-bar@0.4.3) (2021-02-10) **Note:** Version bump only for package @capacitor/status-bar diff --git a/status-bar/README.md b/status-bar/README.md index ff0435a66..92c2a7a4b 100644 --- a/status-bar/README.md +++ b/status-bar/README.md @@ -17,7 +17,7 @@ about [Configuring iOS](https://capacitorjs.com/docs/ios/configuration) for help. The status bar visibility defaults to visible and the style defaults to -`StatusBarStyle.Default`. You can change these defaults by adding +`Style.Default`. You can change these defaults by adding `UIStatusBarHidden` and/or `UIStatusBarStyle` in `Info.plist`. `setBackgroundColor` and `setOverlaysWebView` are currently not supported on @@ -26,7 +26,7 @@ iOS devices. ## Example ```typescript -import { StatusBar, StatusBarStyle } from '@capacitor/status-bar'; +import { StatusBar, Style } from '@capacitor/status-bar'; // iOS only window.addEventListener('statusTap', function () { @@ -37,11 +37,11 @@ window.addEventListener('statusTap', function () { StatusBar.setOverlaysWebView({ overlay: true }); const setStatusBarStyleDark = async () => { - await StatusBar.setStyle({ style: StatusBarStyle.Dark }); + await StatusBar.setStyle({ style: Style.Dark }); }; const setStatusBarStyleLight = async () => { - await StatusBar.setStyle({ style: StatusBarStyle.Light }); + await StatusBar.setStyle({ style: Style.Light }); }; const hideStatusBar = async () => { diff --git a/status-bar/package.json b/status-bar/package.json index ab0ad7dbc..703d349e5 100644 --- a/status-bar/package.json +++ b/status-bar/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/status-bar", - "version": "0.4.3", + "version": "0.4.4", "description": "The StatusBar API Provides methods for configuring the style of the Status Bar, along with showing or hiding it.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/storage/CHANGELOG.md b/storage/CHANGELOG.md index 37eb99f49..509576fe9 100644 --- a/storage/CHANGELOG.md +++ b/storage/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.3.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/storage@0.3.3...@capacitor/storage@0.3.4) (2021-02-27) + + +### Bug Fixes + +* **storage:** configure doesn't resolve on Android and iOS ([#266](https://github.com/ionic-team/capacitor-plugins/issues/266)) ([4f51b24](https://github.com/ionic-team/capacitor-plugins/commit/4f51b24d18890ae207090304c153af6c0067fdff)) + + + + + ## [0.3.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/storage@0.3.2...@capacitor/storage@0.3.3) (2021-02-10) **Note:** Version bump only for package @capacitor/storage diff --git a/storage/android/src/main/java/com/capacitorjs/plugins/storage/StoragePlugin.java b/storage/android/src/main/java/com/capacitorjs/plugins/storage/StoragePlugin.java index deeddf8fa..abe32c95c 100644 --- a/storage/android/src/main/java/com/capacitorjs/plugins/storage/StoragePlugin.java +++ b/storage/android/src/main/java/com/capacitorjs/plugins/storage/StoragePlugin.java @@ -30,7 +30,9 @@ public void configure(PluginCall call) { storage = new Storage(getContext(), configuration); } catch (CloneNotSupportedException e) { call.reject("Error while configuring", e); + return; } + call.resolve(); } @PluginMethod diff --git a/storage/ios/Plugin/StoragePlugin.swift b/storage/ios/Plugin/StoragePlugin.swift index a8ed5b985..7c72c1d82 100644 --- a/storage/ios/Plugin/StoragePlugin.swift +++ b/storage/ios/Plugin/StoragePlugin.swift @@ -20,6 +20,7 @@ public class StoragePlugin: CAPPlugin { } storage = Storage(with: configuration) + call.resolve() } @objc func get(_ call: CAPPluginCall) { diff --git a/storage/package.json b/storage/package.json index 21c6b1497..c0bbce72e 100644 --- a/storage/package.json +++ b/storage/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/storage", - "version": "0.3.3", + "version": "0.3.4", "description": "The Storage API provides a simple key/value persistent store for lightweight data.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/text-zoom/CHANGELOG.md b/text-zoom/CHANGELOG.md index 58c813f66..a79b67c61 100644 --- a/text-zoom/CHANGELOG.md +++ b/text-zoom/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.3.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/text-zoom@0.3.3...@capacitor/text-zoom@0.3.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/text-zoom + + + + + ## [0.3.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/text-zoom@0.3.2...@capacitor/text-zoom@0.3.3) (2021-02-10) **Note:** Version bump only for package @capacitor/text-zoom diff --git a/text-zoom/package.json b/text-zoom/package.json index 5b4c5d7b1..cdc7a6e4e 100644 --- a/text-zoom/package.json +++ b/text-zoom/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/text-zoom", - "version": "0.3.3", + "version": "0.3.4", "description": "The Text Zoom API provides the ability to change Web View text size for visual accessibility.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config", diff --git a/toast/CHANGELOG.md b/toast/CHANGELOG.md index 3ba38b345..7dce337ed 100644 --- a/toast/CHANGELOG.md +++ b/toast/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.4.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/toast@0.4.3...@capacitor/toast@0.4.4) (2021-02-27) + +**Note:** Version bump only for package @capacitor/toast + + + + + ## [0.4.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/toast@0.4.2...@capacitor/toast@0.4.3) (2021-02-10) **Note:** Version bump only for package @capacitor/toast diff --git a/toast/package.json b/toast/package.json index 17496e884..0159eb9c4 100644 --- a/toast/package.json +++ b/toast/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/toast", - "version": "0.4.3", + "version": "0.4.4", "description": "The Toast API provides a notification pop up for displaying important information to a user. Just like real toast!", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -44,10 +44,10 @@ "prepublishOnly": "npm run build" }, "devDependencies": { - "@capacitor/android": "^3.0.0-beta.2", - "@capacitor/core": "^3.0.0-beta.2", + "@capacitor/android": "3.0.0-beta.6", + "@capacitor/core": "3.0.0-beta.6", "@capacitor/docgen": "0.0.15", - "@capacitor/ios": "^3.0.0-beta.2", + "@capacitor/ios": "3.0.0-beta.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "~1.0.1", "@ionic/swiftlint-config": "^1.1.2", @@ -57,10 +57,10 @@ "rimraf": "^3.0.0", "rollup": "^2.29.0", "swiftlint": "^1.0.1", - "typescript": "~4.0.3" + "typescript": "~4.1.5" }, "peerDependencies": { - "@capacitor/core": "^3.0.0-beta.2" + "@capacitor/core": "^3.0.0-beta.3" }, "prettier": "@ionic/prettier-config", "swiftlint": "@ionic/swiftlint-config",