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
190
ゆめみ大技林製作委員会の立ち上げの話 / daigirin project
usamik26
0
340
@ViewLoadingプロパティラッパの紹介と自前で実装する方法 / @ViewLoading property wrapper implementation
usamik26
0
490
これからUICollectionViewを実践活用する人のためのガイド / Guide to UICollectionView
usamik26
1
760
Xcodeとの最近の付き合い方のはなし / Approach To Xcode
usamik26
2
680
UICollectionView Compositional Layout
usamik26
0
810
Coding Swift with Visual Studio Code and Docker
usamik26
0
520
Swift Extension for Visual Studio Code
usamik26
2
1.1k
Other Decks in Programming
See All in Programming
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
GitHubとGitLabとAWS CodePipelineでCI/CDを組み比べてみた
satoshi256kbyte
4
250
Kiroで始めるAI-DLC
kaonash
2
630
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
350
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
480
Compose Multiplatform × AI で作る、次世代アプリ開発支援ツールの設計と実装
thagikura
0
170
ユーザーも開発者も悩ませない TV アプリ開発 ~Compose の内部実装から学ぶフォーカス制御~
taked137
0
190
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
3.4k
さようなら Date。 ようこそTemporal! 3年間先行利用して得られた知見の共有
8beeeaaat
3
1.5k
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
Android端末で実現するオンデバイスLLM 2025
masayukisuda
1
170
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
2.8k
Featured
See All Featured
Thoughts on Productivity
jonyablonski
70
4.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Code Review Best Practice
trishagee
71
19k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Large-scale JavaScript Application Architecture
addyosmani
513
110k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
Context Engineering - Making Every Token Count
addyosmani
3
60
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
530
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 αϙʔτ