Generate a list of licenses for the Swift Package libraries that your app depends on.
Example
![]() | ![]() | ![]() |
- Development with Xcode 16.4+
- Written in Swift 6.1
- Compatible with iOS 16.0+, tvOS 17.0+
This library does not collect or track user information, so it does not include a PrivacyInfo.xcprivacy file.
LicenseList is available through Swift Package Manager.
Xcode
- File > Add Package Dependencies…
- Search
https://github.com/cybozu/LicenseList.git.
- Add package and link
LicenseListto your application target.
CLI
Create
Package.swiftthat 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")])])
Run the following command in Terminal.
$ swift package resolve
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)import LicenseList
structContentView:View{varbody:someView{NavigationView{LicenseListView()
// If you want to anchor link of the repository
.licenseViewStyle(.withRepositoryAnchorLink).navigationTitle("LICENSE")}}}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
Contributions to LicenseList are welcomed and encouraged! Please see the Contributing Guide.
This repository includes demonstration app for UIKit & SwiftUI.
Open Examples/Examples.xcodeproj and Run it.


