react-native - Expo app.config.js googleServicesFile 用于不同的构建变体
问题描述
我希望能够区分我的 Expo 应用程序上的构建变体。
目前我的 app.config.js 中有我的 expo 配置,就像这样
import Constants from 'expo-constants';
let AndroidGoogleServicesFile = './google-services-dev.json';
if (Constants.manifest.releaseChannel === 'staging') {
AndroidGoogleServicesFile = './google-services-staging.json';
}
if (Constants.manifest.releaseChannel === 'release') {
AndroidGoogleServicesFile = './google-services.json';
}
...
{
...
android: {
adaptiveIcon: {
foregroundImage: './assets/images/adaptive-icon.png',
backgroundColor: '#FFFFFF',
},
package: 'com.companyname.App',
googleServicesFile: AndroidGoogleServicesFile,
},
...
如您所见,我希望能够配置我googleServicesFile
的基于releaseChannel
或构建变体,但目前这似乎不可能?我也在使用 EAS 来构建,我不确定我是否可以在我的eas.json
任何一个中配置它......
解决方案
推荐阅读
- machine-learning - 如何在 svm(scikit) 中提取和传输学习参数?
- javascript - Telegram Bot API:使用 getUserProfilePhotos() 时服务器关闭
- c# - 如何创建一个管理器脚本来一次控制所有绘制的圆圈?
- python - 跨多个类实例(但不是所有实例)的共享属性
- ffmpeg - ffplay、rtsp 和 tcp 传输协议
- java - 在简单的二维数组游戏中选择一个随机起点
- node.js - 如何在 Dialogflow 内联中读取 API CALL 的 URL?
- python - 使用 graphviz 将 Digraph 转换为 StringIO
- api - 改造标题和正文 Kotlin
- swift - 使用 AVMutableComposition 和 AVAssetExportSession 创建的 MP4 视频在 Quicktime 中工作,但在所有其他视频工具中显示已损坏