Generate License List that Project depends on.
// Package.swift
let package = Package(
name: "SampleKit",
products: [
.library(
name: "SampleKit",
targets: ["SampleKit"]
)
],
dependencies: [
.package(url: "https://github.com/zunda-pixel/LicenseProvider", from: "1.3.1"),
],
targets: [
.target(
name: "SampleKit",
plugins: [
.plugin(name: "LicenseProviderPlugin", package: "LicenseProvider"),
]
)
]
)
import SwiftUI
struct LicenseView: View {
var body: some View {
NavigationStack {
List {
ForEach(LicenseProvider.packages) { package in
NavigationLink(package.name) {
VStack {
if package.kind == .remoteSourceControl {
Link("URL", destination: package.location)
}
Text(package.license)
}
.navigationTitle(package.name)
}
}
}
}
}
}