You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.0 KiB
56 lines
2.0 KiB
/**
|
|
* Expo 应用配置(app.config.js)
|
|
*
|
|
* extra.apiBaseUrl 通过 expo-constants 在运行时读取,见 src/api/api.ts:
|
|
* Constants.expoConfig?.extra?.apiBaseUrl
|
|
*
|
|
* 环境变量示例:
|
|
* API_BASE_URL=https://api.production.com # 生产环境
|
|
* API_BASE_URL=https://api.test.com # 测试环境
|
|
*/
|
|
export default {
|
|
expo: {
|
|
name: '有职',
|
|
slug: 'youzhi',
|
|
scheme: 'youzhi',
|
|
version: '1.0.0',
|
|
orientation: 'portrait',
|
|
icon: './assets/icon.png',
|
|
userInterfaceStyle: 'light',
|
|
// EAS 项目归属(Expo 账号名)。运行 `eas login` 后执行 `eas init` 会自动写入/校正。
|
|
owner: 'REPLACE_WITH_EAS_OWNER',
|
|
// OTA 运行时版本策略:随 app 版本号推进,保证原生层与 JS 层兼容。
|
|
runtimeVersion: {
|
|
policy: 'appVersion',
|
|
},
|
|
// EAS Update(OTA 热更新)通道与端点。
|
|
// url 中的 PROJECT_ID 在 `eas init` 后由 EAS 注入(见 extra.eas.projectId)。
|
|
updates: {
|
|
url: 'https://u.expo.dev/REPLACE_WITH_PROJECT_ID',
|
|
channel: 'production',
|
|
},
|
|
ios: {
|
|
supportsTablet: true,
|
|
// iOS Bundle Identifier:上架 App Store 的唯一标识,按你的开发者账号命名。
|
|
bundleIdentifier: 'com.youzhi.app',
|
|
},
|
|
android: {
|
|
// Android Package:上架 Google Play 的唯一标识,通常与 iOS 保持一致。
|
|
package: 'com.youzhi.app',
|
|
adaptiveIcon: {
|
|
backgroundColor: '#E6F4FE',
|
|
foregroundImage: './assets/android-icon-foreground.png',
|
|
backgroundImage: './assets/android-icon-background.png',
|
|
monochromeImage: './assets/android-icon-monochrome.png',
|
|
},
|
|
},
|
|
plugins: ['expo-router', 'expo-font'],
|
|
extra: {
|
|
apiBaseUrl: process.env.API_BASE_URL || 'https://dev.api.com',
|
|
// EAS 项目 ID:`eas init` 后会自动注入此处(与 updates.url 中的 PROJECT_ID 对应)。
|
|
eas: {
|
|
projectId: 'REPLACE_WITH_PROJECT_ID',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|