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.
86 lines
3.4 KiB
86 lines
3.4 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: 'qingsongpin',
|
|
scheme: 'qingsongpin',
|
|
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 热更新)通道与端点。
|
|
// 注意:占位的 REPLACE_WITH_PROJECT_ID 会让 Expo Go(开发期)启动时去拉取
|
|
// 不存在的远程更新,报 “Failed to download remote update” 并蓝屏。
|
|
// 运行 `eas init` 后由 EAS 注入真实地址;开发期(Expo Go)请勿保留此块。
|
|
// updates: {
|
|
// url: 'https://u.expo.dev/<PROJECT_ID>',
|
|
// channel: 'production',
|
|
// },
|
|
ios: {
|
|
supportsTablet: true,
|
|
// iOS Bundle Identifier:上架 App Store 的唯一标识,按你的开发者账号命名。
|
|
bundleIdentifier: 'com.qingsongpin.app',
|
|
},
|
|
android: {
|
|
// Android Package:上架 Google Play 的唯一标识,通常与 iOS 保持一致。
|
|
package: 'com.qingsongpin.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',
|
|
// 拍照 / 相册取图(营业执照、头像)。原生权限文案只有出包时生效,
|
|
// Expo Go 里用的是 Expo Go 自己的 Info.plist,故此处改动需真机出包验证。
|
|
[
|
|
'expo-image-picker',
|
|
{
|
|
// 本项目只选静态图、不录视频:不申请麦克风权限(最小必要原则),
|
|
// 插件默认会加 RECORD_AUDIO,这里显式关掉
|
|
microphonePermission: false,
|
|
photosPermission: '轻松聘需要访问相册,用于上传营业执照与设置头像',
|
|
cameraPermission: '轻松聘需要使用相机,用于拍摄营业执照与设置头像',
|
|
},
|
|
],
|
|
// 启动屏:冷启动期间展示品牌 logo,消除白屏。
|
|
// 资源为 assets/splash-icon.png(1024×1024,见 assets/)。
|
|
// 应用为纯亮色(userInterfaceStyle: 'light'),故不配置 dark 分支。
|
|
[
|
|
'expo-splash-screen',
|
|
{
|
|
image: './assets/splash-icon.png',
|
|
imageWidth: 200,
|
|
resizeMode: 'contain',
|
|
backgroundColor: '#FFFFFF',
|
|
},
|
|
],
|
|
],
|
|
extra: {
|
|
// 业务接口基地址(规范 §1)。默认生产 HTTPS 域名;联调/本地可用环境变量 API_BASE_URL 覆盖。
|
|
apiBaseUrl: process.env.API_BASE_URL || 'https://job.youthome.com.cn/api/v1',
|
|
// EAS 项目 ID:`eas init` 后会自动注入此处(与 updates.url 中的 PROJECT_ID 对应)。
|
|
eas: {
|
|
projectId: 'REPLACE_WITH_PROJECT_ID',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|