Need help with LicensePlist?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

mono0926
1.9K Stars 87 Forks MIT License 478 Commits 25 Opened issues

Description

A license list generator of all your dependencies for iOS applications

Services available

!
?

Need anything else?

Contributors list

# 31,382
Dart
Flutter
Xcode
license
330 commits
# 278,576
pagevie...
attribu...
macOS
HTML
19 commits
# 59,021
Xcode
Ruby
Objecti...
userdef...
13 commits
# 121,342
Swift
Xcode
license
Objecti...
6 commits
# 72,732
Swift
carthag...
cocoapo...
HTML
4 commits
# 160,074
travis
HTML
bitbuck...
C
4 commits
# 117,224
Swift
C
license
license...
4 commits
# 192,149
Swift
carthag...
Markdow...
React
4 commits
# 237,113
Go
Swift
pagevie...
iOS
2 commits
# 99,770
Swift
xcode9
Xcode
license
2 commits
# 19,728
Swift
alfred
shortcu...
Ruby
2 commits
# 16,533
pkg
nsis
Electro...
matterm...
1 commit
# 436,094
Swift
Xcode
license
license...
1 commit
# 337,242
sentry
Xcode
license
license...
1 commit
# 329,464
HTML
Kotlin
Android
Xcode
1 commit
# 32,861
HTML
swift-3
raspber...
axios
1 commit
# 257,584
sentry
watchos
license
python-...
1 commit
# 6,579
Objecti...
Swift
iOS
React N...
1 commit
# 437,979
Swift
Xcode
license
license...
1 commit
# 288,107
Xcode
license
C++
C
1 commit

LicensePlist Logo LicensePlist

Say Thanks!

platforms GitHub license Language: Swift 4.1 Language: Swift 4.2 Language: Swift 5.0 Swift Package Manager compatible

LicensePlist
is a command-line tool that automatically generates a Plist of all your dependencies, including files added manually(specified by YAML config file) or using
Carthage
or
CocoaPods
. All these licenses then show up in the Settings app.

Flow

Demo

| App Setting Root | License List | License Detail | | ------------------------- | ------------------------- | --------------------------- | | | | |

Installation

CocoaPods (Recommended)

pod 'LicensePlist'
# Installation path: `${PODS_ROOT}/LicensePlist/license-plist`

Homebrew (Also Recommended)

$ brew install mono0926/license-plist/license-plist

Or

$ brew tap mono0926/license-plist
$ brew install license-plist

Mint (Also Recommended)

$ mint run mono0926/LicensePlist

Download the executable binary from Releases

Download from Releases, then copy to

/usr/local/bin/license-plist
etc.

Or you can also download the latest binary and install it with a one-liner.

$ curl -fsSL https://raw.githubusercontent.com/mono0926/LicensePlist/master/install.sh | sh

From Source

Clone the master branch of the repository, then run

make install
.
$ git clone https://github.com/mono0926/LicensePlist.git
$ make install

Usage

  1. When you are in the directory that contains your
    Cartfile
    or
    Pods
    , simply execute
    license-plist
    .
  2. com.mono0926.LicensePlist.Output
    directory will be generated.
  3. Move the files in the output directory into your app's
    Settings.bundle
    .
Settings.bundle
├── Root.plist
├── com.mono0926.LicensePlist
│   ├── APIKit.plist
│   ├── Alamofire.plist
│   └── EditDistance.plist
├── com.mono0926.LicensePlist.plist
├── en.lproj
│   └── Root.strings
└── ja.lproj
    └── Root.strings

Options

You can see options by

license-plist --help
.

--cartfile-path

  • Default:
    Cartfile

--mintfile-path

  • Default:
    Mintfile

--pods-path

  • Default:
    Pods

--package-path

  • Default:
    Package.swift
  • LicensePlist
    tries to find
    YourProjectName.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
    and
    YourProjectName.xcworkspace/xcshareddata/swiftpm/Package.resolved
    , then uses new one. If you make anothor workspace in custom directory, you can use
    --package-path PathToYourCustomWorkspace/CustomWorkspaceName.xcworkspace/xcshareddata/swiftpm/Package.swift
    inside your
    Run script
    .

--output-path

  • Default:
    com.mono0926.LicensePlist.Output
  • Recommended:
    --output-path YOUR_PRODUCT_DIR/Settings.bundle

--github-token

  • Default: None.
  • LicensePlist
    uses GitHub API, so sometimes API limit error occures. You can avoid it by using github-token.
  • You can generate token here
    • repo
      scope is needed.

--config-path

  • Default:
    license_plist.yml
  • You can specify GitHub libraries(introduced by hand) and excluded libraries

--prefix

  • Default:
    com.mono0926.LicensePlist
  • You can specify output file names instead of default one.

--html-path

  • Default: None.
  • If this path is specified, a html acknowledgements file will be generated.

--markdown-path

  • Default: None.
  • If this path is specified, a markdown acknowledgements file will be generated.

--force

  • Default: false
  • LicensePlist
    saves latest result summary, so if there are no changes, the program interrupts.
    • In this case, execution time is less than 100ms for the most case, so you can run
      LicensePlist
      at
      Run Script Phase
      every time
      🎉
  • You can run all the way anyway, by using
    --force
    flag.

--add-version-numbers

  • Default: false
  • When the library name is
    SomeLibrary
    , by adding
    --add-version-numbers
    flag, the name will be changed to
    SomeLibrary (X.Y.Z)
    .
    • X.Y.Z
      is parsed from CocoaPods and Cartfile information, and GitHub libraries specified at Config YAML also support this flag.

License list with versions

--suppress-opening-directory

  • Default: false
  • Only when the files are created or updated, the terminal or the finder opens. By adding
    --suppress-opening-directory
    flag, this behavior is suppressed.

--single-page

  • Default: false
  • All licenses are listed on a single page, not separated pages.

--fail-if-missing-license

  • Default: false
  • If there is even one package for which a license cannot be found, LicensePlist returns exit code 1.

Integrate into build

Add a

Run Script Phase
to
Build Phases
:
if [ $CONFIGURATION = "Debug" ]; then
/usr/local/bin/license-plist --output-path $PRODUCT_NAME/Settings.bundle --github-token YOUR_GITHUB_TOKEN
fi

Run Script Phase

Alternatively, if you've installed LicensePlist via CocoaPods the script should look like this:

if [ $CONFIGURATION = "Debug" ]; then
${PODS_ROOT}/LicensePlist/license-plist --output-path $PRODUCT_NAME/Settings.bundle --github-token YOUR_GITHUB_TOKEN
fi

Q&A

How to generate Xcode project?

Execute

swift package generate-xcodeproj
or
make xcode
.

Related Articles


Stargazers over time

Stargazers over time


寄付(Donation)

Donations are welcome if you like LicensePlist🤗

Send Money by ウォレットアプリ Kyash

Kyash

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.