A license list generator of all your dependencies for iOS applications

Overview

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.

--xcodeproj-path

  • Default: "*.xcodeproj"
  • By specifiying the path to the .xcodeproj LicensePlist will attempt to load the Package.resolved from that Xcode project. If you specify somedir/*.xcodeproj then LicensePlist will load from the first xcodeproj it finds in somedir.

--xcworkspace-path

  • Default: "*.xcworkspace"
  • By specifying the path to the .xcworkspace LicensePlist will load the Package.resolved from that Xcode workspace. If you specify somedir/*.xcworkspace then LicensePlist will load from the first xcworkspace it finds in somedir.
  • --xcworkspace-path supersedes any provided --xcodeproj-path.

--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

Comments
  • Build fails on Xcode 10.2(Swift 5.0)

    Build fails on Xcode 10.2(Swift 5.0)

    When I run brew upgrade license-plist I get the following error.

    $ brew upgrade license-plist
    ==> Upgrading 1 outdated package:
    mono0926/license-plist/license-plist 2.0.0 -> 2.3.0
    ==> Upgrading mono0926/license-plist/license-plist
    ==> Downloading https://github.com/mono0926/LicensePlist/archive/2.3.0.tar.gz
    Already downloaded: /Users/davidcorbin/Library/Caches/Homebrew/downloads/fdbb23e4cbb10e97c178e8caf0d2aff6be4d3134ecf89b892773398384ccce25--LicensePlist-2.3.0.tar.gz
    ==> make install PREFIX=/usr/local/Cellar/license-plist/2.3.0
    Last 15 lines from /Users/davidcorbin/Library/Logs/Homebrew/license-plist/01.make:
      "_swift_weakInit", referenced from:
          _$s6APIKit7SessionC14cancelRequests4with11passingTestyxm_SbxctAA7RequestRzlF in Session.swift.o
      "_swift_weakLoadStrong", referenced from:
          _$s6APIKit7SessionC14cancelRequests4with11passingTestyxm_SbxctAA7RequestRzlFySayAA0B4Task_pGcfU_SbAaH_pXEfU_ in Session.swift.o
      "_swift_willThrow", referenced from:
          _$s10Foundation4DataV6APIKitE11inputStream8capacityACSo07NSInputE0C_SitKcfCTf4gnd_n in Data+InputStream.swift.o
          _$s6APIKit28FormURLEncodedBodyParametersVAA0dE0A2aDP11buildEntityAA07RequestdG0OyKFTW in FormURLEncodedBodyParameters.swift.o
          _$s6APIKit18JSONBodyParametersV11buildEntityAA011RequestBodyE0OyKF in JSONBodyParameters.swift.o
          _$s6APIKit18JSONBodyParametersVAA04BodyC0A2aDP11buildEntityAA07RequestdF0OyKFTW in JSONBodyParameters.swift.o
          _$s6APIKit31MultipartFormDataBodyParametersVAA0eF0A2aDP11buildEntityAA07RequesteH0OyKFTW in MultipartFormDataBodyParameters.swift.o
          _$s6APIKit31MultipartFormDataBodyParametersV4PartV5value4name8mimeType8fileName8encodingAEyp_S2SSgAKSS10FoundationE8EncodingVtKcfC in MultipartFormDataBodyParameters.swift.o
          _$s6APIKit31MultipartFormDataBodyParametersV4PartV7fileURL4name8mimeType0H4NameAE10Foundation0I0V_S2SSgAMtKcfC in MultipartFormDataBodyParameters.swift.o
          ...
    ld: symbol(s) not found for architecture x86_64
    make: *** [build] Error 1
    
    If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
    https://github.com/mono0926/homebrew-license-plist/issues
    
    
    opened by davidcorbin 18
  • All generated plist files contain 404 not found

    All generated plist files contain 404 not found

    I use the current version 1.4.5.

    I generate using license-plist. It does find all the use pods as it created all the .plist files e.g. Alamofire.plist.

    However all these pod plist files which should include the licenses just include 404 not found.

    I tried to fix it by using a github token, but this was not the issue and did not help. Any ideas?

    (Yes I have a working internet connection and I can see the license file of alamofire in my browser without any problem)

    opened by funkenstrahlen 13
  • Can't show license pages under some condition(long license body?) at iPhone X simulator.

    Can't show license pages under some condition(long license body?) at iPhone X simulator.

    I can't show license pages including apostrophe character at iPhone X simulator. it offen occurs like 'Apache License' pages, it includes the sentences "Don't".

    help wanted 
    opened by yhnt 12
  • In iOS 13.0, the Setting app crashes when trying to open license page

    In iOS 13.0, the Setting app crashes when trying to open license page

    The same configuration shows list of licenses as expected for iOS 12, but the list is empty in iOS 13 Beta 5.

    After a couple of experiments I found that items on the second level of Settings.bundle appear only if they are "wrapped" into PSGroupSpecifier.

    So beginning of the com.mono0926.LicensePlist should look like:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    	<key>PreferenceSpecifiers</key>
    	<array>
    		<dict>
    			<key>Type</key>
    			<string>PSGroupSpecifier</string>
    			<key>Title</key>
    			<string></string>
    			<key>Footer</key>
    			<string></string>
    		</dict>
    		<dict>
    			<key>File</key>
    			<string>com.mono0926.LicensePlist/Alamofire</string>
    			<key>Title</key>
    			<string>Alamofire</string>
    			<key>Type</key>
    			<string>PSChildPaneSpecifier</string>
    		</dict>
    
    opened by OlKir 10
  • Can not auto generator plist file if only using Cocoapods

    Can not auto generator plist file if only using Cocoapods

    When I try using CocoaPods is Setting.bundle does not the auto-generator. Moreover, in the setting screen, the list of licenses is not displayed. I used this test on swift 3 and it perfectly worked. Can you explain to me? Thanks

    I get a message like below. (This message show when I tried generator plist file from a terminal)

    [2018-12-26T14:16:38.060+09:00] [INFO] Start
    [2018-12-26T14:16:38.076+09:00] [INFO] Pod acknowledgements found: Pods-InsightTests-acknowledgements.plist
    [2018-12-26T14:16:38.076+09:00] [INFO] Pod acknowledgements found: Pods-Insight-acknowledgements.plist
    [2018-12-26T14:16:38.140+09:00] [INFO] Pods License parse start
    [2018-12-26T14:16:38.149+09:00] [WARNING] Not found: Cartfile.resolved -- file:///Users/t_nguyen/Workspace/insight_app_ios/.
    [2018-12-26T14:16:38.150+09:00] [WARNING] Not found: Cartfile -- file:///Users/t_nguyen/Workspace/insight_app_ios/.
    [2018-12-26T14:16:38.150+09:00] [INFO] Carthage License collect start
    [2018-12-26T14:16:38.150+09:00] [INFO] Manual License start
    [2018-12-26T14:16:38.151+09:00] [WARNING] Not found: file:///Users/t_nguyen/Workspace/insight_app_ios/Insight/Insight/Settings.bundle/com.mono0926.LicensePlist.latest_result.txt.
    [2018-12-26T14:16:38.152+09:00] [INFO] Directory created: file:///Users/t_nguyen/Workspace/insight_app_ios/Insight/Insight/Settings.bundle/
    [2018-12-26T14:16:38.180+09:00] [INFO] End
    [2018-12-26T14:16:38.180+09:00] [INFO] ----------Result-----------
    [2018-12-26T14:16:38.181+09:00] [INFO] # Missing license:
    [2018-12-26T14:16:38.181+09:00] [INFO] None 🎉
    
    opened by ga-tungnguyen 10
  • Remap Name

    Remap Name

    Certain pod/repo names are not exactly the most readable, would it be possible to add something to the config which would allow remapping of names?

    rename:
      - randomLib
        name: New Name
    

    Or even maybe just for GitHub repos:

    github:
      - sharethrough/iOS-SDK
        name: "Sharethrough"
      - mono0926/LicensePlist
    

    (Where the latter wouldn't be changed as it doesn't have a name node)

    enhancement 
    opened by Sherlouk 10
  • Wrong Package names with Package.resolved JSON version 2

    Wrong Package names with Package.resolved JSON version 2

    With the new Package.resolved JSON version 2 (#174), which Apple introduce with Xcode 13.3 and Swift 5.6, I miss the correct package names. The possibility to improve the names is the rename-feature of your tool. Do you have any idea if there is a better way, to get the correct package names? An example:

    // Version 1
    {
      "package": "AppCenter",
      "repositoryURL": "https://github.com/microsoft/appcenter-sdk-apple.git",
      "state": {
        "branch": null,
        "revision": "b84bc8a39ff04bc8d5ae7b4d230c171c562891aa",
        "version": "4.4.1"
      }
    }
    
    // Version 2
    {
      "identity" : "appcenter-sdk-apple",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/microsoft/appcenter-sdk-apple.git",
      "state" : {
        "revision" : "b84bc8a39ff04bc8d5ae7b4d230c171c562891aa",
        "version" : "4.4.1"
      }
    }
    

    Each package name is lowercase. Most package names ends with -sdk, -iOS-sdk or -apple.

    opened by AF-cgi 8
  • Listing CocoaPods dependencies not working in CocoaPods 1.6.0.beta.1

    Listing CocoaPods dependencies not working in CocoaPods 1.6.0.beta.1

    Carthage dependencies have no problem being output, but with Cocoapods, I'm failing on all of my projects.

    I have updated on Homebrew LicensePlist to the latest version along with on my project's Cocoapods.

    I get this error when running license-plist when it's running through my Pods directory:

    [2018-10-17T18:37:15.914-05:00] [INFO] Pod acknowledgements found: Pods-F-xxx-acknowledgements.plist [2018-10-17T18:37:15.914-05:00] [INFO] Pod acknowledgements found: Pods-F-xxx-acknowledgements.plist [2018-10-17T18:37:15.915-05:00] [INFO] Pod acknowledgements found: Pods-xxxExtension-acknowledgements.plist [2018-10-17T18:37:15.918-05:00] [INFO] Pods License parse start [2018-10-17T18:37:15.932-05:00] [ERROR] DecodeError.typeMismatch(expected: Dictionary, actual: , keyPath: KeyPath(["PreferenceSpecifiers"])) [2018-10-17T18:37:15.932-05:00] [ERROR] DecodeError.typeMismatch(expected: Dictionary, actual: , keyPath: KeyPath(["PreferenceSpecifiers"])) [2018-10-17T18:37:15.932-05:00] [ERROR] DecodeError.typeMismatch(expected: Dictionary, actual: , keyPath: KeyPath(["PreferenceSpecifiers"]))

    I'm guessing that something must've changed in Cocoapod's code where LicensePlist isn't ready for such change.

    invalid wontfix 
    opened by ghost 8
  • Consider architecture

    Consider architecture

    opened by mono0926 8
  • Wrong Docs regarding Package.swift

    Wrong Docs regarding Package.swift

    When using SPM from Xcode there is no Package.swift as suggested in:

    If you are using Swift Package Manager inside Xcode, you can use --package-path $PROJECT_FILE_PATH/project.xcworkspace/xcshareddata/swiftpm/Package.swift inside your Run script.
    

    What exactly is meant by this? It should be removed imho. When using SPM from Xcode the resolved package info is stored in $PROJECT_FILE_PATH/project.xcworkspace/xcshareddata/swiftpm/Package.resolved and the package info itself in project.pbxproj

    opened by stherold 7
  • Mapbox license not visible

    Mapbox license not visible

    Hello there!

    On older iOS versions (tried on iOS 10.3 and 12.1) Mapbox-iOS-SDK license not visible in settings. However scroll view scrolls vertically a lot as if the text is visible actually. When copy paste it to txt file and load it manually from file set in license_plist.yml it is invisible too. In iOS 13 it is displayed ok if not crashing settings app.

    Perhaps there are some illegal characters in the text? Maybe texts should be preparsed escaping such a characters?

    opened by illabo 7
  • Command PhaseScriptExecution failed with a nonzero exit code

    Command PhaseScriptExecution failed with a nonzero exit code

    /bin/sh -c /Users/ying/Library/Developer/Xcode/DerivedData/Swift_Boilerplate-ajvvszjgkekqykaepbzzuubejepy/Build/Intermediates.noindex/Swift\\\ Boilerplate.build/Debug-iphonesimulator/Swift\\\ Boilerplate.build/Script-2E406B8E27B3AAD300C9C0AE.sh
    
    Error: Unexpected argument 'Boilerplate/Settings.bundle'
    Usage: license-plist <options>
      See 'license-plist --help' for more information.
    Command PhaseScriptExecution failed with a nonzero exit code
    
    opened by kw214 0
  • Doesn't work behind proxy

    Doesn't work behind proxy

    I can't get the tool to run behind a proxy. I've installed it via brew and all other terminal commands such as curl and ping work in my environment. Does it not support environment variables such as HTTP_PROXY?

    opened by mudkiplex 1
  • Unclear if SPM is supported

    Unclear if SPM is supported

    I am now using Swift Package Manager (SPM) instead of Cocoapods to add dependencies and would like to know if this library supports generating licences plist based on the SPM dependencies that I use.

    I think that this library supports SPM based on going through the issues, but this is not mentioned at all in the README.md.

    It would be great if the README.md could be updated with clear instructions in how to use this library with SPM. Only Cocoapods and Carthage are currently mentioned at the moment.

    opened by pepejeria 12
  • Support for multiple targets?

    Support for multiple targets?

    Is there an option for generating licenses by target? Currently, all dependencies end up in all targets:

    • Target A, depends on DependencyA
    • Target B, depends on DependencyB

    The generated license plist will contain both DependencyA and DependencyB for both targets.

    opened by xavierLowmiller 2
Releases(3.23.4)
Owner
Masayuki Ono (mono)
Software Engineer (Flutter/Dart, Firebase/GCP, iOS/Swift, TypeScript)
Masayuki Ono (mono)
Objective-c code Apple style documentation set generator.

About appledoc IMPORTANT NOTICE: collaborators needed appledoc is command line tool that helps Objective-C developers generate Apple-like source code

tomaz 4.2k Dec 20, 2022
Laurine - Localization code generator written in Swift. Sweet!

Author's note: Thanks everyone for making Laurine the TOP trending Swift repository in the world - this is amazing and very heart-warming! But this is

Jiri Trecak 1.3k Dec 28, 2022
Xcode .appiconset generator for Adobe Illustrator.

Creating AppIcon sets from Adobe Illustrator This repo is rewrited from original repo https://github.com/CaryChamplin/CreatingIconsFromAI. Just genera

gitmerge 73 Nov 9, 2020
Shows your current framerate (fps) in the status bar of your iOS app

WatchdogInspector Shows your current framerate (fps) in the status bar of your iOS app Be a good citizen! Don't block your main thread! WatchdogInspec

Christian Menschel 510 Nov 24, 2022
SwiftGen is a tool to automatically generate Swift code for resources of your projects

SwiftGen SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them ty

null 8.3k Jan 5, 2023
An Xcode plug-in to format your code using SwiftLint.

SwiftLintXcode An Xcode plug-in to format your code using SwiftLint. Runs swiftlint autocorrect --path CURRENT_FILE before *.swift file is saved. IMPO

Yuya Tanaka 348 Sep 18, 2022
Command line program that detects unused resource strings in an iOS or OS X application.

Abandoned Resource String Detection This command line program detects unused resource strings in an iOS or OS X application. Updated to Swift 3, thank

Josh Smith 360 Nov 26, 2022
An iOS app decrypter, full static using fouldecrypt.

Iridium An iOS app decrypter, full static using fouldecrypt. Supporting iOS 13+ Note We have built everything into the package, you can install and fl

Lakr Aream 234 Jan 9, 2023
An iOS app decrypter, full static using fouldecrypt.

Iridium An iOS app decrypter, full static using fouldecrypt. Supporting iOS 13+ Note We have built everything into the package, you can install and fl

Lakr Aream 226 Dec 24, 2022
Build native iOS, Android, and Web apps with Capacitor and Remix.run 💿

This repository holds production ready Capacitor templates for building native mobile applications using Remix. Using Capacitor, you can quickly build out a native mobile application for iOS and Android using web technology, such as Remix.

Ionic 70 Dec 30, 2022
Clendar - universal calendar app. Written in SwiftUI. Available on App Store. MIT License.

Clendar - minimal calendar Minimal Calendar & Widgets Landing Page About This project is started out as an UIKit base app for me to learn new WWDC fea

Vinh Nguyen 418 Dec 30, 2022
A super simple tool for macOS Swift developers to check validity of a Gumroad-issued software license keys

Gumroad License Validator Overview A super simple tool for macOS Swift developers to check validity of a Gumroad-issued software license keys Requirem

Daniel Kašaj 13 Sep 2, 2022
LicensePlist is a command-line tool that automatically generates a Plist of all your dependencies, including files added manually

LicensePlist is a command-line tool that automatically generates a Plist of all your dependencies, including files added manually(specifi

Masayuki Ono (mono) 2.2k Dec 29, 2022
QR code generator in Swift, with no external dependencies.

QRDispenser is a lightweight library to generate a QR code as image (UIImage) in your app. It uses only native components, with no dependency from oth

Andrea Mario Lufino 12 Nov 17, 2022
Acknowledgements screen displaying a list of licenses, for example from CocoaPods dependencies.

VTAcknowledgementsViewController Acknowledgements screen displaying a list of licenses, for example from CocoaPods dependencies. Also available in Swi

Vincent Tourraine 868 Oct 28, 2022
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!

SwiftGen SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them ty

null 8.3k Dec 31, 2022
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!

SwiftGen SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them ty

null 8.3k Jan 3, 2023
A guide on setting up Xcode with all the essential Applications, Tools, and Frameworks to make your development experience with Xcode great!

A guide on setting up Xcode with all the essential Applications, Tools, and Frameworks to make your development experience with Xcode great!

Michael Royal 24 Jan 4, 2023
A library to inject your dependencies via property wrappers

?? DependencyInjection A library to inject your dependencies via property wrappers ?? Features DependencyInjection allows you to define the dependenci

Alberto Garcia 4 Dec 10, 2022
ReadMe app is here to list all of the physical books in your personal library

ReadMe App The ReadMe app is here to list all of the physical books in your personal library, mark books you still have to read review books after you

Ihor Muliar 1 Nov 23, 2021