theextremeprogrammer / Succinct

UI tests at the speed of unit tests. Proper encapsulation. Architecture agnostic. Freedom to refactor.
MIT License
42 stars 7 forks source link

Update simulator in Makefile to work with Xcode 10.1 default simulator install. #3

Closed rgravina closed 5 years ago

rgravina commented 5 years ago

Hi @derekleerock! I noticed while trying to make alltests, the tests would not run with my install of Xcode 10.1. It seems to be because all simulators that come with Xcode are running iOS 12.1 but xcodebuild params specify 12.0.

The failure looks like this:

xcodebuild: error: Unable to find a destination matching the provided destination specifier:
        { platform:iOS Simulator, OS:12.0, name:iPhone X }

    The requested device could not be found because no available devices matched the request.

    Available destinations for the "Succinct" scheme:
         [ .... all your devices and simulators ....]

This would probably be fine if I installed simulators running iOS 12.0. Given Xcode 10.1 is the current release version, how do you feel about updating the Makefile? I've also changed the simulator from the iPhone X to the XR - mainly because this is the lowest spec of the current generation (and I think Xcode defaults to it on new projects). That's not strictly necessary to get the tests to run again, though.

codecov-io commented 5 years ago

Codecov Report

Merging #3 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #3   +/-   ##
=======================================
  Coverage   96.65%   96.65%           
=======================================
  Files          87       87           
  Lines        3765     3765           
=======================================
  Hits         3639     3639           
  Misses        126      126

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 431ace3...8d93995. Read the comment docs.

theextremeprogrammer commented 5 years ago

@rgravina Thanks for this! Unfortunately I haven't updated to Xcode 10.1 yet so that is why the Makefile is still using Xcode 10.0 simulators. Let me look into whether I can upgrade or not and get back to this. 👍

theextremeprogrammer commented 5 years ago

Thanks for this @rgravina! Pulling this in now that I've upgraded to Xcode 10.1. 👍

rgravina commented 5 years ago

Thanks for merging this! I've just learned that you can omit the OS from the destination string, or use OS=latest, to get around needing to update this every time Xcode changes! Found out via https://www.mokacoding.com/blog/xcodebuild-destination-options/

theextremeprogrammer commented 5 years ago

Thanks Robert! I didn't realize that was possible. I'll make that update as well. Thank you!