mono0926 / LicensePlist
- воскресенье, 14 мая 2017 г. в 03:13:13
Swift
LicensePlist is a script that automatically generates a Plist of all your dependencies, including files added manually or using Carthage or CocoaPods. All these licenses then show up in the Settings app.
LicensePlist
is a script 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.
App Setting Root | License List | License Detail |
---|---|---|
Download from Releases, then copy to /usr/local/bin/license-plist
etc.
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 install.sh | sh
Cartfile
or Pods
, simply execute license-plist
.com.mono0926.LicensePlist.Output
directory will be generated.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
You can see options by license-plist --help
.
--cartfile-path
Cartfile
--pods-path
Pods
--output-path
com.mono0926.LicensePlist.Output
--output-path YOUR_PRODUCT_DIR/Settings.bundle
--github-token
LicensePlist
uses GitHub API, so sometimes API limit error occures, so by using github-token you can avoid it.repo
scope is needed.--config-path
license_plist.yml
--force
LicensePlist
saves latest libraries, so if there are no libraries change, iterrupt.
LicensePlist
at Build - Pre-actions
every time --force
flag.--add-version-numbers
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.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
Execute swift package generate-xcodeproj
or make xcode
.