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
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
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
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
1.1k
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
280
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
3.8k
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
550
その節約、円になってますか?
isamumumu
1
680
数百円から始めるRuby電子工作
tarosay
0
130
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
230
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.4k
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
200
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
AIが無かった頃の素敵な出会いの話
codmoninc
1
380
5分で問診!Composer セキュリティ健康診断
codmoninc
0
850
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.7k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.8k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
480
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
A Soul's Torment
seathinner
6
3.3k
Making the Leap to Tech Lead
cromwellryan
135
10k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The Cost Of JavaScript in 2023
addyosmani
55
10k
A designer walks into a library…
pauljervisheath
211
24k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
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