Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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 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)
}
}
}
}
}
}
```