CocoaPods / fourflusher

A library for interacting with Xcode simulators.
MIT License
32 stars 15 forks source link

A more helpful error message for missing simulators #4

Closed radex closed 7 years ago

radex commented 7 years ago

This vague error message caused me a lot of pain in CocoaPods/CocoaPods#5878. I thought it was an xcodebuild error, while in fact it was a very simple thing to fix. This should spare future generations from this failure mode.

alloy commented 7 years ago

Will it be clear to people what “have a [OS] simulator installed” means and the steps they need to take? Can this be phrased differently to include the steps they need to perform?

radex commented 7 years ago

@alloy Good point. What do you think about this?

Invalid OS tvos, valid values are ios, watchos. Go to Xcode and open Window -> Devices to make sure you have at least one tvos simulator set up. You can create a new simulator by pressing '+' in the bottom left corner of this window.

alloy commented 7 years ago

Maybe this could be enough?

Ensure that Xcode -> Window -> Devices has at least one tvos simulator listed or otherwise add one.

radex commented 7 years ago

Ah! I like when errors first say what went wrong, then suggest a solution:

Could not find a tvos simulator (valid values: ios, watchos). Ensure that Xcode -> Window -> Devices has at least one tvos simulator listed or otherwise add one.

Is that cool?

alloy commented 7 years ago

Yup, totally 👍 Sorry, I didn’t mean to remove that first part, that part was just a given imo.

alloy commented 7 years ago

@segiddins I’m unfamiliar with the CI status of this. Is the build failing because of CI specific reasons?

segiddins commented 7 years ago

I have no clue, maybe @neonichu would know?

neonichu commented 7 years ago

Looks to me as if the Travis env changed since the last build, I'll make a PR to the fix the build.

radex commented 7 years ago

↑ Updated the branch, passes CI now

alloy commented 7 years ago

Awesome 👍 Thanks, @radex!