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
Apple Watch Cellular
Search
USAMI Kosuke
October 04, 2017
Programming
0
760
Apple Watch Cellular
Mobile Act OSAKA #1
https://mobileact.connpass.com/event/65935/
USAMI Kosuke
October 04, 2017
Tweet
Share
More Decks by USAMI Kosuke
See All by USAMI Kosuke
Onsager代数とその周辺 / Onsager algebra tsudoi
usamik26
0
650
Apple HIG 正式名称クイズ結果発表 / HIG Quiz Result
usamik26
0
200
ゆめみ大技林製作委員会の立ち上げの話 / daigirin project
usamik26
0
340
@ViewLoadingプロパティラッパの紹介と自前で実装する方法 / @ViewLoading property wrapper implementation
usamik26
0
500
これからUICollectionViewを実践活用する人のためのガイド / Guide to UICollectionView
usamik26
1
760
Xcodeとの最近の付き合い方のはなし / Approach To Xcode
usamik26
2
690
UICollectionView Compositional Layout
usamik26
0
810
Coding Swift with Visual Studio Code and Docker
usamik26
0
530
Swift Extension for Visual Studio Code
usamik26
2
1.1k
Other Decks in Programming
See All in Programming
CSC509 Lecture 05
javiergs
PRO
0
300
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
440
高度なUI/UXこそHotwireで作ろう Kaigi on Rails 2025
naofumi
4
3.7k
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
190
CSC509 Lecture 03
javiergs
PRO
0
330
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
120
そのpreloadは必要?見過ごされたpreloadが技術的負債として爆発した日
mugitti9
2
3.1k
明日から始めるリファクタリング
ryounasso
0
120
SpecKitでどこまでできる? コストはどれくらい?
leveragestech
0
630
ネイティブ製ガントチャートUIを作って学ぶUICollectionViewLayoutの威力
jrsaruo
0
140
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1k
XP, Testing and ninja testing ZOZ5
m_seki
3
400
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Building an army of robots
kneath
306
46k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
The Cult of Friendly URLs
andyhume
79
6.6k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Context Engineering - Making Every Token Count
addyosmani
5
210
Transcript
Apple Watch Cellular ͷ௨৴ʹ͍ͭͯ USAMI Kosuke Fenrir Inc.
ࣗݾհ » Ӊࠤݟެี (@usamik26) » ϑΣϯϦϧגࣜձࣾ » iOS ΞϓϦ։ൃ :
Swift / Xamarin (C#)
Cellular ௨৴͕͖ͬͯͨ » Apple Watch Series 3 Cellular Ϟσϧ »
ຊͷରԠΩϟϦΞ : Softbank / au / docomo » पଳผ : ϤʔϩούɾΞδΞϞσϧ / ถࠃϞσϧ / தࠃϞσϧ
Apple Watch ୯ಠͷ௨৴ » ୯ಠͷ Wi-Fi ௨৴ : watchOS 2
Ҏ߱ » ୯ಠͷ Cellular ௨৴ : watchOS 4 (New!)
ϞόΠϧ௨৴ͷΦϯΦϑ » Cellular ௨৴ͷΦϯΦϑɺίϯτϩʔϧηϯλʔͰઃఆՄೳ » Cellular ௨৴͕ΘΕ͍ͯΔͱ͖ɺΞΠίϯ͕ʹͳΔ
Apple Watch ௨৴ͷ༏ઌ » iPhone ܦ༝ ʼ Wi-Fi ʼ Cellular
௨৴
Γସ͑ͷλΠϜϥά » iPhone ͕ۙ͘ʹ͍ͳ͘ͳΔ » → ͍ͬͨΜɺଓͳ͠ঢ়ଶʹͳΔ » → ͠Β͔ͯ͘͠ΒɺCellular
௨৴Ͱଓঢ়ଶʹͳΔ » ͜ͷΑ͏ͳʮଓํࣜͷΓସ͑ͪʯ͕ൃੜ͢Δ
URLSession » watchOS ͷ௨৴ URLSession Λ͏͕ɾɾɾ » σϑΥϧτͷઃఆͰɺΓସ͑Λͨͣʹ͙͢Τϥʔऴྃ͢Δ » NSURLErrorNotConnectedToInternet
» ͔ͤͬ͘ Cellular ௨৴ʹΓସΘΔͷʹɺ͜ΕͰࠔΔ
waitsForConnectivity » ͙͢ʹΤϥʔऴྃ͠ͳ͍Α͏ʹ͢ΔϓϩύςΟ͕Ճ͞Εͨ let configuration = URLSessionConfiguration.ephemeral if #available(iOS 11.0,
watchOSApplicationExtension 4.0, *) { configuration.waitsForConnectivity = true } let session = URLSession(configuration: configuration)
Connectivity ͕ؔͳ͍ঢ়گͰ ͬͯΑ͍ » waitsForConnectivity σϑΥϧτͰ false ʹͳ͍ͬͯΔ » ͓ͦΒ͘ɺैདྷͷ
URLSession ͷڍಈʹ߹Θͤͯ͋Δ » ͚ͩͲɺৗʹ true ʹͯ͠͠·͍͍͑ » Reachability ͱ͔ؾʹ͠ͳͯ͘Α͘ͳΔ
Γସ͑ͪঢ়ଶʹͳͬͨ͜ͱΛΔ » URLSessionTaskDelegate ͷϝιου͕Ճ͞Εͨ func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task:
URLSessionTask) { // ଓํࣜͷΓସ͑ͪঢ়ଶʹͳͬͨΒ͜͜དྷΔ // Ұ͚ͩݺΕΔ }
Watch ͷಠཱಈ࡞Λҙࣝ͢Δ » ࣮ watchOS 2 ͷࠒ͔Βಉ͡Ͱ͋Δ » watchOS 2
͔Β୯ಠ௨৴͕Ͱ͖ΔΑ͏ʹͳ͍ͬͯͨͨΊ » ୯ಠ௨৴ͷγʔϯ͕૿͑ͨͨΊɺࠓޙΑΓҙ͕ඞཁʹͳΔ
Watch Connectivity framework » ैདྷ͔Β͋Δ iPhone - Watch ؒͷσʔλΓऔΓ »
Watch ͕ಠཱͯ͑͠ΔΑ͏ʹͳͬͨͷͰɺಉظ͞Ε͍ͯͳ͍ঢ়ଶ ૿͑Δ » WCSession ͷ updateApplicationContext() Λͬͯ໌ࣔతʹಉظ ͢Δ
ࢀߟ » Updating for Apple Watch Series 3 - Videos
- Apple Developer » waitsForConnectivity | Apple Developer Documentation » App Programming Guide for watchOS » Apple Watch Series 3 (GPS + Cellular) ͰϞόΠϧσʔλ௨৴Λઃ ఆ͠༻͢Δ - Apple αϙʔτ