We are breaking the app in a modular way and extracted the UI in a SwiftPM. It only contains SwiftUI views and nothing more. We successfully included the Pointfree snapshot library into the SPM.
The issue comes when we try to run the tests.
When we enter the following in the terminal when we cd
to the SPM directory:
xcodebuild -scheme <scheme> build -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 14"
it gives us the following error:
Testing failed: Pseudo Terminal Setup Error xctest encountered an error (Failed to install or launch the test runner. (Underlying Error: Pseudo Terminal Setup Error. ErrorCode: 7 Errno: 6. (Underlying Error: The operation couldn’t be completed. Device not configured)))
But if we enter the build command:
xcodebuild -scheme <scheme> build -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14'
we get BUILD SUCCEEDED
I just couldn't find anything on the web, so any help will be much appreciated. Anything that can give us the opportunity to test SwiftUI or UIKit inside SPM will be very helpful.
Thank you!