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

Amazon Cognito使って認証したい?それならSpring Security使いましょう!
Amazon Cognito使って認証したい?それならSpring Security使いましょう!Amazon Cognito使って認証したい?それならSpring Security使いましょう!
Amazon Cognito使って認証したい?それならSpring Security使いましょう!
Ryosuke Uchitate
 
Metasploitでペネトレーションテスト
MetasploitでペネトレーションテストMetasploitでペネトレーションテスト
Metasploitでペネトレーションテスト
super_a1ice
 

What's hot (20)

Amazon Cognito使って認証したい?それならSpring Security使いましょう!
Amazon Cognito使って認証したい?それならSpring Security使いましょう!Amazon Cognito使って認証したい?それならSpring Security使いましょう!
Amazon Cognito使って認証したい?それならSpring Security使いましょう!
 
分散トレーシング技術について(Open tracingやjaeger)
分散トレーシング技術について(Open tracingやjaeger)分散トレーシング技術について(Open tracingやjaeger)
分散トレーシング技術について(Open tracingやjaeger)
 
チームメイトのためにdocstringを書こう! pyconjp2019
チームメイトのためにdocstringを書こう! pyconjp2019チームメイトのためにdocstringを書こう! pyconjp2019
チームメイトのためにdocstringを書こう! pyconjp2019
 
.NET 7 での ASP.NET Core Blazor の新機能ピックアップ
.NET 7 での ASP.NET Core Blazor の新機能ピックアップ.NET 7 での ASP.NET Core Blazor の新機能ピックアップ
.NET 7 での ASP.NET Core Blazor の新機能ピックアップ
 
ちいさなオブジェクトでドメインモデルを組み立てる
ちいさなオブジェクトでドメインモデルを組み立てるちいさなオブジェクトでドメインモデルを組み立てる
ちいさなオブジェクトでドメインモデルを組み立てる
 
Keycloakの実際・翻訳プロジェクト紹介
Keycloakの実際・翻訳プロジェクト紹介Keycloakの実際・翻訳プロジェクト紹介
Keycloakの実際・翻訳プロジェクト紹介
 
MongoDBが遅いときの切り分け方法
MongoDBが遅いときの切り分け方法MongoDBが遅いときの切り分け方法
MongoDBが遅いときの切り分け方法
 
OpenAI の音声認識 AI「Whisper」をテストしてみた
OpenAI の音声認識 AI「Whisper」をテストしてみたOpenAI の音声認識 AI「Whisper」をテストしてみた
OpenAI の音声認識 AI「Whisper」をテストしてみた
 
[AC05] マイクロサービスは分割がキモ!基幹システムのためのドメイン駆動設計
[AC05] マイクロサービスは分割がキモ!基幹システムのためのドメイン駆動設計[AC05] マイクロサービスは分割がキモ!基幹システムのためのドメイン駆動設計
[AC05] マイクロサービスは分割がキモ!基幹システムのためのドメイン駆動設計
 
Azure API Management 俺的マニュアル
Azure API Management 俺的マニュアルAzure API Management 俺的マニュアル
Azure API Management 俺的マニュアル
 
速習!論理レプリケーション ~基礎から最新動向まで~(PostgreSQL Conference Japan 2022 発表資料)
速習!論理レプリケーション ~基礎から最新動向まで~(PostgreSQL Conference Japan 2022 発表資料)速習!論理レプリケーション ~基礎から最新動向まで~(PostgreSQL Conference Japan 2022 発表資料)
速習!論理レプリケーション ~基礎から最新動向まで~(PostgreSQL Conference Japan 2022 発表資料)
 
1891件以上のカーネルの不具合修正に貢献した再現用プログラムを自動生成するsyzkallerのテスト自動化技術(NTT Tech Conference ...
1891件以上のカーネルの不具合修正に貢献した再現用プログラムを自動生成するsyzkallerのテスト自動化技術(NTT Tech Conference ...1891件以上のカーネルの不具合修正に貢献した再現用プログラムを自動生成するsyzkallerのテスト自動化技術(NTT Tech Conference ...
1891件以上のカーネルの不具合修正に貢献した再現用プログラムを自動生成するsyzkallerのテスト自動化技術(NTT Tech Conference ...
 
Sql Antipatterns Strike Back
Sql Antipatterns Strike BackSql Antipatterns Strike Back
Sql Antipatterns Strike Back
 
Samba4を「ふつうに」使おう!(2015/08/08 OSC 2015 Kansai@Kyoto)
Samba4を「ふつうに」使おう!(2015/08/08 OSC 2015 Kansai@Kyoto)Samba4を「ふつうに」使おう!(2015/08/08 OSC 2015 Kansai@Kyoto)
Samba4を「ふつうに」使おう!(2015/08/08 OSC 2015 Kansai@Kyoto)
 
Elmで始めるFunctional Reactive Programming
Elmで始めるFunctional Reactive Programming Elmで始めるFunctional Reactive Programming
Elmで始めるFunctional Reactive Programming
 
ContainerとName Space Isolation
ContainerとName Space IsolationContainerとName Space Isolation
ContainerとName Space Isolation
 
Git flowについてまとめてみた
Git flowについてまとめてみたGit flowについてまとめてみた
Git flowについてまとめてみた
 
Rustに触れて私のPythonはどう変わったか
Rustに触れて私のPythonはどう変わったかRustに触れて私のPythonはどう変わったか
Rustに触れて私のPythonはどう変わったか
 
組織にテストを書く文化を根付かせる戦略と戦術
組織にテストを書く文化を根付かせる戦略と戦術組織にテストを書く文化を根付かせる戦略と戦術
組織にテストを書く文化を根付かせる戦略と戦術
 
Metasploitでペネトレーションテスト
MetasploitでペネトレーションテストMetasploitでペネトレーションテスト
Metasploitでペネトレーションテスト
 

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

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
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

%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
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
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
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%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
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
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
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 

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