啥都别说直接检查是否有引入的动态库
查看引入库的Package.swift文件中products的type属性是否为.dynamic
let package = Package(
name: "CodeMirror-SwiftUI",
platforms: [
.iOS(.v13),
.macOS(.v10_15)
],
products: [
.library(
name: "CodeMirror-SwiftUI",
type: .dynamic,
targets: ["CodeMirror-SwiftUI"]),
],
dependencies: [
],
targets: [
.target(
name: "CodeMirror-SwiftUI",
dependencies: [],
resources: [
.copy("Resources/CodeMirrorView.bundle")
]
),
.testTarget(
name: "CodeMirror-SwiftUITests",
dependencies: ["CodeMirror-SwiftUI"],
resources: [
.process("Resources")
]
),
],
swiftLanguageVersions: [.v5]
)
动态库打包时调整embed状态为:Embed&Sign