ios - 未找到“GeneratedDotEnv.m”文件
问题描述
我正在创建一个 react native 应用程序,在其中我使用 react-native-config 来构建不同的版本。尝试存档项目时出现此错误。谁能帮我这个?
解决方案
将以下post_install
脚本添加到您的 podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
targets_to_ignore = %w(React)
if targets_to_ignore.include? target.name
target.remove_from_project
end
if target.name == 'react-native-config'
phase = target.project.new(Xcodeproj::Project::Object::PBXShellScriptBuildPhase)
phase.shell_script = "cd ../../"\
" && RNC_ROOT=./node_modules/react-native-config/"\
" && export SYMROOT=$RNC_ROOT/ios/ReactNativeConfig"\
" && export BUILD_DIR=$RNC_ROOT/ios/ReactNativeConfig"\
" && ruby $RNC_ROOT/ios/ReactNativeConfig/BuildDotenvConfig.ruby"
target.build_phases << phase
target.build_phases.move(phase,0)
end
end
end
请参考这个GitHub 问题
推荐阅读
- .net - .Net 获取字典列表中最常见的值
- c# - 创建一个按主键排序而不指定模型类型的选择 LINQ 查询
- java - 如何分析生成的异常数量,按异常类或代码行分类
- python - 如何转换pynput监听器的特殊键码
- java - 如何使用appium调用adb命令?
- oracle - Oracle排名查询
- javascript - 如何将JSF中的对象列表传递给javascript函数
- android - HelloCordova 在我的 Android 手机上错误卸载但需要重新安装,在 CLI 中运行的 Cordova 不这样做
- javascript - 检查一个数组是否包含 JavaScript 中另一个数组的任何元素,并返回两个数组中都不存在的值
- python - Numpy 索引顺序