capacitor.config.example.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import { CapacitorConfig } from '@capacitor/cli';
  2. /**
  3. * Capacitor 配置示例文件
  4. *
  5. * 使用方法:
  6. * 1. 复制此文件为 capacitor.config.ts
  7. * 2. 根据实际情况修改配置
  8. * 3. 运行 npx cap init 时会自动生成配置文件
  9. */
  10. const config: CapacitorConfig = {
  11. appId: 'com.yourcompany.digitalhuman',
  12. appName: '数字人',
  13. webDir: 'dist',
  14. server: {
  15. // 开发时可以使用本地服务器
  16. // url: 'http://localhost:3000/sentio',
  17. // cleartext: true,
  18. // 生产环境使用实际服务器地址
  19. url: 'https://192.168.20.177:3000/sentio',
  20. cleartext: false, // HTTPS 使用 false
  21. },
  22. android: {
  23. allowMixedContent: true, // 允许混合内容
  24. buildOptions: {
  25. // 如果需要签名,配置以下选项
  26. // keystorePath: 'path/to/keystore.jks',
  27. // keystorePassword: 'your-password',
  28. // keystoreAlias: 'your-alias',
  29. // keystoreAliasPassword: 'your-alias-password'
  30. }
  31. },
  32. plugins: {
  33. // 可以在这里配置插件
  34. SplashScreen: {
  35. launchShowDuration: 2000,
  36. launchAutoHide: true,
  37. backgroundColor: "#ffffff",
  38. androidSplashResourceName: "splash",
  39. androidScaleType: "CENTER_CROP",
  40. showSpinner: false,
  41. },
  42. },
  43. };
  44. export default config;