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 3 升級
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Johnlin
October 04, 2016
Programming
150
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
290
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
370
Ruby 型別檢查工具簡介
johnlinvc
0
610
Swift Actor 實作探索
johnlinvc
0
200
用 mruby 來寫跨平台工具
johnlinvc
0
120
Actor model 簡介
johnlinvc
0
240
一起玩 Helm 3
johnlinvc
1
160
為什麼 App 卡卡的
johnlinvc
2
1.3k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
260
Other Decks in Programming
See All in Programming
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
510
RTSPクライアントを自作してみた話
simotin13
0
600
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
110
3Dシーンの圧縮
fadis
1
760
JavaDoc 再入門
nagise
0
320
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
890
New "Type" system on PicoRuby
pocke
1
840
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
330
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
160
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
100
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
220
Featured
See All Featured
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
720
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
850
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Building AI with AI
inesmontani
PRO
1
1.1k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
160
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
Fireside Chat
paigeccino
42
3.9k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
250
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Done Done
chrislema
186
16k
Deep Space Network (abreviated)
tonyrice
0
170
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
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/