我在尝试运行排毒测试-配置ios.sim.release时遇到以下错误:
Error: app binary not found at '/Users/.../ios/build/Build/Products/Release-iphonesimulator/[appname].app', did you build it?
但是,排毒构建成功,因此构建了它。此外,一切都可以通过调试构建和测试正常运行。
有什么办法可以解决发布版本的问题?
我曾尝试使用xcode,react-native run-ios和排毒构建构建应用程序。
任何帮助将不胜感激。
请在下面查看我的配置:
"detox": {
"test-runner": "mocha",
"specs": "e2e",
"runner-config": "e2e/mocha.opts",
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/[appname].app",
"build": "xcodebuild -workspace ios/[appname].xcworkspace -scheme [appname] -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone 7"
},
"ios.sim.release": {
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/[appname].app",
"build": "xcodebuild -workspace ios/[appname].xcworkspace -scheme neonRide -configuration Release -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone 7"
}
},
"test-runner": "mocha"
}
请在下面查看package.json的简化版本:
{
"name": "[appname]",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-flow": "^6.23.0",
"babel-preset-react-native-stage-0": "^1.0.1",
"detox": "^8.2.3",
"eslint-config-rallycoding": "^3.2.0",
"flow-bin": "^0.66.0",
"jest": "^23.5.0",
"jest-expo": "^22.0.0",
"mocha": "^5.2.0",
"react-test-renderer": "16.0.0-beta.5"
},
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios",
"test": "node node_modules/jest/bin/jest.js --watch",
"build": "babel src/ -d lib/",
"flow": "flow"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
...
"react-native": "^0.55.4",
...
},
"detox": {
...
}