https://github.com/zunda-pixel/licenseprovider
Generate License List that Project depends on.
https://github.com/zunda-pixel/licenseprovider
swift swiftpackagemanager swiftui
Last synced: about 1 year ago
JSON representation
Generate License List that Project depends on.
- Host: GitHub
- URL: https://github.com/zunda-pixel/licenseprovider
- Owner: zunda-pixel
- License: apache-2.0
- Created: 2023-01-11T08:23:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-09T16:11:47.000Z (about 1 year ago)
- Last Synced: 2025-04-09T16:51:22.511Z (about 1 year ago)
- Topics: swift, swiftpackagemanager, swiftui
- Language: Swift
- Homepage:
- Size: 40 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LicenseProvider
[](https://swiftpackageindex.com/zunda-pixel/LicenseProvider)
[](https://swiftpackageindex.com/zunda-pixel/LicenseProvider)
Generate License List that Project depends on.
```swift
// Package.swift
let package = Package(
name: "SampleApp",
products: [
.library(
name: "SampleApp",
targets: ["SampleApp"]
)
],
dependencies: [
.package(url: "https://github.com/zunda-pixel/LicenseProvider", from: "1.4.0"),
],
targets: [
.target(
name: "SampleApp",
plugins: [
.plugin(name: "LicenseProviderPlugin", package: "LicenseProvider"),
]
)
]
)
```
```swift
import SwiftUI
struct LicenseView: View {
var body: some View {
NavigationStack {
List {
ForEach(LicenseProvider.packages) { package in
NavigationLink(package.name) {
VStack {
if case .remoteSourceControl(let location) = package.kind {
Link("URL", destination: location)
}
Text(package.license)
}
.navigationTitle(package.name)
}
}
}
}
}
}
```