12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import { CapacitorConfig } from '@capacitor/cli';
- // import { updateVersion } from './scripts/sync-version';
- // updateVersion()
- const config: CapacitorConfig = {
- appId: 'com.example.app',
- appName: 'AngelToken',
- webDir: 'dist',
- // 开发服务器配置(热更新用)
- server: {
- url: 'http://192.168.0.59:5173',
- cleartext: true, // 允许HTTP明文通信(仅开发环境)
- allowNavigation: ['*'] // 允许任意URL导航
- },
- // 插件配置
- plugins: {
- CapacitorAssets: {
- iconBackgroundColor: '#ffffff' // 应用图标背景色
- },
- // 注意:原JSON中嵌套了重复的"plugins"键,已修正
- PushNotifications: {
- presentationOptions: ['badge', 'sound', 'alert']
- }
- },
- // 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;
|