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

How VXLAN works on Linux
How VXLAN works on LinuxHow VXLAN works on Linux
How VXLAN works on Linux
Etsuji Nakai
 

What's hot (20)

Airflow based Video Encoding Platform
Airflow based Video Encoding PlatformAirflow based Video Encoding Platform
Airflow based Video Encoding Platform
 
MySQL・PostgreSQLだけで作る高速あいまい全文検索システム
MySQL・PostgreSQLだけで作る高速あいまい全文検索システムMySQL・PostgreSQLだけで作る高速あいまい全文検索システム
MySQL・PostgreSQLだけで作る高速あいまい全文検索システム
 
LLVM Register Allocation
LLVM Register AllocationLLVM Register Allocation
LLVM Register Allocation
 
Deploy MySQL e Performance Tuning - 3º Zabbix Meetup do Interior
Deploy MySQL e Performance Tuning - 3º Zabbix Meetup do InteriorDeploy MySQL e Performance Tuning - 3º Zabbix Meetup do Interior
Deploy MySQL e Performance Tuning - 3º Zabbix Meetup do Interior
 
他山の石勉強会 DRBD編
他山の石勉強会 DRBD編他山の石勉強会 DRBD編
他山の石勉強会 DRBD編
 
Zabbix で Mastodon を監視する Sidekiq / Redis を中心に Mastodon 健康診断
Zabbix で Mastodon を監視する Sidekiq / Redis を中心に Mastodon 健康診断Zabbix で Mastodon を監視する Sidekiq / Redis を中心に Mastodon 健康診断
Zabbix で Mastodon を監視する Sidekiq / Redis を中心に Mastodon 健康診断
 
Pythonでパケット解析
Pythonでパケット解析Pythonでパケット解析
Pythonでパケット解析
 
実践 Git - 低レベルに知る Git
実践 Git - 低レベルに知る Git実践 Git - 低レベルに知る Git
実践 Git - 低レベルに知る Git
 
Vacuum徹底解説
Vacuum徹底解説Vacuum徹底解説
Vacuum徹底解説
 
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
 
大規模データ処理の定番OSS Hadoop / Spark 最新動向 - 2021秋 -(db tech showcase 2021 / ONLINE 発...
大規模データ処理の定番OSS Hadoop / Spark 最新動向 - 2021秋 -(db tech showcase 2021 / ONLINE 発...大規模データ処理の定番OSS Hadoop / Spark 最新動向 - 2021秋 -(db tech showcase 2021 / ONLINE 発...
大規模データ処理の定番OSS Hadoop / Spark 最新動向 - 2021秋 -(db tech showcase 2021 / ONLINE 発...
 
pg_trgmと全文検索
pg_trgmと全文検索pg_trgmと全文検索
pg_trgmと全文検索
 
OSS活動の活発さと評価の関係について
OSS活動の活発さと評価の関係についてOSS活動の活発さと評価の関係について
OSS活動の活発さと評価の関係について
 
How VXLAN works on Linux
How VXLAN works on LinuxHow VXLAN works on Linux
How VXLAN works on Linux
 
Models for hierarchical data
Models for hierarchical dataModels for hierarchical data
Models for hierarchical data
 
Apache Kafka on Herokuを活用したイベント駆動アーキテクチャの設計と実装
Apache Kafka on Herokuを活用したイベント駆動アーキテクチャの設計と実装Apache Kafka on Herokuを活用したイベント駆動アーキテクチャの設計と実装
Apache Kafka on Herokuを活用したイベント駆動アーキテクチャの設計と実装
 
コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線
 
無料で仮想Junos環境を手元に作ろう
無料で仮想Junos環境を手元に作ろう無料で仮想Junos環境を手元に作ろう
無料で仮想Junos環境を手元に作ろう
 
NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)
NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)
NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)
 
BETTER TOGETHER 〜VMware NSXとJuniperデバイスを繋いでみよう!〜
BETTER TOGETHER 〜VMware NSXとJuniperデバイスを繋いでみよう!〜BETTER TOGETHER 〜VMware NSXとJuniperデバイスを繋いでみよう!〜
BETTER TOGETHER 〜VMware NSXとJuniperデバイスを繋いでみよう!〜
 

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

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
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

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
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid Environments
 
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...
 
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
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
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
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in Uganda
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next IntegrationWSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
 

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