Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
800
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
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
480
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
290
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
5
3.3k
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
210
setup-vp GitLab対応の裏側
naokihaba
0
110
XHTMLが残したもの
yosuke_furukawa
PRO
2
810
FreeBSDでZabbixを動かす
kenkino
0
300
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
140
速習iPhone Duo対応
yuukiw00w
1
570
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
120
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
150
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
330
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
660
KATA
mclloyd
PRO
35
15k
Automating Front-end Workflow
addyosmani
1369
210k
Are puppies a ranking factor?
jonoalderson
2
3.9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
YesSQL, Process and Tooling at Scale
rocio
174
15k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
840
The SEO identity crisis: Don't let AI make you average
varn
0
560
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
530
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
550
New Earth Scene 8
popppiees
4
2.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