Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Swift Package Manager (SwiftPM, SPM)
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Satoshi Hachiya
May 25, 2016
Programming
3.4k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Swift Package Manager (SwiftPM, SPM)
potatotips #29
Satoshi Hachiya
May 25, 2016
More Decks by Satoshi Hachiya
See All by Satoshi Hachiya
iOS の HTTP キャッシュについて
jp_pancake
3
710
花嫁アプリを作った
jp_pancake
1
540
try! ReactorKit
jp_pancake
1
790
QR Code Recognition on iOS 11
jp_pancake
1
1.4k
WWDC Pre Party 2018 at Ebisu
jp_pancake
4
3.4k
try! Swift Tokyo 2018 Report
jp_pancake
1
520
try! Swift Tokyo 2018 Day 1 Opening
jp_pancake
0
870
What is `Swifty`?
jp_pancake
2
1.4k
danger-swift
jp_pancake
2
1.6k
Other Decks in Programming
See All in Programming
New "Type" system on PicoRuby
pocke
1
980
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6.2k
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
200
Contextとはなにか
chiroruxx
1
330
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
290
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
170
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.3k
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
150
さぁV100、メモリをお食べ・・・
nilpe
0
150
RTSPクライアントを自作してみた話
simotin13
0
610
dRuby over BLE
makicamel
2
380
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
370
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Embracing the Ebb and Flow
colly
88
5.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Designing Experiences People Love
moore
143
24k
Making Projects Easy
brettharned
120
6.7k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
66
55k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Transcript
Swift Package Manager (SwiftPM, SPM) 2016-05-25 potatotips #29 JPMartha 1
ࣗݾհ @JPMartha_jp JPMartha 2
Swift Package Manager 3
͢͜ͱ ᶃ Swift Package Manager ೖ ᶄ ͜ΕΛۦͨ͠πʔϧհ 4
apple / swift-package-manager (GitHub) 5
Merged ! 6
ͨͩ͠։ൃ͢Δʹ apple / master ͷ࠷৽͕ඞཁ ʢDevelopment Snapshots ෆཁʣ ͍Ζ͍Ζ͍͜͠ͷͰ ڵຯ͕͋Δํͷͪ΄Ͳฉ͍͍ͯͩ͘͞ɻ
7
͝ଘͳ͍ํ͚ʹ • ैདྷͷϥΠϒϥϦΛύοέʔδͱݺͼ·͢ɻ • CocoaPods, Carthage ͷΑ͏ʹϥΠϒϥϦΛཧ ͢ΔπʔϧͰ͢ɻ • ͨͩ͠গ͠ҧ͍·͢ɻ
8
ύοέʔδΛ Ϗϧυ͢Δ $ swift build 9
$ swift build • Xcode ΛΘͳ͍ͰύοέʔδશମΛϏϧυ͠·͢ɻ • Swift 3.0-devʢSwift 2.2
ʹͳ͍ʣͰ͢ɻ • Apple ͷϦϙδτϦʹকདྷ૾͕هࡌ͞Ε͍ͯ·͕͢۩ମ తʹ·ͩΘ͔Γ·ͤΜɻ • Archive ͕ͳ͍Ͱ͕͢ Xcode ϓϩδΣΫτΛੜ͢ΔίϚ ϯυ͕͋Γ·͢ɻ`$ swift build -X` ʢকདྷతʹ Xcode ʹΈࠐ·ΕΔΑ͏Ͱ͢ʣ 10
Tips ୯ʹʮ͜͏͍͏͜ͱ͕Ͱ͖·͢ʯͱ͍͏Ͱ͢ɻ 11
Module • Sources ͱ Tests ҎԼΛσΟϨΫτϦͰΘ͚Δ͜ͱ ʹΑΓɺ໊લۭؒΛΘ͚Δ͜ͱ͕Ͱ͖·͢ɻ Directory.isAccessible() File.isAccessible() •
αʔυύʔςΟͷϥΠϒϥϦͰ໊લ͕όοςΟϯ άͯ͠Αͦ͞͏Ͱ͢ɻʢσΟϨΫτϦ͕ผʣ 12
Directory / File #if os(Linux) import Glibc #else import Darwin
#endif #if os(Linux) public func isAccessible(name: String) -> Bool { guard !name.isEmpty else { return false } return access(name, F_OK) == 0 } #else public func isAccessible(path: String) -> Bool { guard !path.isEmpty else { return false } return access(path, F_OK) == 0 } #endif 13
Travis CI Cross-Platform (OS X, Linux) 14
.travis.yml 15
run-tests.sh 16
JPMartha / FounDarwin 17
͜͜·Ͱ͕ Swift Package Manager ೖͷ Ͱͨ͠ɻ 18
Swift Package Manager Ͱ ίϚϯυϥΠϯπʔϧΛ ࡞͠·ͨ͠ tryswift on GitHub 19
tryswiftdev Φʔϓϯιʔε༻ίϚϯυϥΠϯπʔϧ܈Ͱ͢ɻ 20
README Generator ৽͍͠ϓϩδΣΫτͷ README Λ؆୯ʹ࡞Ε·͢ʂ • It duplicates an existing
README.md • It replaces strings (e.g. Name) in a README.md 21
Find it "image not found” Λ୳͠·͢ʂ • "Find It" searches
for a specified file in some directories. • It makes easy for you to compare your Xcode Build Settings and find a mistake. 24
Version Strings Updater ֤छυΩϡϝϯτͷόʔδϣϯ จࣈྻΛҰׅม͠·͢ʂ 26
Development Snapshots Installer ৽͍͠ Snapshots Λ؆୯ʹΠϯετʔϧͰ͖·͢ʂ • It downloads a
specified Developer Snapshot into your current working directory. • It installs the package via the sudo command. • It removes the pkg file. 28
try! Swift 3.0 Swift 3.0 ͚ͷڥมΛ؆୯ʹ ઃఆͰ͖·͢ʂ 30
A WORK IN PROGRESS " 32
Thanks! 33