Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zunda-pixel/licenseprovider
Generate License List that Project depends on.
https://github.com/zunda-pixel/licenseprovider
swift swiftpackagemanager swiftui
Last synced: 3 months 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 (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T16:20:18.000Z (3 months ago)
- Last Synced: 2024-10-25T06:31:16.033Z (3 months ago)
- Topics: swift, swiftpackagemanager, swiftui
- Language: Swift
- Homepage:
- Size: 35.2 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LicensePlugin
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fzunda-pixel%2FLicenseProvider%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/zunda-pixel/LicenseProvider)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fzunda-pixel%2FLicenseProvider%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/zunda-pixel/LicenseProvider)Generate License List that Project depends on.
```swift
// 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"),
]
)
]
)
``````swift
import SwiftUIstruct 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)
}
}
}
}
}
}
```