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

UVM_TB_20220621_slides-1.pdf
UVM_TB_20220621_slides-1.pdfUVM_TB_20220621_slides-1.pdf
UVM_TB_20220621_slides-1.pdf
SamHoney6
 
大家來學GObject
大家來學GObject大家來學GObject
大家來學GObject
Shu-Yu Fu
 
Verification Automation Using IPXACT
Verification Automation Using IPXACTVerification Automation Using IPXACT
Verification Automation Using IPXACT
DVClub
 
5 stream ciphers
5 stream ciphers5 stream ciphers
5 stream ciphers
Harish Sahu
 

What's hot (20)

UVM_TB_20220621_slides-1.pdf
UVM_TB_20220621_slides-1.pdfUVM_TB_20220621_slides-1.pdf
UVM_TB_20220621_slides-1.pdf
 
How to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratchHow to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratch
 
Early Software Development through Palladium Emulation
Early Software Development through Palladium EmulationEarly Software Development through Palladium Emulation
Early Software Development through Palladium Emulation
 
Dpdk pmd
Dpdk pmdDpdk pmd
Dpdk pmd
 
大家來學GObject
大家來學GObject大家來學GObject
大家來學GObject
 
Redis introduction
Redis introductionRedis introduction
Redis introduction
 
Getting started with RISC-V verification what's next after compliance testing
Getting started with RISC-V verification what's next after compliance testingGetting started with RISC-V verification what's next after compliance testing
Getting started with RISC-V verification what's next after compliance testing
 
Introduction to redis
Introduction to redisIntroduction to redis
Introduction to redis
 
Verification Automation Using IPXACT
Verification Automation Using IPXACTVerification Automation Using IPXACT
Verification Automation Using IPXACT
 
Taylor Wicksell and Tom Gianos at SpringOne Platform 2019
Taylor Wicksell and Tom Gianos at SpringOne Platform 2019Taylor Wicksell and Tom Gianos at SpringOne Platform 2019
Taylor Wicksell and Tom Gianos at SpringOne Platform 2019
 
Intel dpdk Tutorial
Intel dpdk TutorialIntel dpdk Tutorial
Intel dpdk Tutorial
 
Linux-Internals-and-Networking
Linux-Internals-and-NetworkingLinux-Internals-and-Networking
Linux-Internals-and-Networking
 
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server PushReal Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
 
Persistent Storage with Containers with Kubernetes & OpenShift
Persistent Storage with Containers with Kubernetes & OpenShiftPersistent Storage with Containers with Kubernetes & OpenShift
Persistent Storage with Containers with Kubernetes & OpenShift
 
Kernel load-balancing for Docker containers using IPVS
Kernel load-balancing for Docker containers using IPVSKernel load-balancing for Docker containers using IPVS
Kernel load-balancing for Docker containers using IPVS
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
eBPF maps 101
eBPF maps 101eBPF maps 101
eBPF maps 101
 
5 stream ciphers
5 stream ciphers5 stream ciphers
5 stream ciphers
 
Open ebs 101
Open ebs 101Open ebs 101
Open ebs 101
 
Windows kernel basic exploit
Windows kernel basic exploitWindows kernel basic exploit
Windows kernel basic exploit
 

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
 
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
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
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
 

Recently uploaded (20)

%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%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
 
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
 
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
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
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
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%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 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
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%+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...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 

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