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
160
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
340
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
420
Ruby 型別檢查工具簡介
johnlinvc
0
640
Swift Actor 實作探索
johnlinvc
0
210
用 mruby 來寫跨平台工具
johnlinvc
0
130
Actor model 簡介
johnlinvc
0
250
一起玩 Helm 3
johnlinvc
1
170
為什麼 App 卡卡的
johnlinvc
2
1.3k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
280
Other Decks in Programming
See All in Programming
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
290
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
240
一人だけ、Kiroが静止する日
hideg
0
110
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2k
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
240
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
690
Are APIs Still Relevant in the AI Era?
soyuka
0
230
新卒PdEのリアル
ryu1013
1
500
App Intentsのビルドプロセスを支える技術
kntkymt
0
380
Family mrubyの進捗
kishima
1
120
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
280
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
850
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Designing for Performance
lara
611
70k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Designing Experiences People Love
moore
143
24k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
460
Build your cross-platform service in a week with App Engine
jlugia
234
19k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.9k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Practical Orchestrator
shlominoach
192
12k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
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/