From cac55f8ce5bdcc428570e5fba6e933cb12c9f95c Mon Sep 17 00:00:00 2001 From: Carl Poole Date: Wed, 1 Sep 2021 16:20:43 -0500 Subject: [PATCH] chore(android): publish plugin updates (#592) * docs(browser): Add clarifications to browser events (#560) * feat(storage): make StorageConfiguration init public (#532) * fix(filesystem): allow copy if from is not parent of to (#546) Co-authored-by: jcesarmobile * fix(camera): cleanup camera images if not needed (#563) * fix(camera): return original image if editing is cancelled (#566) * fix(camera): return original image if editing is cancelled * fix(camera): Fix allowEdit: true when picking from photos * fix(camera): Resize not respecting aspect ratio on iOS (#568) * chore: adding stuff to deploy plugins to cocoapods * chore: adding npm install to script * chore: updating source to point to proper tag * chore: turning lerna concurrency to 1 for cocoapod builds * chore(android): native library publishing task to test (#575) * fix(local-notifications): Throw errors if missing mandatory channel fields (#577) * fix(push-notifications): Throw errors if missing mandatory channel fields (#576) * chore: adding manual task to deploy plugins to cocoapods * docs(notifications): Add links to explain the Android importance and visibility values (#584) * chore: Correct sources path in podspec (#586) * chore: fixing action sheet podspec * feat(geolocation): Throw error if location is disabled (#589) * fix: Correct missing source_files path (#590) * chore: adding full path to podspecs for cocoapods deploy (#591) * chore(release): publish [skip ci] - @capacitor/action-sheet@1.0.3 - @capacitor/app@1.0.3 - @capacitor/app-launcher@1.0.4 - @capacitor/browser@1.0.3 - @capacitor/camera@1.0.5 - @capacitor/clipboard@1.0.3 - @capacitor/device@1.0.3 - @capacitor/dialog@1.0.3 - @capacitor/filesystem@1.0.3 - @capacitor/geolocation@1.1.0 - @capacitor/haptics@1.0.3 - @capacitor/keyboard@1.0.3 - @capacitor/local-notifications@1.0.5 - @capacitor/network@1.0.3 - @capacitor/push-notifications@1.0.4 - @capacitor/screen-reader@1.0.3 - @capacitor/share@1.0.4 - @capacitor/splash-screen@1.1.2 - @capacitor/status-bar@1.0.3 - @capacitor/storage@1.1.0 - @capacitor/text-zoom@1.0.3 - @capacitor/toast@1.0.3 Co-authored-by: jcesarmobile Co-authored-by: fadoscha Co-authored-by: Tachibana Shin <45375496+tachibana-shin@users.noreply.github.com> Co-authored-by: Max Lynch Co-authored-by: Ely Lucas --- .github/cocoapods-deploy.yml | 39 ++++++++++ action-sheet/CHANGELOG.md | 8 ++ action-sheet/CapacitorActionSheet.podspec | 6 +- action-sheet/package.json | 6 +- app-launcher/CHANGELOG.md | 8 ++ app-launcher/CapacitorAppLauncher.podspec | 6 +- app-launcher/package.json | 6 +- app/CHANGELOG.md | 8 ++ app/CapacitorApp.podspec | 6 +- app/package.json | 2 +- browser/CHANGELOG.md | 11 +++ browser/CapacitorBrowser.podspec | 6 +- browser/README.md | 5 +- browser/package.json | 6 +- browser/src/definitions.ts | 5 +- camera/CHANGELOG.md | 14 ++++ camera/CapacitorCamera.podspec | 6 +- .../plugins/camera/CameraPlugin.java | 77 ++++++++++++++----- camera/ios/Plugin/CameraExtensions.swift | 2 +- camera/package.json | 6 +- clipboard/CHANGELOG.md | 8 ++ clipboard/CapacitorClipboard.podspec | 6 +- clipboard/package.json | 6 +- device/CHANGELOG.md | 8 ++ device/CapacitorDevice.podspec | 6 +- device/package.json | 6 +- dialog/CHANGELOG.md | 8 ++ dialog/CapacitorDialog.podspec | 6 +- dialog/package.json | 6 +- filesystem/CHANGELOG.md | 11 +++ filesystem/CapacitorFilesystem.podspec | 6 +- filesystem/package.json | 6 +- filesystem/src/web.ts | 32 +++++++- geolocation/CHANGELOG.md | 11 +++ geolocation/CapacitorGeolocation.podspec | 6 +- .../plugins/geolocation/Geolocation.java | 66 ++++++++-------- geolocation/package.json | 6 +- haptics/CHANGELOG.md | 8 ++ haptics/CapacitorHaptics.podspec | 6 +- haptics/package.json | 6 +- keyboard/CHANGELOG.md | 8 ++ keyboard/CapacitorKeyboard.podspec | 6 +- keyboard/package.json | 6 +- local-notifications/CHANGELOG.md | 11 +++ .../CapacitorLocalNotifications.podspec | 6 +- local-notifications/README.md | 4 + .../NotificationChannelManager.java | 21 ++++- local-notifications/package.json | 6 +- local-notifications/src/definitions.ts | 9 +++ network/CHANGELOG.md | 8 ++ network/CapacitorNetwork.podspec | 6 +- network/package.json | 6 +- package.json | 3 +- push-notifications/CHANGELOG.md | 11 +++ .../CapacitorPushNotifications.podspec | 6 +- push-notifications/README.md | 4 + .../NotificationChannelManager.java | 21 ++++- push-notifications/package.json | 6 +- push-notifications/src/definitions.ts | 9 +++ screen-reader/CHANGELOG.md | 8 ++ screen-reader/CapacitorScreenReader.podspec | 6 +- screen-reader/package.json | 6 +- share/CHANGELOG.md | 8 ++ share/CapacitorShare.podspec | 6 +- share/package.json | 6 +- splash-screen/CHANGELOG.md | 8 ++ splash-screen/CapacitorSplashScreen.podspec | 6 +- splash-screen/package.json | 6 +- status-bar/CHANGELOG.md | 8 ++ status-bar/CapacitorStatusBar.podspec | 6 +- status-bar/package.json | 6 +- storage/CHANGELOG.md | 11 +++ storage/CapacitorStorage.podspec | 6 +- storage/ios/Plugin/Storage.swift | 4 +- storage/package.json | 6 +- text-zoom/CHANGELOG.md | 8 ++ text-zoom/CapacitorTextZoom.podspec | 6 +- text-zoom/package.json | 6 +- toast/CHANGELOG.md | 8 ++ toast/CapacitorToast.podspec | 6 +- toast/package.json | 6 +- 81 files changed, 583 insertions(+), 178 deletions(-) create mode 100644 .github/cocoapods-deploy.yml diff --git a/.github/cocoapods-deploy.yml b/.github/cocoapods-deploy.yml new file mode 100644 index 000000000..11355e9bf --- /dev/null +++ b/.github/cocoapods-deploy.yml @@ -0,0 +1,39 @@ + +# This workflow is a WIP to get the plugins to deploy to cocoapods +# Its put on hold as it's currently failing during the pod trunk push command +# See the docs on how to run during manual deployment + +# name: Cocoapods Deploy + +# on: +# workflow_dispatch: + +# jobs: +# deploy-cocoapods: +# runs-on: macos-latest +# timeout-minutes: 30 +# steps: +# - uses: actions/setup-node@v1 +# with: +# node-version: 14.x +# - uses: actions/checkout@v2 +# with: +# fetch-depth: 0 +# - name: Install Cocoapods +# run: | +# gem install cocoapods +# - name: Restore Dependency Cache +# id: cache-modules +# uses: actions/cache@v2 +# with: +# path: | +# node_modules +# */node_modules +# key: dependency-cache-${{ hashFiles('package.json', '*/package.json') }} +# - run: npm install +# - name: Deploy to Cocoapods +# run: | +# set -eo pipefail +# npm run publish:cocoapod +# env: +# COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} \ No newline at end of file diff --git a/action-sheet/CHANGELOG.md b/action-sheet/CHANGELOG.md index 576762e30..b7d7ebad1 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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/action-sheet@1.0.2...@capacitor/action-sheet@1.0.3) (2021-09-01) + +**Note:** Version bump only for package @capacitor/action-sheet + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/action-sheet@1.0.1...@capacitor/action-sheet@1.0.2) (2021-06-23) **Note:** Version bump only for package @capacitor/action-sheet diff --git a/action-sheet/CapacitorActionSheet.podspec b/action-sheet/CapacitorActionSheet.podspec index 20fce3178..cd70d07fd 100644 --- a/action-sheet/CapacitorActionSheet.podspec +++ b/action-sheet/CapacitorActionSheet.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'action-sheet/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/action-sheet/package.json b/action-sheet/package.json index 2a7005810..6638d11c8 100644 --- a/action-sheet/package.json +++ b/action-sheet/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/action-sheet", - "version": "1.0.2", + "version": "1.0.3", "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", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorActionSheet.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/app-launcher/CHANGELOG.md b/app-launcher/CHANGELOG.md index 2102fad24..365cd6d52 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. +## [1.0.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/app-launcher@1.0.3...@capacitor/app-launcher@1.0.4) (2021-09-01) + +**Note:** Version bump only for package @capacitor/app-launcher + + + + + ## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/app-launcher@1.0.2...@capacitor/app-launcher@1.0.3) (2021-08-18) **Note:** Version bump only for package @capacitor/app-launcher diff --git a/app-launcher/CapacitorAppLauncher.podspec b/app-launcher/CapacitorAppLauncher.podspec index 0874ec11d..7d9aba6f2 100644 --- a/app-launcher/CapacitorAppLauncher.podspec +++ b/app-launcher/CapacitorAppLauncher.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'app-launcher/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/app-launcher/package.json b/app-launcher/package.json index 96159dbfc..651c959df 100644 --- a/app-launcher/package.json +++ b/app-launcher/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/app-launcher", - "version": "1.0.3", + "version": "1.0.4", "description": "The AppLauncher API allows to open other apps", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorAppLauncher.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/app/CHANGELOG.md b/app/CHANGELOG.md index 1c9825c68..9113cc4c0 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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/app@1.0.2...@capacitor/app@1.0.3) (2021-09-01) + +**Note:** Version bump only for package @capacitor/app + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/app@1.0.1...@capacitor/app@1.0.2) (2021-06-23) diff --git a/app/CapacitorApp.podspec b/app/CapacitorApp.podspec index d7d708888..cec3ad2c4 100644 --- a/app/CapacitorApp.podspec +++ b/app/CapacitorApp.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'app/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/app/package.json b/app/package.json index 507b6d442..7f68f0bb4 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/app", - "version": "1.0.2", + "version": "1.0.3", "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", diff --git a/browser/CHANGELOG.md b/browser/CHANGELOG.md index cba0b9bf4..9ecaea6fd 100644 --- a/browser/CHANGELOG.md +++ b/browser/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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/browser@1.0.2...@capacitor/browser@1.0.3) (2021-09-01) + + +### Bug Fixes + +* Correct missing source_files path ([#590](https://github.com/ionic-team/capacitor-plugins/issues/590)) ([24e0fc2](https://github.com/ionic-team/capacitor-plugins/commit/24e0fc27cc314049012ab9915fa5e7bfb03313e1)) + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/browser@1.0.1...@capacitor/browser@1.0.2) (2021-06-23) diff --git a/browser/CapacitorBrowser.podspec b/browser/CapacitorBrowser.podspec index fd5a4a49c..b8cb7fa99 100644 --- a/browser/CapacitorBrowser.podspec +++ b/browser/CapacitorBrowser.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'browser/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/browser/README.md b/browser/README.md index 3306fdbea..0a98367f0 100644 --- a/browser/README.md +++ b/browser/README.md @@ -83,7 +83,8 @@ No-op on other platforms. addListener(eventName: 'browserFinished', listenerFunc: () => void) => Promise & PluginListenerHandle ``` -Android & iOS only: Listen for the loading finished event. +Android & iOS only: Listen for the browser finished event. +It fires when the Browser is closed by the user. | Param | Type | | ------------------ | ------------------------------ | @@ -104,6 +105,8 @@ addListener(eventName: 'browserPageLoaded', listenerFunc: () => void) => Promise ``` Android & iOS only: Listen for the page loaded event. +It's only fired when the URL passed to open method finish loading. +It is not invoked for any subsequent page loads. | Param | Type | | ------------------ | -------------------------------- | diff --git a/browser/package.json b/browser/package.json index 298aaf004..44428311e 100644 --- a/browser/package.json +++ b/browser/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/browser", - "version": "1.0.2", + "version": "1.0.3", "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", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorBrowser.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/browser/src/definitions.ts b/browser/src/definitions.ts index 31412a887..78ba1b481 100644 --- a/browser/src/definitions.ts +++ b/browser/src/definitions.ts @@ -18,7 +18,8 @@ export interface BrowserPlugin { close(): Promise; /** - * Android & iOS only: Listen for the loading finished event. + * Android & iOS only: Listen for the browser finished event. + * It fires when the Browser is closed by the user. * * @since 1.0.0 */ @@ -29,6 +30,8 @@ export interface BrowserPlugin { /** * Android & iOS only: Listen for the page loaded event. + * It's only fired when the URL passed to open method finish loading. + * It is not invoked for any subsequent page loads. * * @since 1.0.0 */ diff --git a/camera/CHANGELOG.md b/camera/CHANGELOG.md index 0f3457117..21a75bc85 100644 --- a/camera/CHANGELOG.md +++ b/camera/CHANGELOG.md @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.5](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/camera@1.0.4...@capacitor/camera@1.0.5) (2021-09-01) + + +### Bug Fixes + +* Correct missing source_files path ([#590](https://github.com/ionic-team/capacitor-plugins/issues/590)) ([24e0fc2](https://github.com/ionic-team/capacitor-plugins/commit/24e0fc27cc314049012ab9915fa5e7bfb03313e1)) +* **camera:** cleanup camera images if not needed ([#563](https://github.com/ionic-team/capacitor-plugins/issues/563)) ([a2e4f43](https://github.com/ionic-team/capacitor-plugins/commit/a2e4f4339119698e8dd066a5f2f8f065ab2e4727)) +* **camera:** Resize not respecting aspect ratio on iOS ([#568](https://github.com/ionic-team/capacitor-plugins/issues/568)) ([ea2b801](https://github.com/ionic-team/capacitor-plugins/commit/ea2b8012aab7e5ea34cfa34735f7f55ba76a3882)) +* **camera:** return original image if editing is cancelled ([#566](https://github.com/ionic-team/capacitor-plugins/issues/566)) ([4786841](https://github.com/ionic-team/capacitor-plugins/commit/4786841099403a4d3d59aaf9103e8fa02aa8e4e2)) + + + + + ## [1.0.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/camera@1.0.3...@capacitor/camera@1.0.4) (2021-08-18) diff --git a/camera/CapacitorCamera.podspec b/camera/CapacitorCamera.podspec index 363c77e39..f915839d0 100644 --- a/camera/CapacitorCamera.podspec +++ b/camera/CapacitorCamera.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'camera/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' 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 cbbfd9f0f..61024bc33 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 @@ -1,6 +1,7 @@ package com.capacitorjs.plugins.camera; import android.Manifest; +import android.app.Activity; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; @@ -75,6 +76,7 @@ public class CameraPlugin extends Plugin { private String imageFileSavePath; private String imageEditedFileSavePath; private Uri imageFileUri; + private Uri imagePickedContentUri; private boolean isEdited = false; private CameraSettings settings = new CameraSettings(); @@ -282,10 +284,16 @@ public void processPickedImage(PluginCall call, ActivityResult result) { Uri u = data.getData(); + imagePickedContentUri = u; + + processPickedImage(u, call); + } + + private void processPickedImage(Uri imageUri, PluginCall call) { InputStream imageStream = null; try { - imageStream = getContext().getContentResolver().openInputStream(u); + imageStream = getContext().getContentResolver().openInputStream(imageUri); Bitmap bitmap = BitmapFactory.decodeStream(imageStream); if (bitmap == null) { @@ -293,7 +301,7 @@ public void processPickedImage(PluginCall call, ActivityResult result) { return; } - returnResult(call, bitmap, u); + returnResult(call, bitmap, imageUri); } catch (OutOfMemoryError err) { call.reject("Out of memory"); } catch (FileNotFoundException ex) { @@ -312,25 +320,40 @@ public void processPickedImage(PluginCall call, ActivityResult result) { @ActivityCallback private void processEditedImage(PluginCall call, ActivityResult result) { isEdited = true; - processPickedImage(call, result); + + if (result.getResultCode() == Activity.RESULT_CANCELED) { + // User cancelled the edit operation, if this file was picked from photos, + // process the original picked image, otherwise process it as a camera photo + if (imagePickedContentUri != null) { + processPickedImage(imagePickedContentUri, call); + } else { + processCameraImage(call, result); + } + } else { + processPickedImage(call, result); + } } /** - * Save the modified image we've created to a temporary location, so we can - * return a URI to it later - * @param bitmap - * @param contentUri + * Save the modified image on the same path, + * or on a temporary location if it's a content url + * @param uri * @param is * @return * @throws IOException */ - private Uri saveTemporaryImage(Bitmap bitmap, Uri contentUri, InputStream is) throws IOException { - String filename = Uri.parse(Uri.decode(contentUri.toString())).getLastPathSegment(); - if (!filename.contains(".jpg") && !filename.contains(".jpeg")) { - filename += "." + (new java.util.Date()).getTime() + ".jpeg"; + private Uri saveImage(Uri uri, InputStream is) throws IOException { + File outFile = null; + if (uri.getScheme().equals("content")) { + String filename = Uri.parse(Uri.decode(uri.toString())).getLastPathSegment(); + if (!filename.contains(".jpg") && !filename.contains(".jpeg")) { + filename += "." + (new java.util.Date()).getTime() + ".jpeg"; + } + File cacheDir = getContext().getCacheDir(); + outFile = new File(cacheDir, filename); + } else { + outFile = new File(uri.getPath()); } - File cacheDir = getContext().getCacheDir(); - File outFile = new File(cacheDir, filename); FileOutputStream fos = new FileOutputStream(outFile); byte[] buffer = new byte[1024]; int len; @@ -360,7 +383,7 @@ private void returnResult(PluginCall call, Bitmap bitmap, Uri u) { bitmap.compress(Bitmap.CompressFormat.JPEG, settings.getQuality(), bitmapOutputStream); if (settings.isAllowEditing() && !isEdited) { - editImage(call, bitmap, u, bitmapOutputStream); + editImage(call, u, bitmapOutputStream); return; } @@ -384,15 +407,27 @@ private void returnResult(PluginCall call, Bitmap bitmap, Uri u) { } else { call.reject(INVALID_RESULT_TYPE_ERROR); } - - // Result returned, clear stored paths + // Result returned, clear stored paths and images + if (settings.getResultType() != CameraResultType.URI) { + deleteImageFile(); + } imageFileSavePath = null; imageFileUri = null; + imagePickedContentUri = null; imageEditedFileSavePath = null; } + private void deleteImageFile() { + if (imageFileSavePath != null && !settings.isSaveToGallery()) { + File photoFile = new File(imageFileSavePath); + if (photoFile.exists()) { + photoFile.delete(); + } + } + } + private void returnFileURI(PluginCall call, ExifWrapper exif, Bitmap bitmap, Uri u, ByteArrayOutputStream bitmapOutputStream) { - Uri newUri = getTempImage(bitmap, u, bitmapOutputStream); + Uri newUri = getTempImage(u, bitmapOutputStream); exif.copyExif(newUri.getPath()); if (newUri != null) { JSObject ret = new JSObject(); @@ -406,12 +441,12 @@ private void returnFileURI(PluginCall call, ExifWrapper exif, Bitmap bitmap, Uri } } - private Uri getTempImage(Bitmap bitmap, Uri u, ByteArrayOutputStream bitmapOutputStream) { + private Uri getTempImage(Uri u, ByteArrayOutputStream bitmapOutputStream) { ByteArrayInputStream bis = null; Uri newUri = null; try { bis = new ByteArrayInputStream(bitmapOutputStream.toByteArray()); - newUri = saveTemporaryImage(bitmap, u, bis); + newUri = saveImage(u, bis); } catch (IOException ex) {} finally { if (bis != null) { try { @@ -516,9 +551,9 @@ public Map getPermissionStates() { return permissionStates; } - private void editImage(PluginCall call, Bitmap bitmap, Uri uri, ByteArrayOutputStream bitmapOutputStream) { + private void editImage(PluginCall call, Uri uri, ByteArrayOutputStream bitmapOutputStream) { try { - Uri tempImage = getTempImage(bitmap, uri, bitmapOutputStream); + Uri tempImage = getTempImage(uri, bitmapOutputStream); Intent editIntent = createEditIntent(tempImage); if (editIntent != null) { startActivityForResult(call, editIntent, "processEditedImage"); diff --git a/camera/ios/Plugin/CameraExtensions.swift b/camera/ios/Plugin/CameraExtensions.swift index ceb34376f..3ba08569c 100644 --- a/camera/ios/Plugin/CameraExtensions.swift +++ b/camera/ios/Plugin/CameraExtensions.swift @@ -88,7 +88,7 @@ internal extension UIImage { } // adjust to preserve aspect ratio var targetWidth = min(imageWidth, maxWidth) - var targetHeight = (imageHeight * maxWidth) / imageWidth + var targetHeight = (imageHeight * targetWidth) / imageWidth if targetHeight > maxHeight { targetWidth = (imageWidth * maxHeight) / imageHeight targetHeight = maxHeight diff --git a/camera/package.json b/camera/package.json index 00fe0bbec..19d8f14a0 100644 --- a/camera/package.json +++ b/camera/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/camera", - "version": "1.0.4", + "version": "1.0.5", "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", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorCamera.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/clipboard/CHANGELOG.md b/clipboard/CHANGELOG.md index 575738d47..699fdd38a 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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/clipboard@1.0.2...@capacitor/clipboard@1.0.3) (2021-09-01) + +**Note:** Version bump only for package @capacitor/clipboard + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/clipboard@1.0.1...@capacitor/clipboard@1.0.2) (2021-06-23) **Note:** Version bump only for package @capacitor/clipboard diff --git a/clipboard/CapacitorClipboard.podspec b/clipboard/CapacitorClipboard.podspec index eee6d8aa1..8f3602214 100644 --- a/clipboard/CapacitorClipboard.podspec +++ b/clipboard/CapacitorClipboard.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'clipboard/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/clipboard/package.json b/clipboard/package.json index 7136ea9d0..a89c846ff 100644 --- a/clipboard/package.json +++ b/clipboard/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/clipboard", - "version": "1.0.2", + "version": "1.0.3", "description": "The Clipboard API enables copy and pasting to/from the system clipboard.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorClipboard.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/device/CHANGELOG.md b/device/CHANGELOG.md index b772507ee..821ef7303 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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/device@1.0.2...@capacitor/device@1.0.3) (2021-09-01) + +**Note:** Version bump only for package @capacitor/device + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/device@1.0.1...@capacitor/device@1.0.2) (2021-06-23) **Note:** Version bump only for package @capacitor/device diff --git a/device/CapacitorDevice.podspec b/device/CapacitorDevice.podspec index 7277b92cf..79f70bed8 100644 --- a/device/CapacitorDevice.podspec +++ b/device/CapacitorDevice.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'device/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/device/package.json b/device/package.json index cf82051b7..cf60f890a 100644 --- a/device/package.json +++ b/device/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/device", - "version": "1.0.2", + "version": "1.0.3", "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", @@ -42,7 +42,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorDevice.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/dialog/CHANGELOG.md b/dialog/CHANGELOG.md index 04cf72fd1..c4a0922da 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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/dialog@1.0.2...@capacitor/dialog@1.0.3) (2021-09-01) + +**Note:** Version bump only for package @capacitor/dialog + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/dialog@1.0.1...@capacitor/dialog@1.0.2) (2021-06-23) **Note:** Version bump only for package @capacitor/dialog diff --git a/dialog/CapacitorDialog.podspec b/dialog/CapacitorDialog.podspec index c3bfbc1f2..d0d26084f 100644 --- a/dialog/CapacitorDialog.podspec +++ b/dialog/CapacitorDialog.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'dialog/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/dialog/package.json b/dialog/package.json index 4f26806ee..ca784c75e 100644 --- a/dialog/package.json +++ b/dialog/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/dialog", - "version": "1.0.2", + "version": "1.0.3", "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", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorDialog.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/filesystem/CHANGELOG.md b/filesystem/CHANGELOG.md index 1368f2cbc..ac978c385 100644 --- a/filesystem/CHANGELOG.md +++ b/filesystem/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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/filesystem@1.0.2...@capacitor/filesystem@1.0.3) (2021-09-01) + + +### Bug Fixes + +* **filesystem:** allow copy if from is not parent of to ([#546](https://github.com/ionic-team/capacitor-plugins/issues/546)) ([a70414e](https://github.com/ionic-team/capacitor-plugins/commit/a70414e79189579ff1a0b5c2a90d12491f5c23cf)) + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/filesystem@1.0.1...@capacitor/filesystem@1.0.2) (2021-06-23) **Note:** Version bump only for package @capacitor/filesystem diff --git a/filesystem/CapacitorFilesystem.podspec b/filesystem/CapacitorFilesystem.podspec index 149bdd6cb..18388eb47 100644 --- a/filesystem/CapacitorFilesystem.podspec +++ b/filesystem/CapacitorFilesystem.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'filesystem/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/filesystem/package.json b/filesystem/package.json index 1741bb842..c068c5e88 100644 --- a/filesystem/package.json +++ b/filesystem/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/filesystem", - "version": "1.0.2", + "version": "1.0.3", "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", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorFilesystem.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/filesystem/src/web.ts b/filesystem/src/web.ts index 41935cff0..164db8bcb 100644 --- a/filesystem/src/web.ts +++ b/filesystem/src/web.ts @@ -22,6 +22,36 @@ import type { Directory, } from './definitions'; +function resolve(path: string): string { + const posix = path.split('/').filter(item => item !== '.'); + const newPosix: string[] = []; + + posix.forEach(item => { + if ( + item === '..' && + newPosix.length > 0 && + newPosix[newPosix.length - 1] !== '..' + ) { + newPosix.pop(); + } else { + newPosix.push(item); + } + }); + + return newPosix.join('/'); +} +function isPathParent(parent: string, children: string): boolean { + parent = resolve(parent); + children = resolve(children); + const pathsA = parent.split('/'); + const pathsB = children.split('/'); + + return ( + parent !== children && + pathsA.every((value, index) => value === pathsB[index]) + ); +} + export class FilesystemWeb extends WebPlugin implements FilesystemPlugin { DB_VERSION = 1; DB_NAME = 'Disc'; @@ -431,7 +461,7 @@ export class FilesystemWeb extends WebPlugin implements FilesystemPlugin { return; } - if (toPath.startsWith(fromPath)) { + if (isPathParent(fromPath, toPath)) { throw Error('To path cannot contain the from path'); } diff --git a/geolocation/CHANGELOG.md b/geolocation/CHANGELOG.md index 7f5b51b97..19a9d9ba5 100644 --- a/geolocation/CHANGELOG.md +++ b/geolocation/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. +# [1.1.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/geolocation@1.0.2...@capacitor/geolocation@1.1.0) (2021-09-01) + + +### Features + +* **geolocation:** Throw error if location is disabled ([#589](https://github.com/ionic-team/capacitor-plugins/issues/589)) ([14724c5](https://github.com/ionic-team/capacitor-plugins/commit/14724c5ec5b23bf94f6f3511bbe204482768d10f)) + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/geolocation@1.0.1...@capacitor/geolocation@1.0.2) (2021-06-23) diff --git a/geolocation/CapacitorGeolocation.podspec b/geolocation/CapacitorGeolocation.podspec index 35a61540a..cf4aadb87 100644 --- a/geolocation/CapacitorGeolocation.podspec +++ b/geolocation/CapacitorGeolocation.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'geolocation/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/geolocation/android/src/main/java/com/capacitorjs/plugins/geolocation/Geolocation.java b/geolocation/android/src/main/java/com/capacitorjs/plugins/geolocation/Geolocation.java index 60e92963d..1506c1eb8 100644 --- a/geolocation/android/src/main/java/com/capacitorjs/plugins/geolocation/Geolocation.java +++ b/geolocation/android/src/main/java/com/capacitorjs/plugins/geolocation/Geolocation.java @@ -3,8 +3,8 @@ import android.content.Context; import android.location.Location; import android.location.LocationManager; +import androidx.core.location.LocationManagerCompat; import com.google.android.gms.location.FusedLocationProviderClient; -import com.google.android.gms.location.LocationAvailability; import com.google.android.gms.location.LocationCallback; import com.google.android.gms.location.LocationRequest; import com.google.android.gms.location.LocationResult; @@ -41,45 +41,41 @@ public void requestLocationUpdates( fusedLocationClient = LocationServices.getFusedLocationProviderClient(context); LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); - boolean networkEnabled = false; + if (LocationManagerCompat.isLocationEnabled(lm)) { + boolean networkEnabled = false; - try { - networkEnabled = lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER); - } catch (Exception ex) {} + try { + networkEnabled = lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER); + } catch (Exception ex) {} - LocationRequest locationRequest = new LocationRequest(); - locationRequest.setMaxWaitTime(timeout); - locationRequest.setInterval(10000); - locationRequest.setFastestInterval(5000); - int lowPriority = networkEnabled ? LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY : LocationRequest.PRIORITY_LOW_POWER; - int priority = enableHighAccuracy ? LocationRequest.PRIORITY_HIGH_ACCURACY : lowPriority; - locationRequest.setPriority(priority); + LocationRequest locationRequest = new LocationRequest(); + locationRequest.setMaxWaitTime(timeout); + locationRequest.setInterval(10000); + locationRequest.setFastestInterval(5000); + int lowPriority = networkEnabled ? LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY : LocationRequest.PRIORITY_LOW_POWER; + int priority = enableHighAccuracy ? LocationRequest.PRIORITY_HIGH_ACCURACY : lowPriority; + locationRequest.setPriority(priority); - locationCallback = - new LocationCallback() { - @Override - public void onLocationResult(LocationResult locationResult) { - if (getCurrentPosition) { - clearLocationUpdates(); + locationCallback = + new LocationCallback() { + @Override + public void onLocationResult(LocationResult locationResult) { + if (getCurrentPosition) { + clearLocationUpdates(); + } + Location lastLocation = locationResult.getLastLocation(); + if (lastLocation == null) { + resultCallback.error("location unavailable"); + } else { + resultCallback.success(lastLocation); + } } - Location lastLocation = locationResult.getLastLocation(); - if (lastLocation == null) { - resultCallback.error("location unavailable"); - } else { - resultCallback.success(lastLocation); - } - } - - @Override - public void onLocationAvailability(LocationAvailability availability) { - if (!availability.isLocationAvailable()) { - resultCallback.error("location unavailable"); - clearLocationUpdates(); - } - } - }; + }; - fusedLocationClient.requestLocationUpdates(locationRequest, locationCallback, null); + fusedLocationClient.requestLocationUpdates(locationRequest, locationCallback, null); + } else { + resultCallback.error("location disabled"); + } } public void clearLocationUpdates() { diff --git a/geolocation/package.json b/geolocation/package.json index faa63d9b7..e29308b4d 100644 --- a/geolocation/package.json +++ b/geolocation/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/geolocation", - "version": "1.0.2", + "version": "1.1.0", "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", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorGeolocation.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/haptics/CHANGELOG.md b/haptics/CHANGELOG.md index 88a9f5547..38f01bfcc 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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/haptics@1.0.2...@capacitor/haptics@1.0.3) (2021-09-01) + +**Note:** Version bump only for package @capacitor/haptics + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/haptics@1.0.1...@capacitor/haptics@1.0.2) (2021-06-23) **Note:** Version bump only for package @capacitor/haptics diff --git a/haptics/CapacitorHaptics.podspec b/haptics/CapacitorHaptics.podspec index 5a60b82dc..e653ec4d1 100644 --- a/haptics/CapacitorHaptics.podspec +++ b/haptics/CapacitorHaptics.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'haptics/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/haptics/package.json b/haptics/package.json index 544ab34c6..f09b72e0b 100644 --- a/haptics/package.json +++ b/haptics/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/haptics", - "version": "1.0.2", + "version": "1.0.3", "description": "The Haptics API provides physical feedback to the user through touch or vibration.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorHaptics.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/keyboard/CHANGELOG.md b/keyboard/CHANGELOG.md index 6fccda0f2..d1a7348a8 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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/keyboard@1.0.2...@capacitor/keyboard@1.0.3) (2021-09-01) + +**Note:** Version bump only for package @capacitor/keyboard + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/keyboard@1.0.1...@capacitor/keyboard@1.0.2) (2021-06-23) **Note:** Version bump only for package @capacitor/keyboard diff --git a/keyboard/CapacitorKeyboard.podspec b/keyboard/CapacitorKeyboard.podspec index 3b459d0d6..14c1e4d97 100644 --- a/keyboard/CapacitorKeyboard.podspec +++ b/keyboard/CapacitorKeyboard.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'keyboard/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/keyboard/package.json b/keyboard/package.json index 74ac112d7..18da0d008 100644 --- a/keyboard/package.json +++ b/keyboard/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/keyboard", - "version": "1.0.2", + "version": "1.0.3", "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", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorKeyboard.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/local-notifications/CHANGELOG.md b/local-notifications/CHANGELOG.md index f9d67a24f..e9c5583a4 100644 --- a/local-notifications/CHANGELOG.md +++ b/local-notifications/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. +## [1.0.5](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/local-notifications@1.0.4...@capacitor/local-notifications@1.0.5) (2021-09-01) + + +### Bug Fixes + +* **local-notifications:** Throw errors if missing mandatory channel fields ([#577](https://github.com/ionic-team/capacitor-plugins/issues/577)) ([6bf3a4f](https://github.com/ionic-team/capacitor-plugins/commit/6bf3a4f0de8880588200ae60e73427fa6959ea20)) + + + + + ## [1.0.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/local-notifications@1.0.3...@capacitor/local-notifications@1.0.4) (2021-08-18) diff --git a/local-notifications/CapacitorLocalNotifications.podspec b/local-notifications/CapacitorLocalNotifications.podspec index 5f674e205..4e69271f9 100644 --- a/local-notifications/CapacitorLocalNotifications.podspec +++ b/local-notifications/CapacitorLocalNotifications.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'local-notifications/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/local-notifications/README.md b/local-notifications/README.md index 2a8c7063c..80fe79aaf 100644 --- a/local-notifications/README.md +++ b/local-notifications/README.md @@ -595,11 +595,15 @@ An action that can be taken when a notification is displayed. #### Importance +The importance level. For more details, see the [Android Developer Docs](https://developer.android.com/reference/android/app/NotificationManager#IMPORTANCE_DEFAULT) + 1 | 2 | 3 | 4 | 5 #### Visibility +The notification visibility. For more details, see the [Android Developer Docs](https://developer.android.com/reference/androidx/core/app/NotificationCompat#VISIBILITY_PRIVATE) + -1 | 0 | 1 diff --git a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/NotificationChannelManager.java b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/NotificationChannelManager.java index bf969684e..7ff89cf45 100644 --- a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/NotificationChannelManager.java +++ b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/NotificationChannelManager.java @@ -42,11 +42,26 @@ public NotificationChannelManager(Context context, NotificationManager manager) public void createChannel(PluginCall call) { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { JSObject channel = new JSObject(); - channel.put(CHANNEL_ID, call.getString(CHANNEL_ID)); - channel.put(CHANNEL_NAME, call.getString(CHANNEL_NAME)); + if (call.getString(CHANNEL_ID) != null) { + channel.put(CHANNEL_ID, call.getString(CHANNEL_ID)); + } else { + call.reject("Channel missing identifier"); + return; + } + if (call.getString(CHANNEL_NAME) != null) { + channel.put(CHANNEL_NAME, call.getString(CHANNEL_NAME)); + } else { + call.reject("Channel missing name"); + return; + } + if (call.getInt(CHANNEL_IMPORTANCE) != null) { + channel.put(CHANNEL_IMPORTANCE, call.getInt(CHANNEL_IMPORTANCE)); + } else { + call.reject("Channel missing importance"); + return; + } channel.put(CHANNEL_DESCRIPTION, call.getString(CHANNEL_DESCRIPTION, "")); channel.put(CHANNEL_VISIBILITY, call.getInt(CHANNEL_VISIBILITY, NotificationCompat.VISIBILITY_PUBLIC)); - channel.put(CHANNEL_IMPORTANCE, call.getInt(CHANNEL_IMPORTANCE)); channel.put(CHANNEL_SOUND, call.getString(CHANNEL_SOUND, null)); channel.put(CHANNEL_VIBRATE, call.getBoolean(CHANNEL_VIBRATE, false)); channel.put(CHANNEL_USE_LIGHTS, call.getBoolean(CHANNEL_USE_LIGHTS, false)); diff --git a/local-notifications/package.json b/local-notifications/package.json index 2afef9daf..a4ffdb399 100644 --- a/local-notifications/package.json +++ b/local-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/local-notifications", - "version": "1.0.4", + "version": "1.0.5", "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", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorLocalNotifications.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/local-notifications/src/definitions.ts b/local-notifications/src/definitions.ts index 92cc6dca9..a3d0cdb89 100644 --- a/local-notifications/src/definitions.ts +++ b/local-notifications/src/definitions.ts @@ -928,7 +928,16 @@ export interface Channel { vibration?: boolean; } +/** + * The importance level. For more details, see the [Android Developer Docs](https://developer.android.com/reference/android/app/NotificationManager#IMPORTANCE_DEFAULT) + * @since 1.0.0 + */ export type Importance = 1 | 2 | 3 | 4 | 5; + +/** + * The notification visibility. For more details, see the [Android Developer Docs](https://developer.android.com/reference/androidx/core/app/NotificationCompat#VISIBILITY_PRIVATE) + * @since 1.0.0 + */ export type Visibility = -1 | 0 | 1; /** diff --git a/network/CHANGELOG.md b/network/CHANGELOG.md index 957ddd0d8..1ddf66103 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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/network@1.0.2...@capacitor/network@1.0.3) (2021-09-01) + +**Note:** Version bump only for package @capacitor/network + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/network@1.0.1...@capacitor/network@1.0.2) (2021-06-23) **Note:** Version bump only for package @capacitor/network diff --git a/network/CapacitorNetwork.podspec b/network/CapacitorNetwork.podspec index 3aa5bb7d4..b6711de98 100644 --- a/network/CapacitorNetwork.podspec +++ b/network/CapacitorNetwork.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'network/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.dependency 'ReachabilitySwift', '~> 5.0' diff --git a/network/package.json b/network/package.json index 113859018..51d547323 100644 --- a/network/package.json +++ b/network/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/network", - "version": "1.0.2", + "version": "1.0.3", "description": "The Network API provides network and connectivity information.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorNetwork.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/package.json b/package.json index 651873aab..a5b9271d6 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "update-all": "node ./scripts/update-all.mjs", "set-capacitor-version": "node ./scripts/set-capacitor-version.mjs", "postinstall": "lerna bootstrap", - "release": "lerna publish" + "release": "lerna publish", + "publish:cocoapod": "lerna run publish:cocoapod --concurrency 1" }, "devDependencies": { "@actions/core": "^1.2.6", diff --git a/push-notifications/CHANGELOG.md b/push-notifications/CHANGELOG.md index fbfee28cb..d5c4a04bd 100644 --- a/push-notifications/CHANGELOG.md +++ b/push-notifications/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. +## [1.0.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/push-notifications@1.0.3...@capacitor/push-notifications@1.0.4) (2021-09-01) + + +### Bug Fixes + +* **push-notifications:** Throw errors if missing mandatory channel fields ([#576](https://github.com/ionic-team/capacitor-plugins/issues/576)) ([50f4e70](https://github.com/ionic-team/capacitor-plugins/commit/50f4e7026e5cae5f0871d4863bfab36989208064)) + + + + + ## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/push-notifications@1.0.2...@capacitor/push-notifications@1.0.3) (2021-07-07) **Note:** Version bump only for package @capacitor/push-notifications diff --git a/push-notifications/CapacitorPushNotifications.podspec b/push-notifications/CapacitorPushNotifications.podspec index 88b1f0e4b..22f681fbe 100644 --- a/push-notifications/CapacitorPushNotifications.podspec +++ b/push-notifications/CapacitorPushNotifications.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'push-notifications/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/push-notifications/README.md b/push-notifications/README.md index 4f0f5a88b..56f7fa0b3 100644 --- a/push-notifications/README.md +++ b/push-notifications/README.md @@ -475,11 +475,15 @@ Remove all native listeners for this plugin. #### Importance +The importance level. For more details, see the [Android Developer Docs](https://developer.android.com/reference/android/app/NotificationManager#IMPORTANCE_DEFAULT) + 1 | 2 | 3 | 4 | 5 #### Visibility +The notification visibility. For more details, see the [Android Developer Docs](https://developer.android.com/reference/androidx/core/app/NotificationCompat#VISIBILITY_PRIVATE) + -1 | 0 | 1 diff --git a/push-notifications/android/src/main/java/com/capacitorjs/plugins/pushnotifications/NotificationChannelManager.java b/push-notifications/android/src/main/java/com/capacitorjs/plugins/pushnotifications/NotificationChannelManager.java index 4db9f7f6c..f2c40ade9 100644 --- a/push-notifications/android/src/main/java/com/capacitorjs/plugins/pushnotifications/NotificationChannelManager.java +++ b/push-notifications/android/src/main/java/com/capacitorjs/plugins/pushnotifications/NotificationChannelManager.java @@ -38,11 +38,26 @@ public NotificationChannelManager(Context context, NotificationManager manager) public void createChannel(PluginCall call) { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { JSObject channel = new JSObject(); - channel.put(CHANNEL_ID, call.getString(CHANNEL_ID)); - channel.put(CHANNEL_NAME, call.getString(CHANNEL_NAME)); + if (call.getString(CHANNEL_ID) != null) { + channel.put(CHANNEL_ID, call.getString(CHANNEL_ID)); + } else { + call.reject("Channel missing identifier"); + return; + } + if (call.getString(CHANNEL_NAME) != null) { + channel.put(CHANNEL_NAME, call.getString(CHANNEL_NAME)); + } else { + call.reject("Channel missing name"); + return; + } + if (call.getInt(CHANNEL_IMPORTANCE) != null) { + channel.put(CHANNEL_IMPORTANCE, call.getInt(CHANNEL_IMPORTANCE)); + } else { + call.reject("Channel missing importance"); + return; + } channel.put(CHANNEL_DESCRIPTION, call.getString(CHANNEL_DESCRIPTION, "")); channel.put(CHANNEL_VISIBILITY, call.getInt(CHANNEL_VISIBILITY, NotificationCompat.VISIBILITY_PUBLIC)); - channel.put(CHANNEL_IMPORTANCE, call.getInt(CHANNEL_IMPORTANCE)); channel.put(CHANNEL_SOUND, call.getString(CHANNEL_SOUND, null)); channel.put(CHANNEL_VIBRATE, call.getBoolean(CHANNEL_VIBRATE, false)); channel.put(CHANNEL_USE_LIGHTS, call.getBoolean(CHANNEL_USE_LIGHTS, false)); diff --git a/push-notifications/package.json b/push-notifications/package.json index 8070468f4..620e25d16 100644 --- a/push-notifications/package.json +++ b/push-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/push-notifications", - "version": "1.0.3", + "version": "1.0.4", "description": "The Push Notifications API provides access to native push notifications.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorPushNotifications.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/push-notifications/src/definitions.ts b/push-notifications/src/definitions.ts index bce8b0482..c46250361 100644 --- a/push-notifications/src/definitions.ts +++ b/push-notifications/src/definitions.ts @@ -383,7 +383,16 @@ export interface Channel { vibration?: boolean; } +/** + * The importance level. For more details, see the [Android Developer Docs](https://developer.android.com/reference/android/app/NotificationManager#IMPORTANCE_DEFAULT) + * @since 1.0.0 + */ export type Importance = 1 | 2 | 3 | 4 | 5; + +/** + * The notification visibility. For more details, see the [Android Developer Docs](https://developer.android.com/reference/androidx/core/app/NotificationCompat#VISIBILITY_PRIVATE) + * @since 1.0.0 + */ export type Visibility = -1 | 0 | 1; export interface ListChannelsResult { diff --git a/screen-reader/CHANGELOG.md b/screen-reader/CHANGELOG.md index acd59a0f5..354a1e681 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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/screen-reader@1.0.2...@capacitor/screen-reader@1.0.3) (2021-09-01) + +**Note:** Version bump only for package @capacitor/screen-reader + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/screen-reader@1.0.1...@capacitor/screen-reader@1.0.2) (2021-06-23) **Note:** Version bump only for package @capacitor/screen-reader diff --git a/screen-reader/CapacitorScreenReader.podspec b/screen-reader/CapacitorScreenReader.podspec index ceade2c9a..37e2cb0af 100644 --- a/screen-reader/CapacitorScreenReader.podspec +++ b/screen-reader/CapacitorScreenReader.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'screen-reader/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/screen-reader/package.json b/screen-reader/package.json index 6b3f059af..d3c463e8b 100644 --- a/screen-reader/package.json +++ b/screen-reader/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/screen-reader", - "version": "1.0.2", + "version": "1.0.3", "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", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorScreenReader.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/share/CHANGELOG.md b/share/CHANGELOG.md index 9299c8ea8..f8440cd23 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. +## [1.0.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/share@1.0.3...@capacitor/share@1.0.4) (2021-09-01) + +**Note:** Version bump only for package @capacitor/share + + + + + ## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/share@1.0.2...@capacitor/share@1.0.3) (2021-07-07) diff --git a/share/CapacitorShare.podspec b/share/CapacitorShare.podspec index be880f287..592f92178 100644 --- a/share/CapacitorShare.podspec +++ b/share/CapacitorShare.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'share/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/share/package.json b/share/package.json index 1b5101ee9..ce4b25fed 100644 --- a/share/package.json +++ b/share/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/share", - "version": "1.0.3", + "version": "1.0.4", "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", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorShare.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/splash-screen/CHANGELOG.md b/splash-screen/CHANGELOG.md index 2e27838ca..18d1bc318 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. +## [1.1.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/splash-screen@1.1.1...@capacitor/splash-screen@1.1.2) (2021-09-01) + +**Note:** Version bump only for package @capacitor/splash-screen + + + + + ## [1.1.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/splash-screen@1.1.0...@capacitor/splash-screen@1.1.1) (2021-08-18) diff --git a/splash-screen/CapacitorSplashScreen.podspec b/splash-screen/CapacitorSplashScreen.podspec index 5da1ef50a..3c7cc22b9 100644 --- a/splash-screen/CapacitorSplashScreen.podspec +++ b/splash-screen/CapacitorSplashScreen.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'splash-screen/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/splash-screen/package.json b/splash-screen/package.json index 2e3b27214..19027c9c8 100644 --- a/splash-screen/package.json +++ b/splash-screen/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/splash-screen", - "version": "1.1.1", + "version": "1.1.2", "description": "The Splash Screen API provides methods for showing or hiding a Splash image.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorSplashScreen.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/status-bar/CHANGELOG.md b/status-bar/CHANGELOG.md index ca6579478..309aff69d 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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/status-bar@1.0.2...@capacitor/status-bar@1.0.3) (2021-09-01) + +**Note:** Version bump only for package @capacitor/status-bar + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/status-bar@1.0.1...@capacitor/status-bar@1.0.2) (2021-06-23) **Note:** Version bump only for package @capacitor/status-bar diff --git a/status-bar/CapacitorStatusBar.podspec b/status-bar/CapacitorStatusBar.podspec index 735d84f89..af923b0ff 100644 --- a/status-bar/CapacitorStatusBar.podspec +++ b/status-bar/CapacitorStatusBar.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'status-bar/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/status-bar/package.json b/status-bar/package.json index ea42698c6..84bb1bf43 100644 --- a/status-bar/package.json +++ b/status-bar/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/status-bar", - "version": "1.0.2", + "version": "1.0.3", "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", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorStatusBar.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/storage/CHANGELOG.md b/storage/CHANGELOG.md index eaaf02ce9..6b56a61eb 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. +# [1.1.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/storage@1.0.3...@capacitor/storage@1.1.0) (2021-09-01) + + +### Features + +* **storage:** make StorageConfiguration init public ([#532](https://github.com/ionic-team/capacitor-plugins/issues/532)) ([4271b5d](https://github.com/ionic-team/capacitor-plugins/commit/4271b5d18a98201582bd95f41d5b5104c83e5b29)) + + + + + ## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/storage@1.0.2...@capacitor/storage@1.0.3) (2021-07-07) **Note:** Version bump only for package @capacitor/storage diff --git a/storage/CapacitorStorage.podspec b/storage/CapacitorStorage.podspec index 1330cf601..1e1784a50 100644 --- a/storage/CapacitorStorage.podspec +++ b/storage/CapacitorStorage.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'storage/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/storage/ios/Plugin/Storage.swift b/storage/ios/Plugin/Storage.swift index 787f1d3b8..861dcaf45 100644 --- a/storage/ios/Plugin/Storage.swift +++ b/storage/ios/Plugin/Storage.swift @@ -1,13 +1,13 @@ import Foundation public struct StorageConfiguration { - enum Group { + public enum Group { case named(String), cordovaNativeStorage } let group: Group - init(for group: Group = .named("CapacitorStorage")) { + public init(for group: Group = .named("CapacitorStorage")) { self.group = group } } diff --git a/storage/package.json b/storage/package.json index 8e0cea4db..4134ba8b3 100644 --- a/storage/package.json +++ b/storage/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/storage", - "version": "1.0.3", + "version": "1.1.0", "description": "The Storage API provides a simple key/value persistent store for lightweight data.", "main": "dist/plugin.cjs.js", "module": "dist/esm/index.js", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorStorage.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/text-zoom/CHANGELOG.md b/text-zoom/CHANGELOG.md index 21d2515a1..1674636d9 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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/text-zoom@1.0.2...@capacitor/text-zoom@1.0.3) (2021-09-01) + +**Note:** Version bump only for package @capacitor/text-zoom + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/text-zoom@1.0.1...@capacitor/text-zoom@1.0.2) (2021-06-23) **Note:** Version bump only for package @capacitor/text-zoom diff --git a/text-zoom/CapacitorTextZoom.podspec b/text-zoom/CapacitorTextZoom.podspec index e4b03c64d..219d7e53c 100644 --- a/text-zoom/CapacitorTextZoom.podspec +++ b/text-zoom/CapacitorTextZoom.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'text-zoom/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/text-zoom/package.json b/text-zoom/package.json index d9187c2cb..8db1b9780 100644 --- a/text-zoom/package.json +++ b/text-zoom/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/text-zoom", - "version": "1.0.2", + "version": "1.0.3", "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", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorTextZoom.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0", diff --git a/toast/CHANGELOG.md b/toast/CHANGELOG.md index 6265003e5..b7568a8c7 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. +## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/toast@1.0.2...@capacitor/toast@1.0.3) (2021-09-01) + +**Note:** Version bump only for package @capacitor/toast + + + + + ## [1.0.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/toast@1.0.1...@capacitor/toast@1.0.2) (2021-06-23) **Note:** Version bump only for package @capacitor/toast diff --git a/toast/CapacitorToast.podspec b/toast/CapacitorToast.podspec index da3264c62..8802cf9f2 100644 --- a/toast/CapacitorToast.podspec +++ b/toast/CapacitorToast.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package['description'] s.license = package['license'] - s.homepage = package['repository']['url'] + s.homepage = 'https://capacitorjs.com' s.author = package['author'] - s.source = { :git => package['repository']['url'], :tag => s.version.to_s } - s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'toast/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '12.0' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/toast/package.json b/toast/package.json index e901eb7d1..a0096fdf3 100644 --- a/toast/package.json +++ b/toast/package.json @@ -1,6 +1,6 @@ { "name": "@capacitor/toast", - "version": "1.0.2", + "version": "1.0.3", "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", @@ -41,7 +41,9 @@ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", "clean": "rimraf ./dist", "watch": "tsc --watch", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build", + "postpublish": "npm run publish:cocoapod", + "publish:cocoapod": "pod trunk push ./CapacitorToast.podspec --allow-warnings" }, "devDependencies": { "@capacitor/android": "^3.0.0",