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 3 升級
Search
Johnlin
October 04, 2016
Programming
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
實戰 Swift 3 升級
Johnlin
October 04, 2016
More Decks by Johnlin
See All by Johnlin
用 MLIR 實作 一個 Ruby IR (intermediate representation)
johnlinvc
0
390
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
490
Ruby 型別檢查工具簡介
johnlinvc
0
700
Swift Actor 實作探索
johnlinvc
0
230
用 mruby 來寫跨平台工具
johnlinvc
0
150
Actor model 簡介
johnlinvc
0
280
一起玩 Helm 3
johnlinvc
1
200
為什麼 App 卡卡的
johnlinvc
2
1.4k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
300
Other Decks in Programming
See All in Programming
JIS keyboard support in Omarchy
lef237
0
110
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
残高管理から台帳サービスへの進化
artoy
1
200
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
530
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
170
AmebaブログはKMPから卒業します
kmars0605
0
170
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
The Rails Doctrine Decade
koic
2
580
Domain-Driven Transformation
hschwentner
2
2.3k
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Speed Design
sergeychernyshev
33
2.2k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
620
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
ラッコキーワード サービス紹介資料
rakko
1
5.3M
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
260
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
520
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
The Limits of Empathy - UXLibs8
cassininazir
2
720
Transcript
መፌSwift 3 ঋڃ @johnlinvc
Swift 3 • Swift 2.2 ൺɼՃྃଟత౦ɼमվྃ ଟ౦ɻ • Xcode
8 తҰ෦㟨 • ࠷ޙঋڃظݶະ
None
खಈঋڃ • ࣗݾվॴ༗తఔࣜᛰɻ • ࣗቮमશແ๏ཧղత Build settingɻ
None
༻Xcode ঋڃ۩ • ୈҰ࣍༻ Xcode 8 ଧ։ݱ༗ሢҊब။ग़ݱɻ • ՄҎࣗಈ㢨㟬मվఔࣜᛰ Swift
3 ൛ຊɼؐ༗मվ Build settingsɻ
None
None
༻ঋڃ۩త४උ࡞ • ֬อఔࣜࡏXcode 7.3 ੋਖ਼ৗӡ࡞తɻ • ֬อॴ༗త Target ࡏ Scheme
ཫɻ • ༗ Test తबଠྃɻ
༻ঋڃ۩ • ՄҎબᎩཁঋ౸ Swift 2.3 ҃ੋ Swift 3.0 • ။ઌ
Build Ұ࣍ိ֬ఆཁࣗಈमվతํɻ • ࠷ޙ҈ Save ब။ঋڃɻ
Demo
None
Xcodeෆੋᤈೳత • ൺֱগਓ။༻త ޠ๏/API बᔒ༗ࣗಈঋڃɻ • ೳⴺखಈमվɻ
SetIndex & DictionaryIndex • index.successor() Ꮣ Collection.index(after: index) • index.predecessor()
Ꮣ Collection.index(before: index) • index.advancedBy(delta) Ꮣ Collection.index(index, offsetBy: delta) • index.advancedBy(delta, limit: otherIndex) Ꮣ Collection.index(index, offsetBy: delta, limitedBy: otherIndex) • index.distanceTo(otherIndex) Ꮣ Collection.distance(from: index, to: otherIndex)
ࣗݾሜత Collection Type • ݱࡏ Indexing ੋ༝ Collection ཧɻ •
ࣗݾሜత Collection Type ཁࣗݾमվɻ • ී௨త Collection धཁ Collection.index(after: index) • ძత धཁ Collection.index(before: index) • ᬋػଘऔత धཁ Collection.index(index, offsetBy: delta, limitedBy: otherIndex) Collection.distance(from: index, to: otherIndex)
Range త मվ • ݱࡏ Range ෆೳඃ iterate (for-in)ྃɼ༗ CountableRange
ՄҎɻ • ೭લ༗໌֬એࠂ Range తՄҎߟྀվ CountableRangeɻ
Collection 㚎ݐ min/max • Ҏલೳࣗݾ༻ extension Ճɻ • ୠੋݱࡏ㚎ݐ೭ޙ။໊ɻ
NSURL & NSData • ݱࡏ༗ਖ਼ࣜతSwift ൛ຊɼURL & Dataɻ • େ෦။ࣗಈঋڃɼআඇ༗༻౸ෆࢧԉత
APIɻ • ૾ੋ checkResourceIsReachableAndReturnError ब վ။㟚Exception త checkResourceIsReachable
NSMutable* • ૾ੋ NSMutableDataɻ • ෆ။ࣗಈঋڃ • ୠੋ৽తAPI ෆ٣ɼೳⴺखಈ myData
as Data
զ༗༻Cocoapods/Carthage 1. ᠃༻Swift 2.2 & Xcode 7.3 ౸ॴ༗ Package
ঋڃɻ 2. ሜ৴/ᚙ Tweet ڈޑჄݪ࡞ऀɻ 3. 㢨ଞम೭ޙᚙ Pull Requestɻ
CI ઃఆཁঋڃ • CocoaPods 㗞ੜग़ိత workspace ᔒ༗ඪهቮঋڃ • ࡏCI ্။༗ɻ
• ༻ beta ൛ Cocoapods ɼ $ [sudo] gem install cocoapods --pre • ՃҰݸ㚎༰ੋ 3.0 త .swift-version 䈕څ CI ɻ
Q&A • ํঋڃจ݅ https://swift.org/migration-guide/ • (෦㟨)தจ൛ https://swiftlang.tw/migration-guide/