当我在我的 react-native 应用程序中运行排毒测试时,我想传递环境变量:
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/myapp.app",
"build": "export IS_DETOX=true && xcodebuild -workspace ios/myapp.xcworkspace -scheme my app -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"device": {
"type": "iPhone 11 Pro"
}
}
我已经安装了react-native-config。但是当我运行排毒测试时,变量 IS_DETOX 在 JS 中是未定义的。
谢谢