123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- import { CapacitorConfig } from '@capacitor/cli';
- const config: CapacitorConfig = {
- appId: 'com.example.app',
- appName: 'wallet_app',
- webDir: 'dist',
- // 开发服务器配置(热更新用)
- // server: {
- // url: 'http://192.168.0.59:5173',
- // cleartext: true, // 允许HTTP明文通信(仅开发环境)
- // allowNavigation: ['*'] // 允许任意URL导航
- // },
- server: {
- allowNavigation: [
- "*.angeltokens.io",
- "*.your-api.com"
- ]
- }
- // 插件配置
- plugins: {
- SplashScreen: {
- launchShowDuration: 3000,
- launchAutoHide: true,
- backgroundColor: '#ffffffff', // ARGB格式白色背景
- androidScaleType: 'CENTER_CROP',
- showSpinner: false,
- androidSpinnerStyle: 'large',
- iosSpinnerStyle: 'small',
- spinnerColor: '#999999',
- splashFullScreen: true,
- splashImmersive: true,
- androidSplashResourceName: 'splash',
- useDialog: false
- },
- CapacitorAssets: {
- iconBackgroundColor: '#ffffff' // 应用图标背景色
- },
- // 注意:原JSON中嵌套了重复的"plugins"键,已修正
- PushNotifications: {
- presentationOptions: ['badge', 'sound', 'alert']
- }
- },
- // 资源文件配置
- // assets: {
- // splash: {
- // src: 'assets/splash.png', // 启动图路径
- // android: true,
- // ios: true
- // }
- // },
- // iOS专属配置
- ios: {
- scheme: 'App',
- scrollEnabled: true,
- },
- // Android专属配置
- android: {
- allowMixedContent: true, // 允许混合HTTP/HTTPS内容
- useLegacyBridge: true, // 使用旧版桥接(兼容性)
- // 签名证书配置(建议通过环境变量注入敏感信息)
- buildOptions: {
- keystorePath: 'f62.keystore',
- keystoreAlias: 'f62', // // 生成时指定的别名
- keystorePassword: 'LkSvN1Ys', // 从环境变量读取
- keystoreAliasPassword: 'LkSvN1Ys'
- }
- }
- };
- export default config;
|