Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve iOS Runner build failure reporting #1111

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ern-orchestrator/src/buildIosRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ export async function buildIosRunner(pathToIosRunner: string, udid: string) {
code === 0
? resolve()
: reject(
new Error(`XCode xcbuild command failed with exit code ${code}`)
new Error(`iOS Runner build failed [xcbuild exit code ${code}].
To troubleshoot this build failure, we recommend building the Runner iOS project from XCode.
You can open the Runner project in XCode manually or by running 'open ios/ErnRunner.xcodeproj'.
Building the Runner from XCode will provide more meaningful error reporting that can be of help
to pinpoint the cause of the build failure.`)
)
})
})
Expand Down
8 changes: 3 additions & 5 deletions ern-orchestrator/src/launchRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ async function launchAndroidRunner(pathToAndroidRunner: string) {

async function launchIosRunner(pathToIosRunner: string) {
const iosDevices = ios.getiPhoneRealDevices()
if (iosDevices && iosDevices.length > 0) {
launchOnDevice(pathToIosRunner, iosDevices)
} else {
launchOnSimulator(pathToIosRunner)
}
return iosDevices && iosDevices.length > 0
? launchOnDevice(pathToIosRunner, iosDevices)
: launchOnSimulator(pathToIosRunner)
}