Skip to content

Repository files navigation

LicenseList by Cybozu

Generate a list of licenses for the Swift Package libraries that your app depends on.

Github forksGithub starsGithub issuesGithub releaseGithub license

Example

Requirements

  • Development with Xcode 16.4+
  • Written in Swift 6.1
  • Compatible with iOS 16.0+, tvOS 17.0+

Documentation

Latest (Swift-DocC)

Privacy Manifest

This library does not collect or track user information, so it does not include a PrivacyInfo.xcprivacy file.

Installation

LicenseList is available through Swift Package Manager.

Xcode

  1. File > Add Package Dependencies…
  2. Search https://github.com/cybozu/LicenseList.git.
  3. Add package and link LicenseList to your application target.

CLI

  1. Create Package.swift that describes dependencies.

    // swift-tools-version: 6.1
    import PackageDescription
    letpackage=Package(
    name:"SomeProduct",
    products:[.library(name:"SomeProduct", targets:["SomeProduct"])],
    dependencies:[.package(url:"https://github.com/cybozu/LicenseList.git", exact:"2.1.0")],
    targets:[.target(
    name:"SomeProduct",
    dependencies:[.product(name:"LicenseList",package:"LicenseList")])])
  2. Run the following command in Terminal.

    $ swift package resolve

Usage

Example for UIKit

import LicenseList
// in ViewController
letvc=LicenseListViewController()
vc.title ="LICENSE"
// If you want to anchor link of the repository
vc.licenseViewStyle =.withRepositoryAnchorLink
navigationController?.pushViewController(vc, animated:true)

Example for SwiftUI

import LicenseList
structContentView:View{varbody:someView{NavigationView{LicenseListView()
// If you want to anchor link of the repository
.licenseViewStyle(.withRepositoryAnchorLink).navigationTitle("LICENSE")}}}

How to use a specific SourcePackages path

In a CI environment, you may sometimes specify a non-default path for the SourcePackages directory. In such cases, to prevent the PrepareLicenseList plugin from failing, you must run xcodebuild with the PLL_SOURCE_PACKAGES_PATH environment variable set to the absolute path of that directory.

More detail: How LicenseList Works

Contributing to LicenseList

Contributions to LicenseList are welcomed and encouraged! Please see the Contributing Guide.

Demo

This repository includes demonstration app for UIKit & SwiftUI.

Open Examples/Examples.xcodeproj and Run it.

About

Generate a list of licenses for the Swift Package libraries that your app depends on.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages