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 Weekly 12/13
Search
Johnlin
December 13, 2016
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Swift Weekly 12/13
Johnlin
December 13, 2016
More Decks by Johnlin
See All by Johnlin
用 MLIR 實作 一個 Ruby IR (intermediate representation)
johnlinvc
0
320
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
400
Ruby 型別檢查工具簡介
johnlinvc
0
630
Swift Actor 實作探索
johnlinvc
0
200
用 mruby 來寫跨平台工具
johnlinvc
0
130
Actor model 簡介
johnlinvc
0
240
一起玩 Helm 3
johnlinvc
1
160
為什麼 App 卡卡的
johnlinvc
2
1.3k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
270
Other Decks in Programming
See All in Programming
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
500
運用ダッシュボードの設計を誰も教えてくれないのだけどみなさんどうしてるんですか? - チームに監視するという文化を根付かせるための第一歩を踏みたい -
satoshi256kbyte
1
130
プロポーザルを書いてもらう
pvcresin
0
560
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
250
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
120
琵琶湖の水は止められても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
800
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
320
AIが無かった頃の素敵な出会いの話
codmoninc
1
470
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
480
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
240
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
660
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
1
140
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
650
Designing for Timeless Needs
cassininazir
1
450
sira's awesome portfolio website redesign presentation
elsirapls
0
330
What's in a price? How to price your products and services
michaelherold
247
13k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
A designer walks into a library…
pauljervisheath
211
24k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Making the Leap to Tech Lead
cromwellryan
135
10k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Transcript
Swift पใ 12/13 John Lin @johnlinvc
From the core • Swift 3.1 ᚙྲྀఔ • ະိ Swift
తԼ૬༰
Swift 3.1 ᚙྲྀఔ • Swift 3.1 ။Լ૬༰ Swift 3.0ɼݱ༗తఔࣜᛰෆ༻ मվ
• رೳࡏ2017 य़ఱᚙɻ
ະိSwift తԼ૬༰ • 3.X ൘ʢแؚ 3.1) ။શ૬༰ 3.0 ൘ɼୠੋ༗Մೳ။ Ճ૬༰త৽ޠ๏ɻ
• Swift 4ฤᩄث။ଟҰݸჩᏐ -swift-version ༻ိඪ ࣔఔࣜᛰత Swift ൛ຊɻ څ 3 बදੋ 3.X ൘ɼڅ 4 बදੋ 4.X ൘ɻ
ະိSwift తԼ૬༰ • 4.X ൘ 3.X ൘త Swift library
ሡՄҎࠞ༻ɻॴҎෆ ༻፦৺૬ґత݅ᔒ༗ঋڃɻ • Swift ݅ཧث။ଟҰݸબ߲ိࢦఆ૬༰త൛ຊɻ
Evolution • [SE-0145] ݅ཧث൛ຊݻఆ • [SE-0146] ݅ཧثՄࣗగ㗞
[SE-0145] ݅ཧث൛ຊݻఆ • ༻݅ཧث҆݅ޙ။ࣗಈ㗞ੜҰݸ Package.pins 䈕Ҋɼཫ໘။แؚॴ༗݅తৄࡉ൛ ຊࢿ㘤(൛ຊɼSHA1)ɻ • ᙛ҆݅࣌ɼ။༏ઌ༻ Package.pins
ိܾఆ൛ ຊɼՌᔒ༗Ṝݸ䈕Ҋ࠽။ Package.swift
[SE-0145] ݅ཧث൛ຊݻఆ • ။ڣ Package.pins ࣕෆڣ Package.lock ੋҼҝ POSIX ༗
lock, Thread ༗ lock • Package.pins త֬֨ࣜؐᔒ༗ܾఆɼመ࡞ऀ ༻ॄኄᒬత֨ࣜɻෆաେ֓ੋJSON
[SE-0145] ݅ཧث൛ຊݻఆ • swift build • Ռ༗ Package.pinsɼबཫ໘తࢦఆ൛ຊɻ • ᔒ༗
Package.pinsɼ༻ Package.swift ိܾఆద ߹త൛ຊɼ࠶ࠣࢿ㘤ࣗಈሜਐ Package.pins
[SE-0145] ݅ཧث൛ຊݻఆ • swift package pin --all #ݻఆݱ༗త൛ຊ • swift
package pin Foo #ݻఆݱ༗తFoo൛ຊ • swift package pin Foo 1.2.3 #ݻఆFoo౸1.2.3൘ • swift package pin Foo 1.2.3 --message “1.2.4 is broken” #ݻఆFoo౸1.2.3൘ɼෟ্ݪҼ
[SE-0145] ݅ཧث൛ຊݻఆ • swift package pin --enable-autopin #⬏Ⴈሱọܥקđswift package
update ޙ။ࣗಈݻ ఆ৽త൛ຊ • swift package pin --disable-autopin #औফࣗಈݻఆɼswift package update ޙෆ။ࣗಈ ݻఆ৽త൛ຊ
[SE-0145] ݅ཧث൛ຊݻఆ • swift package unpin --all #औফॴ༗తݻఆɼՌࣗಈݻఆ։⬏త။㗞ੜࡨ ޡ
• swift package unpin Foo #औফFooతݻఆɼՌࣗಈݻఆ։⬏త။㗞ੜࡨ ޡ
[SE-0146] ݅ཧثՄࣗగ㗞 • ݅ఆٛதআྃݱ༗త Target ֎ؐՄҎఆٛ ProductɼҝLibrary Executable ၷछ
• ՄҎࢦఆ݅தత Product ҝ૬ґੑ
[SE-0146] ݅ཧثՄࣗగ㗞 let package = Package( name: "MyServer", targets:
[ Target(name: "Utils"), Target(name: "HTTP", dependencies: ["Utils"]), Target(name: "ClientAPI", dependencies: ["HTTP", "Utils"]), Target(name: "ServerAPI", dependencies: ["HTTP"]), Target(name: "ServerDaemon", dependencies: ["ServerAPI"]), ], products: [ .Library(name: "ClientLib", type: .static, targets: ["ClientAPI"]), .Library(name: "ServerLib", type: .dynamic, targets: ["ServerAPI"]), .Executable(name: "myserver", targets: ["ServerDaemon"]), ] )
[SE-0146] ݅ཧثՄࣗగ㗞 let package = Package( name: "MyClient", targets:
[ Target(name: "ClientCLI", dependencies: [.product(name:"ClientAPI", package:"MyServer")]), ], products: [ .Executable(name: "myclient-cli", targets: ["ClientCLI"]), ] )
Community • method dispatching in swift https://www.raizlabs.com/dev/2016/12/swift- method-dispatch/