capacitor.config.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { CapacitorConfig } from '@capacitor/cli'
  2. import fs from 'fs'
  3. const version = fs.readFileSync('static/package.json', 'utf8').match(/"version": "(.*?)"/)?.at(1) ?? '0.0.0'
  4. const config: CapacitorConfig = {
  5. appId: 'com.logseq.app',
  6. appName: 'Logseq',
  7. bundledWebRuntime: false,
  8. webDir: 'public',
  9. loggingBehavior: 'debug',
  10. server: {
  11. // https://capacitorjs.com/docs/updating/5-0#update-androidscheme
  12. androidScheme: 'http',
  13. },
  14. plugins: {
  15. StatusBar: {
  16. overlaysWebView: true,
  17. style: 'Light',
  18. backgroundColor: '#ffffffff',
  19. },
  20. SplashScreen: {
  21. launchShowDuration: 500,
  22. launchAutoHide: false,
  23. androidScaleType: 'CENTER_CROP',
  24. splashImmersive: false,
  25. backgroundColor: '#002b36'
  26. },
  27. Keyboard: {
  28. resize: 'none'
  29. }
  30. },
  31. android: {
  32. appendUserAgent: `Logseq/${version} (Android)`
  33. },
  34. ios: {
  35. scheme: 'Logseq',
  36. appendUserAgent: `Logseq/${version} (iOS)`
  37. },
  38. cordova: {
  39. staticPlugins: [
  40. '@logseq/capacitor-file-sync', // AgeEncryption requires static link
  41. ]
  42. }
  43. }
  44. export = config;