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
330
@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
800
Coding Swift with Visual Studio Code and Docker
usamik26
0
520
Swift Extension for Visual Studio Code
usamik26
2
1k
Other Decks in Programming
See All in Programming
Nuances on Kubernetes - RubyConf Taiwan 2025
envek
0
140
ワープロって実は計算機で
pepepper
2
1.3k
パスタの技術
yusukebe
1
350
AIに安心して任せるためにTypeScriptで一意な型を作ろう
arfes0e2b3c
0
340
JetBrainsのAI機能の紹介 #jjug
yusuke
0
200
Constant integer division faster than compiler-generated code
herumi
2
590
WebAssemblyインタプリタを書く ~Component Modelを添えて~
ruccho
1
760
Understanding Ruby Grammar Through Conflicts
yui_knk
1
100
CEDEC 2025 『ゲームにおけるリアルタイム通信への QUIC導入事例の紹介』
segadevtech
3
830
[DevinMeetupTokyo2025] コード書かせないDevinの使い方
takumiyoshikawa
2
280
新しいモバイルアプリ勉強会(仮)について
uetyo
1
250
サイトを作ったらNFCタグキーホルダーを爆速で作れ!
yuukis
0
180
Featured
See All Featured
The Invisible Side of Design
smashingmag
301
51k
A Modern Web Designer's Workflow
chriscoyier
695
190k
Facilitating Awesome Meetings
lara
54
6.5k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
BBQ
matthewcrist
89
9.8k
Embracing the Ebb and Flow
colly
86
4.8k
Into the Great Unknown - MozCon
thekraken
40
2k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Code Review Best Practice
trishagee
69
19k
KATA
mclloyd
32
14k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
We Have a Design System, Now What?
morganepeng
53
7.7k
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 αϙʔτ