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
Satoshi Hachiya
May 25, 2016
Programming
3.5k
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
720
花嫁アプリを作った
jp_pancake
1
550
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
530
try! Swift Tokyo 2018 Day 1 Opening
jp_pancake
0
880
What is `Swifty`?
jp_pancake
2
1.4k
danger-swift
jp_pancake
2
1.6k
Other Decks in Programming
See All in Programming
リアルな遅延を測る仕様
kota_yata
1
140
AIの中の人になってみる
htkym
0
150
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
1
420
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
410
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
0
280
週末にAI-DLCを本気で回したら$1,600溶けた
hbashimizu
0
120
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.6k
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
280
源内ハンズオン概要編
hideg
0
240
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
130
バグを直したら useEffect が消えた
colorful12
3
830
이 함수, 실패하면 어떻게 되나요? null부터 Rich Errors까지, Kotlin 에러 처리 15년
haeti2
0
120
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
370
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
640
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
Technical Leadership for Architectural Decision Making
baasie
3
550
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.7k
For a Future-Friendly Web
brad_frost
183
10k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
890
How to make the Groovebox
asonas
2
2.4k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
270
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
640
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.6k
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