feat(ios): download icloud files when re-indexing

This commit is contained in:
leizhe
2021-12-30 19:39:12 +08:00
committed by Andelf
parent e5640bc6d1
commit c7b3bc5fa1
4 changed files with 71 additions and 0 deletions

View File

@@ -196,6 +196,7 @@
(.pickFolder util/folder-picker)
#(js->clj % :keywordize-keys true)
:path)
_ (when (util/native-ios?) (.downloadFilesFromiCloud util/download-icloud-files))
files (readdir path)
files (js->clj files :keywordize-keys true)]
(into [] (concat [{:path path}] files))))

View File

@@ -24,6 +24,8 @@
(.isPluginAvailable Capacitor name))
(defonce folder-picker (registerPlugin "FolderPicker"))
(when (native-ios?)
(defonce download-icloud-files (registerPlugin "DownloadiCloudFiles")))
(when (native-ios?)
(defonce ios-file-container (registerPlugin "FileContainer")))