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への愛2018
Search
hirothings
December 08, 2018
Programming
3.4k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Swiftへの愛2018
Swiftの魅力
最近のSwift
これからのSwift
について発表した資料になります
hirothings
December 08, 2018
More Decks by hirothings
See All by hirothings
minto 10万ダウンロードまでにやったこと・やらなかったこと / minto 100k DL
hirothings
5
2k
VIPER with アーキテクチャ選定 実践入門 / VIPER Architecture
hirothings
4
1.1k
実践Dark Mode対応 / Implementing Dark Mode
hirothings
4
230
iOS標準UIワークショップ / iOS Default UI Workshop
hirothings
3
11k
Modernizing Your UI for iOS 13
hirothings
1
1.3k
WWDC2019 pre party LT
hirothings
0
2.5k
iOSなアーキテクチャVIPERのススメ
hirothings
5
3.6k
Swift2年生
hirothings
4
36k
Swiftへの愛
hirothings
0
36k
Other Decks in Programming
See All in Programming
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.8k
[2026-10-14](C)Re:ゼロから始める異世界生活〜始まりの終わりと終わりの始まり〜
tosite
0
160
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
3
550
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
210
Modernizing iOS Apps
seyfoyun
0
120
R8 の設定見直しでアプリサイズ削減
andpad
0
230
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
310
contenteditable と日本語入力に向き合う
colorful12
0
220
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
280
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
1k
Vapor Mode でアクセシビリティは 壊れないか検証した話
fuqda
1
160
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.4k
Featured
See All Featured
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
740
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Skip the Path - Find Your Career Trail
mkilby
1
260
Mind Mapping
helmedeiros
1
410
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
500
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
How to Talk to Developers About Accessibility
jct
2
590
For a Future-Friendly Web
brad_frost
184
10k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Typedesign – Prime Four
hannesfritz
42
3.2k
Transcript
Love Swift 2018 @hirothings
10Ͱ͢͜ͱ • Swiftͱʁ • Swiftͷັྗ • ࠷ۙͷSwift • ͜Ε͔ΒͷSwift •
Hello Swift!
ࣗݾհ • @hirothings (Objective-ͻΖC) • ݩϥʔϝϯళ • ৭ʑ͋ͬͯݱࡏiOSσϕϩούʔ
Swiftͱͷग़ձ͍ • ΤϯδχΞͱͯ͠ΩϟϦΞΛελʔτͨ͠2015 ౙ..ɻ • ͦΕ·ͰJS, PHPΛগʑ͚ͩͬͨͲઓྗʹͳΒͣɺ Ҋ݅ͷSwiftࢼͯ͠ΈΔ୲ʹͳΓSwiftͱग़ձ͏͜ ͱʹ
Swiftͱ • Apple͕2014ʹൃදͨ͠ϓϩάϥϛϯάݴޠ • ͷͪΦʔϓϯιʔεԽ https://github.com/apple/swift • ࣮ߦ͕͍, Ϟμϯ, ҆શ
• ΞΠίϯΞϚπόϝ https://www.apple.com/jp/swift/ ΑΓ
Swiftͷັྗ • ݫ֨ͳܕγεςϜ • Ϟμϯͳจ๏ • null҆શͳݴޠ • ܕத৺ͷݴޠ •
GenericsΛ༻͍ͨॊೈ͞
ݫ֨ͳܕγεςϜ • ੩తܕ͚ݴޠ • ίϯύΠϥ͕ίʔυͷ҆શੑΛ୲อͯ͘͠ΕΔ • ҉తͳίʔυ͕গͳ͘ͳΔ • ܕʹରͯ͠ݫࣗ͘͠વͱλΠϓηʔϑͳॻ͖ํ Λʹ͚ͭΒΕΔ
Ϟμϯͳจ๏ • ܕਪ • Ϋϩʔδϟ • ߴ֊ؔ (map, flatMap, filter,
reduce..) • ϓϩτίϧ / ϓϩτίϧ֦ு • δΣωϦΫε • λϓϧ / ෳͷΓ • ϝϞϦͷࣗಈཧ(ARC)
null҆શͳݴޠ null҆શͱ: null͕ݪҼͰ࣮ߦ࣌ΤϥʔʹͳΒͳ͍Έ OVMM҆શͰͳ͍ݴޠɺϨΨγʔݴޠͩIUUQTRJJUBDPNLPIFSJUFNT FCECBCΑΓ
null҆શͳݴޠ • nullνΣοΫΛίϯύΠϧ࣌ʹνΣοΫͰ͖Δ • मਖ਼͠ͳ͍ͱͦͦϏϧυ͕௨Βͳ͍
ܕத৺ͷݴޠ ࢀরܕͷ • ίʔυΛΘͳ͍ͱɺͲ͜·ͰΠϯελϯε͕ ڞ༗͞Ε͍ͯΔͷ͔ෆ໌ +BWBTDSJQUͷ"SSBZ ࢀরܕ ͷྫ
ඪ४ϥΠϒϥϦͷ΄ͱΜͲ͕ ܕ • String • Array • Dictionary • Bool
• Int • Double • Float
ίϐʔ͝ͱʹίετ͕͔͔Δ ͷͰʁ
Copy on Write • ೖ࣌Ͱίϐʔ͕ൃੜ͠ͳ͍ • Λมߋ࣌ɺॳΊͯΠϯελϯε͕࡞ΒΕΔ Έ • ͜ͷΈͷ͓͔͛ͰArrayͳͲͰܕΛ࣮ݱ
GenericsΛ༻͍ͨॊೈ͞ • 2ͭͷҾΛswap͢Δؔ • IntܕͷҾͷΈαϙʔτ • ৼΔ͍ಉ͕ͩ͡ɺ͋ΒΏΔܕΛαϙʔτͨ͠ ͍..
• GenericsͰղܾ • ܕύϥϝʔλ <T> • ؔ, δΣωϦοΫܕ(Class, Struct)ɺ͋ΒΏΔ ໘Ͱ͑Δ
IUUQTEPDTTXJGUPSHTXJGUCPPL-BOHVBHF(VJEF(FOFSJDTIUNM
࠷ۙͷSwift • όʔδϣϯΞοϓ͕ΊΜͲ͏ʁ • Φʔϓϯιʔεͱͯ͠ͷػೳڧԽ
• Swift2 to 3ͷΑ͏ͳࠈͳ͍ • Swift3ͰObj-CʹҾͬுΒΕ༷ͨΛόοαϦͬͯ҆ఆ͖ͯͨ͠ • Swift4.1 to 4.2ͷMigration࣌ؒͰऴΘͬͨɻ
• XcodeͷMigrationػೳ + ͪΐͬͱͨ͠मਖ਼ͰDone • Ξοϓσʔτͷ͍ϥΠϒϥϦSwift3ͰίϯύΠϧ όʔδϣϯΞοϓ͕ΊΜͲ͏ʁ
• จࣈྻͷڧԽ • StringͷCollection TypeԽ • ෳߦจࣈྻϦςϥϧͷαϙʔτ • Randomؔͷ࣮ •
ࠓ·ͰCͷؔarc4random_uniform Λ͍͕ͬͯͨɺLinuxڥͰ αϙʔτ͞Εͯͳ͍ͨΊ໘ͩͬͨ • Dynamic Member Lookup Φʔϓϯιʔεͱͯ͠ͷػೳڧԽ
͜Ε͔ΒͷSwift • ABI҆ఆԽ • async / await
ABI҆ఆԽ • (ͣͬͱ༏ઌ՝͚ͩͲ)Swift5ͷϦϦʔεཁ݅ • ෳͷSwiftόʔδϣϯͷڞଘ • ҠߦͷπϥϛݮΔ • ϥΠϒϥϦ੍࡞ऀخ͍͠ •
ݱࡏϞδϡʔϧ୯ҐͰSwift3 or 4Λࢦఆͯࠞ͠ࡏͤ͞ Δ͜ͱՄೳ
async / await • ඇಉظॲཧΛಉظॲཧతʹॻ͚Δ • ࠓ·ͰRxSwiftͳͲؔܕϓϩάϥϛϯάͷΞϓϩʔν ΛಋೖͤͶͳΒͣ؆୯Ͱͳ͔ͬͨ • ࣮࣌ظ·ͩະ֬ఆ
• KotlinͰ͢ͰʹίϧʔνϯಋೖࡁΈ • SwiftͷੜΈͷΫϦεϥτφʔ͕proposalग़ͨ͠
Before async / await
After (Proposalͷྫ) async / await
Hello! Swift
Swift Playgrounds • iPadͰήʔϜײ֮ͰSwiftΛ৮ΕΔެࣜΞϓϦ IUUQTXXXBQQMFDPNKQTXJGUQMBZHSPVOET
Playground • ϦΞϧλΠϜͰ࣮ߦ͞ΕΔΤσΟλ • ཁXcode
Server Side Swift • UIKitʹڵຯͳ͍ํʹΦεεϝ • Ϗϧυ͍͠ɺ؆୯ͳAPIͳΒϗεςΟϯά·Ͱ Ͱ͖ΔϑϨʔϜϫʔΫ(ݸਓΞϓϦͷAPISSSͰ࣮ͯ͠·͢)
One more things..
࠷ۙͷXcodeʹ͍ͭͯ
ෳγϛϡϨʔλΛͬͨฒྻςετ
Diffʹ৭͕ͭ͘Α͏ʹͳͬͨ!!
Xcode10Ͱ͍ͭʹϚϧνΧʔιϧରԠ!!
Fin