SlideShare une entreprise Scribd logo
1  sur  56
Télécharger pour lire hors ligne


㊗

😘
import PackageDescription
let package = Package(
name: "SwiftPM",
dependencies: [
.Package(
url: "https://github.com/ikesyo/Himotoki",
majorVersion: 3, minor: 1
)
]
)
// 少し長くなるので
// 次ページ以降のスライドでコードを紹介
import Foundation
let environment = ProcessInfo.processInfo.environment
let buildRoot = environment["BUILD_ROOT"]!
let configuration = environment["CONFIGURATION"]!
let configurationBuildDir = environment["CONFIGURATION_BUILD_DIR"]!
Process.launchedProcess(launchPath: "/usr/bin/swift", arguments:
["package", "--build-path", buildRoot, "resolve"]).waitUntilExit()
Process.launchedProcess(launchPath: "/usr/bin/swift", arguments:
["build", "--build-path", buildRoot, "-c",
configuration.lowercased()]).waitUntilExit()
for buildPath in try! FileManager.default
.contentsOfDirectory(atPath: configurationBuildDir)
where buildPath.hasSuffix(".build") {
// ここでパッケージ単位で、
// バイナリファイルをライブラリ化する
//
// 次のスライドのコードを参照
}
let packageName = buildPath.dropLast(".build".count)
let packageBuildDir = "(configurationBuildDir)/(buildPath)"
let libraryName = "(configurationBuildDir)/lib(packageName).a"
let objects = try! FileManager.default
.contentsOfDirectory(atPath: packageBuildDir)
.filter { $0.hasSuffix(".o") }
let process = Process()
process.currentDirectoryPath = packageBuildDir
process.launchPath = "/usr/bin/libtool"
process.arguments = ["-o", libraryName] + objects
process.launch()
process.waitUntilExit()



🤤
🌻


mkdir SwiftPM-Modules
cd SwiftPM-Modules
swift package init
let package = Package(
name: "SwiftPM-Modules",
products: [
.library(
name: "SwiftPM-Modules", targets: ["SwiftPM-Modules"])],
dependencies: [
.package(url: "https://github.com/ikesyo/Himotoki", from: "3.1.0")
],
targets: [
.target(name: "SwiftPM-Modules", dependencies: ["Himotoki"] ),
],
swift package generate-xcodeproj


🌻
macOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswift

Contenu connexe

Tendances

YOU CAN DO ANYTHING 1
YOU CAN DO ANYTHING 1YOU CAN DO ANYTHING 1
YOU CAN DO ANYTHING 1shortstp73
 
How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
 How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOSKentaro Hatori
 
F2e security
F2e securityF2e security
F2e securityjay li
 
Introduction to FreeBSD commands(beta)
Introduction to FreeBSD commands(beta)Introduction to FreeBSD commands(beta)
Introduction to FreeBSD commands(beta)郁凱 黃
 
Tech talk Introduction to containers
Tech talk Introduction to containersTech talk Introduction to containers
Tech talk Introduction to containersViliamPucik
 
Setting up iSCSI Providers and Clients in openSUSE
Setting up iSCSI Providers and Clients in openSUSESetting up iSCSI Providers and Clients in openSUSE
Setting up iSCSI Providers and Clients in openSUSELeeDuncan16
 
Booting directly opensuse iso file by grub2 @ openSUSE Asia Summit2015
Booting directly opensuse iso file by grub2 @ openSUSE Asia Summit2015Booting directly opensuse iso file by grub2 @ openSUSE Asia Summit2015
Booting directly opensuse iso file by grub2 @ openSUSE Asia Summit2015Kentaro Hatori
 
Tutorial to make sure of nginx files starterpack.
Tutorial to make sure of nginx files starterpack.Tutorial to make sure of nginx files starterpack.
Tutorial to make sure of nginx files starterpack.Takashi Yoshioka
 
Introduction to Pelican
Introduction to PelicanIntroduction to Pelican
Introduction to PelicanChengjen Lee
 
Openstack kilo installation using rdo
Openstack kilo installation using rdoOpenstack kilo installation using rdo
Openstack kilo installation using rdoNarasimha sreeram
 
Openstack installation using rdo
Openstack installation using rdoOpenstack installation using rdo
Openstack installation using rdoNarasimha sreeram
 
Proxy server ubuntu 12.04
Proxy server ubuntu 12.04Proxy server ubuntu 12.04
Proxy server ubuntu 12.04Tio Aldiansyah
 
Environments line-up! Vagrant & Puppet 101
Environments line-up! Vagrant & Puppet 101Environments line-up! Vagrant & Puppet 101
Environments line-up! Vagrant & Puppet 101jelrikvh
 
It’s about time to embrace Node.js Streams - Austin Node.js meetup
It’s about time to embrace Node.js Streams - Austin Node.js meetupIt’s about time to embrace Node.js Streams - Austin Node.js meetup
It’s about time to embrace Node.js Streams - Austin Node.js meetupLuciano Mammino
 
Ubuntu Cheat Sheet
Ubuntu Cheat SheetUbuntu Cheat Sheet
Ubuntu Cheat SheetServerless
 

Tendances (19)

YOU CAN DO ANYTHING 1
YOU CAN DO ANYTHING 1YOU CAN DO ANYTHING 1
YOU CAN DO ANYTHING 1
 
How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
 How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
 
F2e security
F2e securityF2e security
F2e security
 
Introduction to FreeBSD commands(beta)
Introduction to FreeBSD commands(beta)Introduction to FreeBSD commands(beta)
Introduction to FreeBSD commands(beta)
 
Tech talk Introduction to containers
Tech talk Introduction to containersTech talk Introduction to containers
Tech talk Introduction to containers
 
Setting up iSCSI Providers and Clients in openSUSE
Setting up iSCSI Providers and Clients in openSUSESetting up iSCSI Providers and Clients in openSUSE
Setting up iSCSI Providers and Clients in openSUSE
 
Booting directly opensuse iso file by grub2 @ openSUSE Asia Summit2015
Booting directly opensuse iso file by grub2 @ openSUSE Asia Summit2015Booting directly opensuse iso file by grub2 @ openSUSE Asia Summit2015
Booting directly opensuse iso file by grub2 @ openSUSE Asia Summit2015
 
Tutorial to make sure of nginx files starterpack.
Tutorial to make sure of nginx files starterpack.Tutorial to make sure of nginx files starterpack.
Tutorial to make sure of nginx files starterpack.
 
Introduction to Pelican
Introduction to PelicanIntroduction to Pelican
Introduction to Pelican
 
AutoYast
AutoYastAutoYast
AutoYast
 
Openstack kilo installation using rdo
Openstack kilo installation using rdoOpenstack kilo installation using rdo
Openstack kilo installation using rdo
 
Openstack installation using rdo
Openstack installation using rdoOpenstack installation using rdo
Openstack installation using rdo
 
Proxy server ubuntu 12.04
Proxy server ubuntu 12.04Proxy server ubuntu 12.04
Proxy server ubuntu 12.04
 
Environments line-up! Vagrant & Puppet 101
Environments line-up! Vagrant & Puppet 101Environments line-up! Vagrant & Puppet 101
Environments line-up! Vagrant & Puppet 101
 
It’s about time to embrace Node.js Streams - Austin Node.js meetup
It’s about time to embrace Node.js Streams - Austin Node.js meetupIt’s about time to embrace Node.js Streams - Austin Node.js meetup
It’s about time to embrace Node.js Streams - Austin Node.js meetup
 
Ubuntu Cheat Sheet
Ubuntu Cheat SheetUbuntu Cheat Sheet
Ubuntu Cheat Sheet
 
Ftp configuration
Ftp configurationFtp configuration
Ftp configuration
 
Mini-Training: Docker
Mini-Training: DockerMini-Training: Docker
Mini-Training: Docker
 
Mule ESB : ssh connector
Mule ESB : ssh connectorMule ESB : ssh connector
Mule ESB : ssh connector
 

Similaire à macOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswift

Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkMichael Peacock
 
EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS...
EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS...EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS...
EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS...Vinícius Zavam
 
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 2014biicode
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis OverviewLeo Lorieri
 
WordPress mit Composer und Git verwalten
WordPress mit Composer und Git verwaltenWordPress mit Composer und Git verwalten
WordPress mit Composer und Git verwaltenWalter Ebert
 
How to host an app for $20 in 20min using buildout and hostout
How to host an app  for $20 in 20min using buildout and hostoutHow to host an app  for $20 in 20min using buildout and hostout
How to host an app for $20 in 20min using buildout and hostoutDylan Jay
 
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSHTame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSHDavid Stockton
 
Node.js in action
Node.js in actionNode.js in action
Node.js in actionSimon Su
 
Effective Python Package Management [PyCon Canada 2017]
Effective Python Package Management [PyCon Canada 2017]Effective Python Package Management [PyCon Canada 2017]
Effective Python Package Management [PyCon Canada 2017]Devon Bernard
 
20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasaggarrett honeycutt
 
Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)LumoSpark
 
DevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungDevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungKAI CHU CHUNG
 
An Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemAn Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemLinaro
 
Globus toolkit4installationguide
Globus toolkit4installationguideGlobus toolkit4installationguide
Globus toolkit4installationguideAdarsh Patil
 
Provisioning with Puppet
Provisioning with PuppetProvisioning with Puppet
Provisioning with PuppetJoe Ray
 
A re introduction to webpack - reactfoo - mumbai
A re introduction to webpack - reactfoo - mumbaiA re introduction to webpack - reactfoo - mumbai
A re introduction to webpack - reactfoo - mumbaiPraveen Puglia
 
Denys Serhiienko "ASGI in depth"
Denys Serhiienko "ASGI in depth"Denys Serhiienko "ASGI in depth"
Denys Serhiienko "ASGI in depth"Fwdays
 
installation of hadoop on ubuntu.pptx
installation of hadoop on ubuntu.pptxinstallation of hadoop on ubuntu.pptx
installation of hadoop on ubuntu.pptxvishal choudhary
 
Dexterity in 15 minutes or less
Dexterity in 15 minutes or lessDexterity in 15 minutes or less
Dexterity in 15 minutes or lessrijk.stofberg
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMAlexander Shopov
 

Similaire à macOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswift (20)

Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech Talk
 
EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS...
EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS...EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS...
EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS...
 
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
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
WordPress mit Composer und Git verwalten
WordPress mit Composer und Git verwaltenWordPress mit Composer und Git verwalten
WordPress mit Composer und Git verwalten
 
How to host an app for $20 in 20min using buildout and hostout
How to host an app  for $20 in 20min using buildout and hostoutHow to host an app  for $20 in 20min using buildout and hostout
How to host an app for $20 in 20min using buildout and hostout
 
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSHTame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
 
Node.js in action
Node.js in actionNode.js in action
Node.js in action
 
Effective Python Package Management [PyCon Canada 2017]
Effective Python Package Management [PyCon Canada 2017]Effective Python Package Management [PyCon Canada 2017]
Effective Python Package Management [PyCon Canada 2017]
 
20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag
 
Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)Web development automatisation for fun and profit (Artem Daniliants)
Web development automatisation for fun and profit (Artem Daniliants)
 
DevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungDevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChung
 
An Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemAn Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating System
 
Globus toolkit4installationguide
Globus toolkit4installationguideGlobus toolkit4installationguide
Globus toolkit4installationguide
 
Provisioning with Puppet
Provisioning with PuppetProvisioning with Puppet
Provisioning with Puppet
 
A re introduction to webpack - reactfoo - mumbai
A re introduction to webpack - reactfoo - mumbaiA re introduction to webpack - reactfoo - mumbai
A re introduction to webpack - reactfoo - mumbai
 
Denys Serhiienko "ASGI in depth"
Denys Serhiienko "ASGI in depth"Denys Serhiienko "ASGI in depth"
Denys Serhiienko "ASGI in depth"
 
installation of hadoop on ubuntu.pptx
installation of hadoop on ubuntu.pptxinstallation of hadoop on ubuntu.pptx
installation of hadoop on ubuntu.pptx
 
Dexterity in 15 minutes or less
Dexterity in 15 minutes or lessDexterity in 15 minutes or less
Dexterity in 15 minutes or less
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPM
 

Plus de Tomohiro Kumagai

最近気づいた勉強法 — 勉強会開催の習慣化 #yumemi_grow
最近気づいた勉強法 — 勉強会開催の習慣化 #yumemi_grow最近気づいた勉強法 — 勉強会開催の習慣化 #yumemi_grow
最近気づいた勉強法 — 勉強会開催の習慣化 #yumemi_growTomohiro Kumagai
 
Swift 所有権 要諦 #ゆるちとせ
Swift 所有権 要諦 #ゆるちとせSwift 所有権 要諦 #ゆるちとせ
Swift 所有権 要諦 #ゆるちとせTomohiro Kumagai
 
_Function Builders in Swift #love_swift
_Function Builders in Swift #love_swift_Function Builders in Swift #love_swift
_Function Builders in Swift #love_swiftTomohiro Kumagai
 
Property Wrappers の特徴を眺める #swiftzoomin
Property Wrappers の特徴を眺める #swiftzoominProperty Wrappers の特徴を眺める #swiftzoomin
Property Wrappers の特徴を眺める #swiftzoominTomohiro Kumagai
 
みんなで Swift 復習会 GO! in "Swift Days Fukuoka" – 12nd′ オープニング&資料
みんなで Swift 復習会 GO! in "Swift Days Fukuoka" – 12nd′ オープニング&資料みんなで Swift 復習会 GO! in "Swift Days Fukuoka" – 12nd′ オープニング&資料
みんなで Swift 復習会 GO! in "Swift Days Fukuoka" – 12nd′ オープニング&資料Tomohiro Kumagai
 
みんなで Swift 復習会
GO! in 札幌 – 10th′′
みんなで Swift 復習会
GO! in 札幌 – 10th′′みんなで Swift 復習会
GO! in 札幌 – 10th′′
みんなで Swift 復習会
GO! in 札幌 – 10th′′Tomohiro Kumagai
 
イニシャライザー Part 2.5 #hakataswift
イニシャライザー Part 2.5 #hakataswiftイニシャライザー Part 2.5 #hakataswift
イニシャライザー Part 2.5 #hakataswiftTomohiro Kumagai
 
ニコニコ超会議・文化の交差点 #techpub #ニコニコ超会議 #さくらシンデレラ
ニコニコ超会議・文化の交差点 #techpub #ニコニコ超会議 #さくらシンデレラニコニコ超会議・文化の交差点 #techpub #ニコニコ超会議 #さくらシンデレラ
ニコニコ超会議・文化の交差点 #techpub #ニコニコ超会議 #さくらシンデレラTomohiro Kumagai
 
Swift クラスのイニシャライザー #devsap
Swift クラスのイニシャライザー #devsapSwift クラスのイニシャライザー #devsap
Swift クラスのイニシャライザー #devsapTomohiro Kumagai
 
iOSCon 2019 in London #ioscon #love_swift
iOSCon 2019 in London #ioscon #love_swiftiOSCon 2019 in London #ioscon #love_swift
iOSCon 2019 in London #ioscon #love_swiftTomohiro Kumagai
 
Around the 変数 let #love_swift
Around the 変数 let #love_swiftAround the 変数 let #love_swift
Around the 変数 let #love_swiftTomohiro Kumagai
 
もくもく執筆会 #技術同人誌再販Night
もくもく執筆会 #技術同人誌再販Nightもくもく執筆会 #技術同人誌再販Night
もくもく執筆会 #技術同人誌再販NightTomohiro Kumagai
 
みんなで Swift 復習会 GO! in 岩手 – 9th′
みんなで Swift 復習会 GO! in 岩手 – 9th′みんなで Swift 復習会 GO! in 岩手 – 9th′
みんなで Swift 復習会 GO! in 岩手 – 9th′Tomohiro Kumagai
 
みんなで Swift 復習会 GO! in 福岡 – 8th′ #minna_de_swift
みんなで Swift 復習会 GO! in 福岡 – 8th′ #minna_de_swiftみんなで Swift 復習会 GO! in 福岡 – 8th′ #minna_de_swift
みんなで Swift 復習会 GO! in 福岡 – 8th′ #minna_de_swiftTomohiro Kumagai
 
Getting Started with Attending iOSCon in London 高画質・追記版 #love_swift #ioscon
Getting Started with Attending iOSCon in London 高画質・追記版 #love_swift #iosconGetting Started with Attending iOSCon in London 高画質・追記版 #love_swift #ioscon
Getting Started with Attending iOSCon in London 高画質・追記版 #love_swift #iosconTomohiro Kumagai
 
みんなで Swift 復習会
GO! in 京都 – 6th′
みんなで Swift 復習会
GO! in 京都 – 6th′みんなで Swift 復習会
GO! in 京都 – 6th′
みんなで Swift 復習会
GO! in 京都 – 6th′Tomohiro Kumagai
 
みんなで Swift 復習会 GO! in 福岡 – 5th′
みんなで Swift 復習会 GO! in 福岡 – 5th′みんなで Swift 復習会 GO! in 福岡 – 5th′
みんなで Swift 復習会 GO! in 福岡 – 5th′Tomohiro Kumagai
 
勉強会の東京外開催の気持ち #yuru_bounen2017
勉強会の東京外開催の気持ち #yuru_bounen2017勉強会の東京外開催の気持ち #yuru_bounen2017
勉強会の東京外開催の気持ち #yuru_bounen2017Tomohiro Kumagai
 
みんなで Swift 復習会 GO! in 福岡・発表資料
みんなで Swift 復習会 GO! in 福岡・発表資料みんなで Swift 復習会 GO! in 福岡・発表資料
みんなで Swift 復習会 GO! in 福岡・発表資料Tomohiro Kumagai
 
Protocol-Oriented Integers に想うジェネリックプログラミングの未来
Protocol-Oriented Integers に想うジェネリックプログラミングの未来Protocol-Oriented Integers に想うジェネリックプログラミングの未来
Protocol-Oriented Integers に想うジェネリックプログラミングの未来Tomohiro Kumagai
 

Plus de Tomohiro Kumagai (20)

最近気づいた勉強法 — 勉強会開催の習慣化 #yumemi_grow
最近気づいた勉強法 — 勉強会開催の習慣化 #yumemi_grow最近気づいた勉強法 — 勉強会開催の習慣化 #yumemi_grow
最近気づいた勉強法 — 勉強会開催の習慣化 #yumemi_grow
 
Swift 所有権 要諦 #ゆるちとせ
Swift 所有権 要諦 #ゆるちとせSwift 所有権 要諦 #ゆるちとせ
Swift 所有権 要諦 #ゆるちとせ
 
_Function Builders in Swift #love_swift
_Function Builders in Swift #love_swift_Function Builders in Swift #love_swift
_Function Builders in Swift #love_swift
 
Property Wrappers の特徴を眺める #swiftzoomin
Property Wrappers の特徴を眺める #swiftzoominProperty Wrappers の特徴を眺める #swiftzoomin
Property Wrappers の特徴を眺める #swiftzoomin
 
みんなで Swift 復習会 GO! in "Swift Days Fukuoka" – 12nd′ オープニング&資料
みんなで Swift 復習会 GO! in "Swift Days Fukuoka" – 12nd′ オープニング&資料みんなで Swift 復習会 GO! in "Swift Days Fukuoka" – 12nd′ オープニング&資料
みんなで Swift 復習会 GO! in "Swift Days Fukuoka" – 12nd′ オープニング&資料
 
みんなで Swift 復習会
GO! in 札幌 – 10th′′
みんなで Swift 復習会
GO! in 札幌 – 10th′′みんなで Swift 復習会
GO! in 札幌 – 10th′′
みんなで Swift 復習会
GO! in 札幌 – 10th′′
 
イニシャライザー Part 2.5 #hakataswift
イニシャライザー Part 2.5 #hakataswiftイニシャライザー Part 2.5 #hakataswift
イニシャライザー Part 2.5 #hakataswift
 
ニコニコ超会議・文化の交差点 #techpub #ニコニコ超会議 #さくらシンデレラ
ニコニコ超会議・文化の交差点 #techpub #ニコニコ超会議 #さくらシンデレラニコニコ超会議・文化の交差点 #techpub #ニコニコ超会議 #さくらシンデレラ
ニコニコ超会議・文化の交差点 #techpub #ニコニコ超会議 #さくらシンデレラ
 
Swift クラスのイニシャライザー #devsap
Swift クラスのイニシャライザー #devsapSwift クラスのイニシャライザー #devsap
Swift クラスのイニシャライザー #devsap
 
iOSCon 2019 in London #ioscon #love_swift
iOSCon 2019 in London #ioscon #love_swiftiOSCon 2019 in London #ioscon #love_swift
iOSCon 2019 in London #ioscon #love_swift
 
Around the 変数 let #love_swift
Around the 変数 let #love_swiftAround the 変数 let #love_swift
Around the 変数 let #love_swift
 
もくもく執筆会 #技術同人誌再販Night
もくもく執筆会 #技術同人誌再販Nightもくもく執筆会 #技術同人誌再販Night
もくもく執筆会 #技術同人誌再販Night
 
みんなで Swift 復習会 GO! in 岩手 – 9th′
みんなで Swift 復習会 GO! in 岩手 – 9th′みんなで Swift 復習会 GO! in 岩手 – 9th′
みんなで Swift 復習会 GO! in 岩手 – 9th′
 
みんなで Swift 復習会 GO! in 福岡 – 8th′ #minna_de_swift
みんなで Swift 復習会 GO! in 福岡 – 8th′ #minna_de_swiftみんなで Swift 復習会 GO! in 福岡 – 8th′ #minna_de_swift
みんなで Swift 復習会 GO! in 福岡 – 8th′ #minna_de_swift
 
Getting Started with Attending iOSCon in London 高画質・追記版 #love_swift #ioscon
Getting Started with Attending iOSCon in London 高画質・追記版 #love_swift #iosconGetting Started with Attending iOSCon in London 高画質・追記版 #love_swift #ioscon
Getting Started with Attending iOSCon in London 高画質・追記版 #love_swift #ioscon
 
みんなで Swift 復習会
GO! in 京都 – 6th′
みんなで Swift 復習会
GO! in 京都 – 6th′みんなで Swift 復習会
GO! in 京都 – 6th′
みんなで Swift 復習会
GO! in 京都 – 6th′
 
みんなで Swift 復習会 GO! in 福岡 – 5th′
みんなで Swift 復習会 GO! in 福岡 – 5th′みんなで Swift 復習会 GO! in 福岡 – 5th′
みんなで Swift 復習会 GO! in 福岡 – 5th′
 
勉強会の東京外開催の気持ち #yuru_bounen2017
勉強会の東京外開催の気持ち #yuru_bounen2017勉強会の東京外開催の気持ち #yuru_bounen2017
勉強会の東京外開催の気持ち #yuru_bounen2017
 
みんなで Swift 復習会 GO! in 福岡・発表資料
みんなで Swift 復習会 GO! in 福岡・発表資料みんなで Swift 復習会 GO! in 福岡・発表資料
みんなで Swift 復習会 GO! in 福岡・発表資料
 
Protocol-Oriented Integers に想うジェネリックプログラミングの未来
Protocol-Oriented Integers に想うジェネリックプログラミングの未来Protocol-Oriented Integers に想うジェネリックプログラミングの未来
Protocol-Oriented Integers に想うジェネリックプログラミングの未来
 

Dernier

JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 

Dernier (20)

JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 

macOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswift

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. 😘
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. import PackageDescription let package = Package( name: "SwiftPM", dependencies: [ .Package( url: "https://github.com/ikesyo/Himotoki", majorVersion: 3, minor: 1 ) ] )
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 34. import Foundation let environment = ProcessInfo.processInfo.environment let buildRoot = environment["BUILD_ROOT"]! let configuration = environment["CONFIGURATION"]! let configurationBuildDir = environment["CONFIGURATION_BUILD_DIR"]!
  • 35. Process.launchedProcess(launchPath: "/usr/bin/swift", arguments: ["package", "--build-path", buildRoot, "resolve"]).waitUntilExit() Process.launchedProcess(launchPath: "/usr/bin/swift", arguments: ["build", "--build-path", buildRoot, "-c", configuration.lowercased()]).waitUntilExit()
  • 36. for buildPath in try! FileManager.default .contentsOfDirectory(atPath: configurationBuildDir) where buildPath.hasSuffix(".build") { // ここでパッケージ単位で、 // バイナリファイルをライブラリ化する // // 次のスライドのコードを参照 }
  • 37. let packageName = buildPath.dropLast(".build".count) let packageBuildDir = "(configurationBuildDir)/(buildPath)" let libraryName = "(configurationBuildDir)/lib(packageName).a" let objects = try! FileManager.default .contentsOfDirectory(atPath: packageBuildDir) .filter { $0.hasSuffix(".o") } let process = Process() process.currentDirectoryPath = packageBuildDir process.launchPath = "/usr/bin/libtool" process.arguments = ["-o", libraryName] + objects process.launch() process.waitUntilExit()
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43. 🤤
  • 44. 🌻
  • 45.
  • 46.
  • 47.
  • 49. let package = Package( name: "SwiftPM-Modules", products: [ .library( name: "SwiftPM-Modules", targets: ["SwiftPM-Modules"])], dependencies: [ .package(url: "https://github.com/ikesyo/Himotoki", from: "3.1.0") ], targets: [ .target(name: "SwiftPM-Modules", dependencies: ["Himotoki"] ), ],
  • 51.
  • 52.
  • 53.
  • 54.
  • 55. 🌻