Is there anyway to keep package schemes from showing up in client apps? Or any progress on the original issue of automated scheme generation support for library products?
I am updating an internal SwiftPM package we've had for a few years. The package in the past was testable on macOS and the iOS simulator.
I am now adding an executable product and executableTarget that is macOS only. Is there a way to mark those product/target to only build on macOS?
More Details With Code
Really the problem is that adding an `executableTarget` with `resources` leads to Xcode attempting to run `codesign`. Which then fails the build.
...
CodeSign /Users/lovelettr/Desktop/example-2/derivedData/Build/Products/Debug-iphonesimulator/example-1_example-2.bundle (in target 'example-1_example-2' from project 'example-1')
cd /Users/lovelettr/Desktop/example-2
Signing Identity: "-"
/usr/bin/codesign --force --sign - --timestamp\=none --generate-entitlement-der /Users/lovelettr/Desktop/example-2/derivedData/Build/Products/Debug-iphonesimulator/example-1_example-2.bundle
/Users/lovelettr/Desktop/example-2/derivedData/Build/Products/Debug-iphonesimulator/example-1_example-2.bundle: bundle format unrecognized, invalid, or unsuitable
Command CodeSign failed with a nonzero exit code
Resurrecting an old thread, but for some reason I can't get it to work here:
I'm calling xcodebuild -scheme Swift-Automotive-Package test -sdk iphoneos -destination "platform=iOS,name=M15", but it errors out with
xcodebuild: error: Failed to build workspace Swift-Automotive with scheme Swift-Automotive-Package.: Cannot test target “Swift-Automotive-Tests” on “M15”: Tool-hosted testing is unavailable on device destinations. Select a host application for the test target, or use a simulator destination instead.
On-device testing requires a host app, so it isn't available to standalone packages.
You can either run the tests via a simulator destination or you will have to create an Xcode project with a host app and then you should be able to run them specifying an override for TEST_HOST via xcodebuild, but I am not super familiar with that flow, so there might be more steps involved.