enhance(mobile): enable camera permission on iOS

pull/3374/head
leizhe 2021-12-09 12:55:07 +08:00
parent d1b43ee719
commit 94350c3ceb
3 changed files with 9 additions and 1 deletions

View File

@ -40,6 +40,8 @@
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string></string>
<key>NSDocumentsFolderUsageDescription</key>
<string></string>
<key>NSDownloadsFolderUsageDescription</key>
@ -48,6 +50,10 @@
<string></string>
<key>NSFileProviderPresenceUsageDescription</key>
<string></string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string></string>
<key>NSPhotoLibraryUsageDescription</key>
<string></string>
<key>NSUbiquitousContainers</key>
<dict>
<key>iCloud.$(PRODUCT_BUNDLE_IDENTIFIER)</key>

View File

@ -12,6 +12,7 @@ def capacitor_pods
pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
pod 'CapacitorFilesystem', :path => '../../node_modules/@capacitor/filesystem'
pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen'
pod 'CapacitorCamera', :path => '../../node_modules/@capacitor/camera'
end
target 'Logseq' do

View File

@ -23,7 +23,8 @@
path (str "file://" repo-dir "/" assets-dir "/" filename)
_file (.writeFile Filesystem (clj->js
{:data (.-data photo-buffer)
:path path}))]
:path path
:recursive true}))]
(p/resolved filename)))
(defn embed-photo [id]