问题描述
我正在尝试一个问题,我看到Detox为每次执行创建了许多新的iOS模拟器,并且试图了解是什么原因造成的。
在我的配置中,我要设置“ iPhone 8”设备,该设备已在模拟器列表中。但是Detox会继续创建越来越多的东西。
您知道什么可能导致此问题吗?
排毒16.0.0 React-Native 0.62.2 Xcode 11.7
我使用以下配置在项目上运行Detox:
$tmp_dir = tempnam(sys_get_temp_dir(),"random_tmp_dir_");
if (!$tmp_dir) {
header("HTTP/1.1 500 Internal Server Error");
error_log("Failed to create a temporary file");
exit(5);
}
if(!unlink($tmp_dir) || !mkdir($tmp_dir)) {
header("HTTP/1.1 500 Internal Server Error");
error_log("Convert the temp file into a folder: $tmp_dir");
exit(6);
}
{
"rootDir": "../","setupFilesAfterEnv": ["./detox/init.js"],"preset": "react-native","testEnvironment": "detox/runners/jest/JestCircusEnvironment","testRunner": "jest-circus/runner","reporters": ["detox/runners/jest/streamlineReporter","<rootDir>/node_modules/jest-junit"],"transform": {
"^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
},"verbose": true,"maxWorkers": 6
}
执行以下操作:
{
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/MyProject.app","build": "xcodebuild -quiet -workspace ios/MyProject.xcworkspace -scheme MyProject -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build | grep -A 5 error: | xcpretty","type": "ios.simulator","name": "iPhone 8"
}
}
}
}
下面是为您提供示例创建的模拟器的列表:
谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)