LicensePlist
LicensePlist
generates iOS license plists for Settings.bundle
.
Carthage
, CocoaPods
and the libraries specified by YAML file(example: license_plist.yml) are supported.
App Setting Root | License List | License Detail |
---|---|---|
Installation
Releases
Download the executable binary fromDownload from Releases, then copy to /usr/local/bin/license-plist
etc.
From Source
Clone the master branch of the repository, then run make install
.
$ git clone https://github.com/mono0926/LicensePlist.git
$ make install
Or you can also install by one-liner.
curl -fsSL https://github.com/mono0926/LicensePlist/raw/master/install.sh | sh
- Homebrew: Not supported yet.
Usage
- On the directory same as
Cartfile
orPods
, simply executelicense-plist
. com.mono0926.LicensePlist.Output
directory will be generated.- 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
--pods-path
- Default:
Pods
--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, so by using github-token you can avoid it.- 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
--force
- Default: false
LicensePlist
saves latest libraries, so if there are no libraries change, iterrupt.- In this case, excecution time is less than 100ms for the most case, so you can run
LicensePlist
atBuild - Pre-actions
every time 🎉
- In this case, excecution time is less than 100ms for the most case, so you can run
- 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 toSomeLibrary (X.Y.Z)
.X.Y.Z
is parsed from CocoaPods and Cartfile information, and GitHub libraries specified at Config YAML also support this flag.
Integrate into build
Add Run Script
to Build - Pre-actions
:
if [ $CONFIGURATION = "Debug" ]; then
cd $SRCROOT
/usr/local/bin/license-plist --output-path $PRODUCT_NAME/Settings.bundle
fi
Q&A
How to generate Xcode project?
Execute swift package generate-xcodeproj
or make xcode
.