I created a new swift macro package in my Xcode project.
My Package.swift
looks like:
import CompilerPluginSupport
import PackageDescription
let package = Package(
name: "TestMockable",
platforms: [.iOS(.v14)],
products: [
.library(
name: "Test",
targets: ["Test"]
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0-swift-5.9-DEVELOPMENT-SNAPSHOT-2023-04-25-b"),
],
targets: [
.macro(
name: "TestMacro",
dependencies: [
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
]
),
.target(
name: "Test",
dependencies: ["TestMacro"]
),
]
)
Without adding .macOS(.v10_15)
in platforms:
, I get the following errors
However, when I add platforms: [.iOS(.v14), .macOS(.v10_15)],
, I get the following errors:
How can I solve it?