I am building a Swift Package library that provide some UI components, for both macOS and iOS.
I would like to be able to test this codebase and cover my code with unit test for both platforms.
Is there a way to manage that ?
As of Swift 5.4, the Swift Package Manager doesn't provide that functionality out of the box.
To carry out UI tests, you need to create a separate app (in its separate xcode project), whose only purpose is to import the package and run UI tests via xcodebuild commands (as swift test won't work).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With