Unable to define resources for test target

I am trying to define resources for my testTarget in a way as it is described in official documentation:

targets: [
        name: "MyApp",
        dependencies: []),
        name: "MyAppTests",
        dependencies: ["MyApp"],
        resources: [.process("PerformancePath.json")]

However, XCode gives me an error:
'testTarget(name:dependencies:path:exclude:sources:resources:cSettings:cxxSettings:swiftSettings:linkerSettings:)' is unavailable

And, after a while, all devices disappear from a list saying:
No devices because active scheme has no targets

Am I doing something wrong or it is a bug?

Swift version: 5.3.3
XCode version: 12.4 (12D4e)

The problem was related to swift-tools-version, I had to specify explicitly that I want to use version 5.3.

1 Like
Terms of Service

Privacy Policy

Cookie Policy