部落格 RSS Feed

File Plugin 7.0.0 & Device Plugin 2.1.0 已發布!
作者:Bryan Ellis
2022年4月11日

我們很高興宣布,我們剛發布了 cordova-plugin-file & cordova-plugin-device 的更新!

升級方式

cordova plugin remove cordova-plugin-file
cordova plugin add cordova-plugin-file@7.0.0

cordova plugin remove cordova-plugin-device
cordova plugin add cordova-plugin-device@2.1.0

發布重點

cordova-plugin-file

在 Android 平台上,新增了一個 WebViewAssetLoader 代理處理程式,以支援在使用自訂 scheme 時載入 cdvfile URL。建議使用 toURL 方法來取得可用的 URL。當應用程式從 httphttps 協定提供服務時,toURL 將會返回適當的可用的 cdvfile URL。如果應用程式從 file 協定使用,toURL 將會返回原生的 file URL。

cordova-plugin-device

已新增 Electron 原生支援。

在 Android 平台上,sdkVersion 屬性現在已包含在 window.device 物件中,並在 getInfo 回應物件中返回。

請在 issues.cordova.io 上回報您發現的任何問題!

變更內容包括

cordova-plugin-file

  • GH-519 chore!: 移除舊的平台程式碼和程式碼檢查清理
  • GH-517 fix(android): 支援自訂 scheme 的 cdvfile 資源
  • GH-516 fix(android): 建立 toURL 覆寫以保留其他平台
  • GH-487 fix(android): 在列出外部目錄時請求外部讀取權限
  • GH-513 feat(android): 為 cdvfile 新增 WebViewAssetLoader 代理處理程式
  • GH-490 chore: npmrc
  • GH-489 fix: 恢復 return 陳述式
  • GH-470 fix: 移除測試記錄
  • GH-447 fix(browser): preparing.js 中的錯字
  • GH-439 chore: 需要 Android 9
  • GH-433 refactor(android): 移除過時的 copyResource 函式
  • GH-417 fix(android): 使用傳統儲存空間

cordova-plugin-device

  • GH-167 feat(ios): 偵測應用程式是否在 Apple Silicon 的 macOS 桌面版上執行
  • GH-157 feat(android): getInfo 回應包含 sdkVersion
  • GH-152 fix(osx): 重新命名類別以修復外掛程式
  • GH-135 feat(electron): 新增支援
  • GH-109 將錯誤記錄到 console,而不是 dialog