← Back to context

Comment by searls

8 hours ago

This is true of the CLIs that start with `xcode` but not of the CLIs that start with `swift`. As `swift-format` and `swift-test` have come into their own, they're just as reliable as any other language ecosystem. And the difference is indeed staggering. I wrote this guide last summer on extracting all your app's code into a (nonsensically necessary) Swift package dependency simply so you can test it with Swift Testing https://justin.searls.co/posts/i-made-xcodes-tests-60-times-...

Yes! If you’re lucky enough to be writing a library you are in good shape. Swift did things right.

I have UI and UI tests and xcodebuild is my nemesis.

  • That’s why you should break out all of your code into SPM packages/targets. The workspace code only really needs to be the entry point, lifecycle and maybe target-based dependency injection (if you’re into that) or environment config since your SPM dependencies don’t know about your projects preprocessor macros (I.e. `#if DEV` `#if APP_STORE` etc.).