SlideShare a Scribd company logo
1 of 34
Download to read offline
LicensePlist
A license list generator of all your
dependencies for iOS applications
Masayuki Ono(@_mono)
potatotips #40 (iOS/Android Tips )
! Self-introduction !
Twitter: @_mono
Qiita: mono0926
Medium: @mono0926
Favorite Language: Swift"
LicensePlist
• A license list generator of all your

dependencies for iOS applications.
• Made of Swift Packge Manager (SwiftPM).
• ⭐759 (May 24, 2017)
• CocoaPods
• Carthage
• Source code added manually
Existing Tools
for displaying the licenses
• VTAcknowledgementsViewController⭐753
• TRZSlideLicenseViewController⭐121
• AcknowList⭐84
• CarthageLicenseScript⭐68
• LicensesKit⭐39
• SwiftyAcknowledgements⭐32
*Number of Stars: May 24, 2017
ios-license-generator⭐23
• Written in Golang.
• Supports CocoaPods and Carthage.
LicensePlist was born $
• Written in Swift.
• Made of Swift Packge Manager (SwiftPM).
• Supports all your dependencies, including files
added manually or using Carthage or CocoaPods.
• Generates plist files, which show up in Settings app.
Demo
https://youtu.be/CugrdfIy0ps
Processing Flow
Licenses
Settings.bundle
Carthage
Processing Flow
Licenses
Settings.bundle
Carthage
1
Processing Flow
Licenses
Settings.bundle
Carthage
1
2
Processing Flow
Licenses
Settings.bundle
Carthage
1
2
3
Collect CocoaPods dependencies and licenses
platform :ios, '9.0'
inhibit_all_warnings!
use_frameworks!
target 'SomeLib' do
pod 'SDWebImage'
target 'MyApp' do
pod 'Alamofire'
end
end
Podfile
Collect CocoaPods dependencies and licenses
platform :ios, '9.0'
inhibit_all_warnings!
use_frameworks!
target 'SomeLib' do
pod 'SDWebImage'
target 'MyApp' do
pod 'Alamofire'
end
end
Podfile
Pods
├── Manifest.lock
├── Pods.xcodeproj
├── SDWebImage
│   ├── LICENSE
│   └── SDWebImage
└── Target Support Files
├── Pods-SomeLib
│   ├── Info.plist
│   ├── Pods-SomeLib-acknowledgements.markdown
│   ├── Pods-SomeLib-acknowledgements.plist
│   ├── Pods-SomeLib-dummy.m
│   └── Pods-SomeLib.release.xcconfig
├── Pods-SomeLib-MyApp
│   ├── Info.plist
│   ├── Pods-SomeLib-MyApp-acknowledgements.markdown
│   ├── Pods-SomeLib-MyApp-acknowledgements.plist
│   ├── Pods-SomeLib-MyApp-dummy.m
│   └── Pods-SomeLib-MyApp.release.xcconfig
└── SDWebImage
Collect CocoaPods dependencies and licenses
platform :ios, '9.0'
inhibit_all_warnings!
use_frameworks!
target 'SomeLib' do
pod 'SDWebImage'
target 'MyApp' do
pod 'Alamofire'
end
end
Podfile
Pods
├── Manifest.lock
├── Pods.xcodeproj
├── SDWebImage
│   ├── LICENSE
│   └── SDWebImage
└── Target Support Files
├── Pods-SomeLib
│   ├── Info.plist
│   ├── Pods-SomeLib-acknowledgements.markdown
│   ├── Pods-SomeLib-acknowledgements.plist
│   ├── Pods-SomeLib-dummy.m
│   └── Pods-SomeLib.release.xcconfig
├── Pods-SomeLib-MyApp
│   ├── Info.plist
│   ├── Pods-SomeLib-MyApp-acknowledgements.markdown
│   ├── Pods-SomeLib-MyApp-acknowledgements.plist
│   ├── Pods-SomeLib-MyApp-dummy.m
│   └── Pods-SomeLib-MyApp.release.xcconfig
└── SDWebImage
License Body
Collect CocoaPods dependencies and lienses
<?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>FooterText</key>
            <string>This application makes use of the following third party libraries:</string>
            <key>Title</key>
            <string>Acknowledgements</string>
            <key>Type</key>
            <string>PSGroupSpecifier</string>
        </dict>
        <dict>
            <key>FooterText</key>
            <string>Copyright (c) 2016 Olivier Poitrey rs@dailymotion.com
</string>
            <key>License</key>
            <string>MIT</string>
            <key>Title</key>
            <string>SDWebImage</string>
            <key>Type</key>
            <string>PSGroupSpecifier</string>
        </dict>
        <dict>
            <key>FooterText</key>
            <string>The MIT License (MIT)
Copyright (c) 2014 Le Van Nghia
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
Pods-SomeLib-MyApp-acknowledgements.plist
Collect CocoaPods dependencies and lienses
<?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>FooterText</key>
            <string>This application makes use of the following third party libraries:</string>
            <key>Title</key>
            <string>Acknowledgements</string>
            <key>Type</key>
            <string>PSGroupSpecifier</string>
        </dict>
        <dict>
            <key>FooterText</key>
            <string>Copyright (c) 2016 Olivier Poitrey rs@dailymotion.com
</string>
            <key>License</key>
            <string>MIT</string>
            <key>Title</key>
            <string>SDWebImage</string>
            <key>Type</key>
            <string>PSGroupSpecifier</string>
        </dict>
        <dict>
            <key>FooterText</key>
            <string>The MIT License (MIT)
Copyright (c) 2014 Le Van Nghia
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
Pods-SomeLib-MyApp-acknowledgements.plist
Collect Carthage dependencies
github "ikesyo/Himotoki"
github "ishkawa/APIKit"
Cartfile
Collect Carthage dependencies
github "ikesyo/Himotoki"
github "ishkawa/APIKit"
Cartfile
github "antitypical/Result" "3.2.2"
github "ikesyo/Himotoki" "3.0.1"
github "ishkawa/APIKit" "3.1.2"
Cartfile.resolved
Collect Carthage dependencies
github "ikesyo/Himotoki"
github "ishkawa/APIKit"
Cartfile
github "antitypical/Result" "3.2.2"
github "ikesyo/Himotoki" "3.0.1"
github "ishkawa/APIKit" "3.1.2"
Cartfile.resolved
Dependencies are added.
Collect GitHub libraries’ licenses
➜ curl "https://api.github.com/repos/ikesyo/Himotoki/license"
{
"name": "LICENSE.md",
"path": "LICENSE.md",
"sha": "d89aa6fe6d15f1966b4456d2fe525503666fe18d",
"size": 1076,
"url": "https://api.github.com/repos/ikesyo/Himotoki/contents/LICENSE.md?ref=master",
"html_url": "https://github.com/ikesyo/Himotoki/blob/master/LICENSE.md",
"git_url": "https://api.github.com/repos/ikesyo/Himotoki/git/blobs/
d89aa6fe6d15f1966b4456d2fe525503666fe18d",
"download_url": "https://raw.githubusercontent.com/ikesyo/Himotoki/master/LICENSE.md",
"type": "file",
"content":
“VGhlIE1JVCBMaWNlbnNlIChNSVQpCgpDb3B5cmlnEZST00sCk9VnVCBPRiBPUiBJTiBDT05ORUNUSU…
9OIFdJVEggVEhFIFNPRlRXQVJFIE9SIFRInRSBVU0UgT1IgT1EVBTElOR1MgSU4gVEhFClNPRlRXQVJFLgo=n”,
"encoding": "base64",
"_links": { … },
…
}
See: https://developer.github.com/v3/licenses/
Collect GitHub libraries’ licenses
➜ curl "https://api.github.com/repos/ikesyo/Himotoki/license"
{
"name": "LICENSE.md",
"path": "LICENSE.md",
"sha": "d89aa6fe6d15f1966b4456d2fe525503666fe18d",
"size": 1076,
"url": "https://api.github.com/repos/ikesyo/Himotoki/contents/LICENSE.md?ref=master",
"html_url": "https://github.com/ikesyo/Himotoki/blob/master/LICENSE.md",
"git_url": "https://api.github.com/repos/ikesyo/Himotoki/git/blobs/
d89aa6fe6d15f1966b4456d2fe525503666fe18d",
"download_url": "https://raw.githubusercontent.com/ikesyo/Himotoki/master/LICENSE.md",
"type": "file",
"content":
“VGhlIE1JVCBMaWNlbnNlIChNSVQpCgpDb3B5cmlnEZST00sCk9VnVCBPRiBPUiBJTiBDT05ORUNUSU…
9OIFdJVEggVEhFIFNPRlRXQVJFIE9SIFRInRSBVU0UgT1IgT1EVBTElOR1MgSU4gVEhFClNPRlRXQVJFLgo=n”,
"encoding": "base64",
"_links": { … },
…
}
See: https://developer.github.com/v3/licenses/
Collect GitHub libraries’ licenses
let content =
“TUlUIExpY2Vuc2UKCkNvcHlyaWdodCAoYykgMjAxNyBNYXNheXVraSBPbm8KnClBlcm1
pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlnLCB0byBhb…
MSVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDnVCwgVE9SVCBPUiBPVEh
FUldJU0UsIEFSSVNJTkcgRlJPTSwKT1VUIE9GIE9SnIElOIENPTk5FQ1RJT04gV0lUSCB
USEUgU09GVFdBUkUgT1IgVEhFIFVTRSBPnUiBPVEhFUiBERUFMSU5HUyBJTiBUSEUKU09
GVFdBUkUuCg==n”
let decoded = String(data: Data(base64Encoded: content,
options: [.ignoreUnknownCharacters])!,
encoding: .utf8)!
Parse base 64 encoded `content`
Collect GitHub libraries’ licenses
let content =
“TUlUIExpY2Vuc2UKCkNvcHlyaWdodCAoYykgMjAxNyBNYXNheXVraSBPbm8KnClBlcm1
pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlnLCB0byBhb…
MSVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDnVCwgVE9SVCBPUiBPVEh
FUldJU0UsIEFSSVNJTkcgRlJPTSwKT1VUIE9GIE9SnIElOIENPTk5FQ1RJT04gV0lUSCB
USEUgU09GVFdBUkUgT1IgVEhFIFVTRSBPnUiBPVEhFUiBERUFMSU5HUyBJTiBUSEUKU09
GVFdBUkUuCg==n”
let decoded = String(data: Data(base64Encoded: content,
options: [.ignoreUnknownCharacters])!,
encoding: .utf8)!
Parse base 64 encoded `content`
`content` contains ‘n’ and so it should be ignored.
Parallel processing by using `(NS)Operation`
Collect Carthage licenses
let queue = OperationQueue()
let carthageOperations = githubLibraries.map { GitHubLicense.download($0) }
queue.addOperations(carthageOperations,
waitUntilFinished: true)
githubLicenses = carthageOperations.map { $0.result?.value }.flatMap { $0 }
Parallel processing by using `(NS)Operation`
Collect Carthage licenses
let queue = OperationQueue()
let carthageOperations = githubLibraries.map { GitHubLicense.download($0) }
queue.addOperations(carthageOperations,
waitUntilFinished: true)
githubLicenses = carthageOperations.map { $0.result?.value }.flatMap { $0 }
Parallel processing by using `(NS)Operation`
Collect Carthage licenses
let queue = OperationQueue()
let carthageOperations = githubLibraries.map { GitHubLicense.download($0) }
queue.addOperations(carthageOperations,
waitUntilFinished: true)
githubLicenses = carthageOperations.map { $0.result?.value }.flatMap { $0 }
Parallel processing by using `(NS)Operation`
Collect Carthage licenses
let queue = OperationQueue()
let carthageOperations = githubLibraries.map { GitHubLicense.download($0) }
queue.addOperations(carthageOperations,
waitUntilFinished: true)
githubLicenses = carthageOperations.map { $0.result?.value }.flatMap { $0 }
About 5 times faster$
Parallel processing by using `(NS)Operation`
Collect Carthage licenses
let queue = OperationQueue()
let carthageOperations = githubLibraries.map { GitHubLicense.download($0) }
queue.addOperations(carthageOperations,
waitUntilFinished: true)
githubLicenses = carthageOperations.map { $0.result?.value }.flatMap { $0 }
About 5 times faster$
https://github.com/mono0926/LicensePlist/blob/36573fdc5933384534908acf32a642e81c2d9cbc/Sources/LicensePlistCore/ResultOperation.swift
Wrapped Operation class→
Generate plist files
let rootItems: [[String: String]] = …
let root = try! PropertyListSerialization.data(fromPropertyList: ["PreferenceSpecifiers": rootItems],
format: .xml,
options: 0)
try! root.write(to: rootPath)
Generating plist files is easy by using `PropertyListSerialization`
Generate plist files
let rootItems: [[String: String]] = …
let root = try! PropertyListSerialization.data(fromPropertyList: ["PreferenceSpecifiers": rootItems],
format: .xml,
options: 0)
try! root.write(to: rootPath)
• PropertyListSerialization - Foundation | Apple Developer Documentation
• Property List Programming Guide - Apple Developer
• Implementing an iOS Settings Bundle
Generating plist files is easy by using `PropertyListSerialization`
Config file(YAML)
Install
Homebrew
• `brew install mono0926/license-plist/license-plist`
• Swift Package Manager(SwiftPM)
Homebrew
From Releases
From Source
• `make install`
CocoaPods (Not yet supported)
• Support CocoaPods distribution · Issue #52 by @ikesyo
See: https://github.com/mono0926/LicensePlist#integrate-into-build
Automate your license files management
Links
How to create command-line tool made of SwiftPM.
• Building a command line tool using the Swift Package Manager
• Swift Package Manager (SwiftPM) - Qiita
• Swift Package Manager(SwiftPM) Homebrew - Qiita
How to get started with OSS(open source software).
• Swift - Qiita
• iOS OSS Developers.IO
• How to Get Started with Open Source – Hacker Noon

More Related Content

What's hot

ゴリラテスト モバイルゲームのUIを自動的に検出・操作する モンキーテスト
ゴリラテスト  モバイルゲームのUIを自動的に検出・操作する モンキーテストゴリラテスト  モバイルゲームのUIを自動的に検出・操作する モンキーテスト
ゴリラテスト モバイルゲームのUIを自動的に検出・操作する モンキーテスト
KLab Inc. / Tech
 
LightGBMを少し改造してみた ~カテゴリ変数の動的エンコード~
LightGBMを少し改造してみた ~カテゴリ変数の動的エンコード~LightGBMを少し改造してみた ~カテゴリ変数の動的エンコード~
LightGBMを少し改造してみた ~カテゴリ変数の動的エンコード~
RyuichiKanoh
 

What's hot (20)

モジュールの凝集度・結合度・インタフェース
モジュールの凝集度・結合度・インタフェースモジュールの凝集度・結合度・インタフェース
モジュールの凝集度・結合度・インタフェース
 
Domain Modeling Made Functional (DevTernity 2022)
Domain Modeling Made Functional (DevTernity 2022)Domain Modeling Made Functional (DevTernity 2022)
Domain Modeling Made Functional (DevTernity 2022)
 
テストコードの DRY と DAMP
テストコードの DRY と DAMPテストコードの DRY と DAMP
テストコードの DRY と DAMP
 
C++ マルチスレッド 入門
C++ マルチスレッド 入門C++ マルチスレッド 入門
C++ マルチスレッド 入門
 
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
 
Smalltalkだめ自慢
Smalltalkだめ自慢Smalltalkだめ自慢
Smalltalkだめ自慢
 
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsider
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsiderMoq & Fakes Framework を使った実践的ユニットテスト - BuildInsider
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsider
 
レイヤードアーキテクチャを意識したPHPアプリケーションの構築
レイヤードアーキテクチャを意識したPHPアプリケーションの構築レイヤードアーキテクチャを意識したPHPアプリケーションの構築
レイヤードアーキテクチャを意識したPHPアプリケーションの構築
 
プログラムで映像をつくるとは?? ~超入門編~
プログラムで映像をつくるとは?? ~超入門編~プログラムで映像をつくるとは?? ~超入門編~
プログラムで映像をつくるとは?? ~超入門編~
 
TLS, HTTP/2演習
TLS, HTTP/2演習TLS, HTTP/2演習
TLS, HTTP/2演習
 
暗号技術の実装と数学
暗号技術の実装と数学暗号技術の実装と数学
暗号技術の実装と数学
 
ソフトウェア設計における 意思決定とそのレビューの秘訣
ソフトウェア設計における 意思決定とそのレビューの秘訣ソフトウェア設計における 意思決定とそのレビューの秘訣
ソフトウェア設計における 意思決定とそのレビューの秘訣
 
ゴリラテスト モバイルゲームのUIを自動的に検出・操作する モンキーテスト
ゴリラテスト  モバイルゲームのUIを自動的に検出・操作する モンキーテストゴリラテスト  モバイルゲームのUIを自動的に検出・操作する モンキーテスト
ゴリラテスト モバイルゲームのUIを自動的に検出・操作する モンキーテスト
 
C++ REST SDKを使ってWebサービスを利用する
C++ REST SDKを使ってWebサービスを利用するC++ REST SDKを使ってWebサービスを利用する
C++ REST SDKを使ってWebサービスを利用する
 
強いて言えば「集約どう実装するのかな、を考える」な話
強いて言えば「集約どう実装するのかな、を考える」な話強いて言えば「集約どう実装するのかな、を考える」な話
強いて言えば「集約どう実装するのかな、を考える」な話
 
ログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティ
ログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティ
ログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティ
 
LightGBMを少し改造してみた ~カテゴリ変数の動的エンコード~
LightGBMを少し改造してみた ~カテゴリ変数の動的エンコード~LightGBMを少し改造してみた ~カテゴリ変数の動的エンコード~
LightGBMを少し改造してみた ~カテゴリ変数の動的エンコード~
 
オブジェクト指向プログラミングのためのモデリング入門
オブジェクト指向プログラミングのためのモデリング入門オブジェクト指向プログラミングのためのモデリング入門
オブジェクト指向プログラミングのためのモデリング入門
 
Docker環境でetherium開発環境を作る際のはまりどころ
Docker環境でetherium開発環境を作る際のはまりどころDocker環境でetherium開発環境を作る際のはまりどころ
Docker環境でetherium開発環境を作る際のはまりどころ
 
Cognitive Complexity でコードの複雑さを定量的に計測しよう
Cognitive Complexity でコードの複雑さを定量的に計測しようCognitive Complexity でコードの複雑さを定量的に計測しよう
Cognitive Complexity でコードの複雑さを定量的に計測しよう
 

Similar to LicensePlist - A license list generator of all your dependencies for iOS applications

Similar to LicensePlist - A license list generator of all your dependencies for iOS applications (20)

Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
 
How to debug IoT Agents
How to debug IoT AgentsHow to debug IoT Agents
How to debug IoT Agents
 
Django deployment with PaaS
Django deployment with PaaSDjango deployment with PaaS
Django deployment with PaaS
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
GitOps with Flux - IPC Munich 2022
GitOps with Flux - IPC Munich 2022GitOps with Flux - IPC Munich 2022
GitOps with Flux - IPC Munich 2022
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
 
Dependent things dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshareDependent things   dependency management for apple sw - slideshare
Dependent things dependency management for apple sw - slideshare
 
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer ToolsDevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
 
Apache development with GitHub and Travis CI
Apache development with GitHub and Travis CIApache development with GitHub and Travis CI
Apache development with GitHub and Travis CI
 
Fastlane
FastlaneFastlane
Fastlane
 
JavaScript All The Things
JavaScript All The ThingsJavaScript All The Things
JavaScript All The Things
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
 
Esri open source projects on GitHub
Esri open source projects on GitHubEsri open source projects on GitHub
Esri open source projects on GitHub
 
Jump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & GithubJump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & Github
 
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
 
Deploy Serverless Apps with Python: AWS Chalice Deep Dive (DEV427-R2) - AWS r...
Deploy Serverless Apps with Python: AWS Chalice Deep Dive (DEV427-R2) - AWS r...Deploy Serverless Apps with Python: AWS Chalice Deep Dive (DEV427-R2) - AWS r...
Deploy Serverless Apps with Python: AWS Chalice Deep Dive (DEV427-R2) - AWS r...
 
Cocoapods in action
Cocoapods in actionCocoapods in action
Cocoapods in action
 
Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018
Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018
Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 

Recently uploaded

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 

Recently uploaded (20)

%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 

LicensePlist - A license list generator of all your dependencies for iOS applications

  • 1. LicensePlist A license list generator of all your dependencies for iOS applications Masayuki Ono(@_mono) potatotips #40 (iOS/Android Tips )
  • 2. ! Self-introduction ! Twitter: @_mono Qiita: mono0926 Medium: @mono0926 Favorite Language: Swift"
  • 3. LicensePlist • A license list generator of all your
 dependencies for iOS applications. • Made of Swift Packge Manager (SwiftPM). • ⭐759 (May 24, 2017) • CocoaPods • Carthage • Source code added manually
  • 4. Existing Tools for displaying the licenses • VTAcknowledgementsViewController⭐753 • TRZSlideLicenseViewController⭐121 • AcknowList⭐84 • CarthageLicenseScript⭐68 • LicensesKit⭐39 • SwiftyAcknowledgements⭐32 *Number of Stars: May 24, 2017
  • 5. ios-license-generator⭐23 • Written in Golang. • Supports CocoaPods and Carthage.
  • 6. LicensePlist was born $ • Written in Swift. • Made of Swift Packge Manager (SwiftPM). • Supports all your dependencies, including files added manually or using Carthage or CocoaPods. • Generates plist files, which show up in Settings app.
  • 12. Collect CocoaPods dependencies and licenses platform :ios, '9.0' inhibit_all_warnings! use_frameworks! target 'SomeLib' do pod 'SDWebImage' target 'MyApp' do pod 'Alamofire' end end Podfile
  • 13. Collect CocoaPods dependencies and licenses platform :ios, '9.0' inhibit_all_warnings! use_frameworks! target 'SomeLib' do pod 'SDWebImage' target 'MyApp' do pod 'Alamofire' end end Podfile Pods ├── Manifest.lock ├── Pods.xcodeproj ├── SDWebImage │   ├── LICENSE │   └── SDWebImage └── Target Support Files ├── Pods-SomeLib │   ├── Info.plist │   ├── Pods-SomeLib-acknowledgements.markdown │   ├── Pods-SomeLib-acknowledgements.plist │   ├── Pods-SomeLib-dummy.m │   └── Pods-SomeLib.release.xcconfig ├── Pods-SomeLib-MyApp │   ├── Info.plist │   ├── Pods-SomeLib-MyApp-acknowledgements.markdown │   ├── Pods-SomeLib-MyApp-acknowledgements.plist │   ├── Pods-SomeLib-MyApp-dummy.m │   └── Pods-SomeLib-MyApp.release.xcconfig └── SDWebImage
  • 14. Collect CocoaPods dependencies and licenses platform :ios, '9.0' inhibit_all_warnings! use_frameworks! target 'SomeLib' do pod 'SDWebImage' target 'MyApp' do pod 'Alamofire' end end Podfile Pods ├── Manifest.lock ├── Pods.xcodeproj ├── SDWebImage │   ├── LICENSE │   └── SDWebImage └── Target Support Files ├── Pods-SomeLib │   ├── Info.plist │   ├── Pods-SomeLib-acknowledgements.markdown │   ├── Pods-SomeLib-acknowledgements.plist │   ├── Pods-SomeLib-dummy.m │   └── Pods-SomeLib.release.xcconfig ├── Pods-SomeLib-MyApp │   ├── Info.plist │   ├── Pods-SomeLib-MyApp-acknowledgements.markdown │   ├── Pods-SomeLib-MyApp-acknowledgements.plist │   ├── Pods-SomeLib-MyApp-dummy.m │   └── Pods-SomeLib-MyApp.release.xcconfig └── SDWebImage License Body
  • 15. Collect CocoaPods dependencies and lienses <?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>FooterText</key>             <string>This application makes use of the following third party libraries:</string>             <key>Title</key>             <string>Acknowledgements</string>             <key>Type</key>             <string>PSGroupSpecifier</string>         </dict>         <dict>             <key>FooterText</key>             <string>Copyright (c) 2016 Olivier Poitrey rs@dailymotion.com </string>             <key>License</key>             <string>MIT</string>             <key>Title</key>             <string>SDWebImage</string>             <key>Type</key>             <string>PSGroupSpecifier</string>         </dict>         <dict>             <key>FooterText</key>             <string>The MIT License (MIT) Copyright (c) 2014 Le Van Nghia Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Pods-SomeLib-MyApp-acknowledgements.plist
  • 16. Collect CocoaPods dependencies and lienses <?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>FooterText</key>             <string>This application makes use of the following third party libraries:</string>             <key>Title</key>             <string>Acknowledgements</string>             <key>Type</key>             <string>PSGroupSpecifier</string>         </dict>         <dict>             <key>FooterText</key>             <string>Copyright (c) 2016 Olivier Poitrey rs@dailymotion.com </string>             <key>License</key>             <string>MIT</string>             <key>Title</key>             <string>SDWebImage</string>             <key>Type</key>             <string>PSGroupSpecifier</string>         </dict>         <dict>             <key>FooterText</key>             <string>The MIT License (MIT) Copyright (c) 2014 Le Van Nghia Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Pods-SomeLib-MyApp-acknowledgements.plist
  • 17. Collect Carthage dependencies github "ikesyo/Himotoki" github "ishkawa/APIKit" Cartfile
  • 18. Collect Carthage dependencies github "ikesyo/Himotoki" github "ishkawa/APIKit" Cartfile github "antitypical/Result" "3.2.2" github "ikesyo/Himotoki" "3.0.1" github "ishkawa/APIKit" "3.1.2" Cartfile.resolved
  • 19. Collect Carthage dependencies github "ikesyo/Himotoki" github "ishkawa/APIKit" Cartfile github "antitypical/Result" "3.2.2" github "ikesyo/Himotoki" "3.0.1" github "ishkawa/APIKit" "3.1.2" Cartfile.resolved Dependencies are added.
  • 20. Collect GitHub libraries’ licenses ➜ curl "https://api.github.com/repos/ikesyo/Himotoki/license" { "name": "LICENSE.md", "path": "LICENSE.md", "sha": "d89aa6fe6d15f1966b4456d2fe525503666fe18d", "size": 1076, "url": "https://api.github.com/repos/ikesyo/Himotoki/contents/LICENSE.md?ref=master", "html_url": "https://github.com/ikesyo/Himotoki/blob/master/LICENSE.md", "git_url": "https://api.github.com/repos/ikesyo/Himotoki/git/blobs/ d89aa6fe6d15f1966b4456d2fe525503666fe18d", "download_url": "https://raw.githubusercontent.com/ikesyo/Himotoki/master/LICENSE.md", "type": "file", "content": “VGhlIE1JVCBMaWNlbnNlIChNSVQpCgpDb3B5cmlnEZST00sCk9VnVCBPRiBPUiBJTiBDT05ORUNUSU… 9OIFdJVEggVEhFIFNPRlRXQVJFIE9SIFRInRSBVU0UgT1IgT1EVBTElOR1MgSU4gVEhFClNPRlRXQVJFLgo=n”, "encoding": "base64", "_links": { … }, … } See: https://developer.github.com/v3/licenses/
  • 21. Collect GitHub libraries’ licenses ➜ curl "https://api.github.com/repos/ikesyo/Himotoki/license" { "name": "LICENSE.md", "path": "LICENSE.md", "sha": "d89aa6fe6d15f1966b4456d2fe525503666fe18d", "size": 1076, "url": "https://api.github.com/repos/ikesyo/Himotoki/contents/LICENSE.md?ref=master", "html_url": "https://github.com/ikesyo/Himotoki/blob/master/LICENSE.md", "git_url": "https://api.github.com/repos/ikesyo/Himotoki/git/blobs/ d89aa6fe6d15f1966b4456d2fe525503666fe18d", "download_url": "https://raw.githubusercontent.com/ikesyo/Himotoki/master/LICENSE.md", "type": "file", "content": “VGhlIE1JVCBMaWNlbnNlIChNSVQpCgpDb3B5cmlnEZST00sCk9VnVCBPRiBPUiBJTiBDT05ORUNUSU… 9OIFdJVEggVEhFIFNPRlRXQVJFIE9SIFRInRSBVU0UgT1IgT1EVBTElOR1MgSU4gVEhFClNPRlRXQVJFLgo=n”, "encoding": "base64", "_links": { … }, … } See: https://developer.github.com/v3/licenses/
  • 22. Collect GitHub libraries’ licenses let content = “TUlUIExpY2Vuc2UKCkNvcHlyaWdodCAoYykgMjAxNyBNYXNheXVraSBPbm8KnClBlcm1 pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlnLCB0byBhb… MSVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDnVCwgVE9SVCBPUiBPVEh FUldJU0UsIEFSSVNJTkcgRlJPTSwKT1VUIE9GIE9SnIElOIENPTk5FQ1RJT04gV0lUSCB USEUgU09GVFdBUkUgT1IgVEhFIFVTRSBPnUiBPVEhFUiBERUFMSU5HUyBJTiBUSEUKU09 GVFdBUkUuCg==n” let decoded = String(data: Data(base64Encoded: content, options: [.ignoreUnknownCharacters])!, encoding: .utf8)! Parse base 64 encoded `content`
  • 23. Collect GitHub libraries’ licenses let content = “TUlUIExpY2Vuc2UKCkNvcHlyaWdodCAoYykgMjAxNyBNYXNheXVraSBPbm8KnClBlcm1 pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlnLCB0byBhb… MSVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDnVCwgVE9SVCBPUiBPVEh FUldJU0UsIEFSSVNJTkcgRlJPTSwKT1VUIE9GIE9SnIElOIENPTk5FQ1RJT04gV0lUSCB USEUgU09GVFdBUkUgT1IgVEhFIFVTRSBPnUiBPVEhFUiBERUFMSU5HUyBJTiBUSEUKU09 GVFdBUkUuCg==n” let decoded = String(data: Data(base64Encoded: content, options: [.ignoreUnknownCharacters])!, encoding: .utf8)! Parse base 64 encoded `content` `content` contains ‘n’ and so it should be ignored.
  • 24. Parallel processing by using `(NS)Operation` Collect Carthage licenses let queue = OperationQueue() let carthageOperations = githubLibraries.map { GitHubLicense.download($0) } queue.addOperations(carthageOperations, waitUntilFinished: true) githubLicenses = carthageOperations.map { $0.result?.value }.flatMap { $0 }
  • 25. Parallel processing by using `(NS)Operation` Collect Carthage licenses let queue = OperationQueue() let carthageOperations = githubLibraries.map { GitHubLicense.download($0) } queue.addOperations(carthageOperations, waitUntilFinished: true) githubLicenses = carthageOperations.map { $0.result?.value }.flatMap { $0 }
  • 26. Parallel processing by using `(NS)Operation` Collect Carthage licenses let queue = OperationQueue() let carthageOperations = githubLibraries.map { GitHubLicense.download($0) } queue.addOperations(carthageOperations, waitUntilFinished: true) githubLicenses = carthageOperations.map { $0.result?.value }.flatMap { $0 }
  • 27. Parallel processing by using `(NS)Operation` Collect Carthage licenses let queue = OperationQueue() let carthageOperations = githubLibraries.map { GitHubLicense.download($0) } queue.addOperations(carthageOperations, waitUntilFinished: true) githubLicenses = carthageOperations.map { $0.result?.value }.flatMap { $0 } About 5 times faster$
  • 28. Parallel processing by using `(NS)Operation` Collect Carthage licenses let queue = OperationQueue() let carthageOperations = githubLibraries.map { GitHubLicense.download($0) } queue.addOperations(carthageOperations, waitUntilFinished: true) githubLicenses = carthageOperations.map { $0.result?.value }.flatMap { $0 } About 5 times faster$ https://github.com/mono0926/LicensePlist/blob/36573fdc5933384534908acf32a642e81c2d9cbc/Sources/LicensePlistCore/ResultOperation.swift Wrapped Operation class→
  • 29. Generate plist files let rootItems: [[String: String]] = … let root = try! PropertyListSerialization.data(fromPropertyList: ["PreferenceSpecifiers": rootItems], format: .xml, options: 0) try! root.write(to: rootPath) Generating plist files is easy by using `PropertyListSerialization`
  • 30. Generate plist files let rootItems: [[String: String]] = … let root = try! PropertyListSerialization.data(fromPropertyList: ["PreferenceSpecifiers": rootItems], format: .xml, options: 0) try! root.write(to: rootPath) • PropertyListSerialization - Foundation | Apple Developer Documentation • Property List Programming Guide - Apple Developer • Implementing an iOS Settings Bundle Generating plist files is easy by using `PropertyListSerialization`
  • 32. Install Homebrew • `brew install mono0926/license-plist/license-plist` • Swift Package Manager(SwiftPM) Homebrew From Releases From Source • `make install` CocoaPods (Not yet supported) • Support CocoaPods distribution · Issue #52 by @ikesyo
  • 34. Links How to create command-line tool made of SwiftPM. • Building a command line tool using the Swift Package Manager • Swift Package Manager (SwiftPM) - Qiita • Swift Package Manager(SwiftPM) Homebrew - Qiita How to get started with OSS(open source software). • Swift - Qiita • iOS OSS Developers.IO • How to Get Started with Open Source – Hacker Noon