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
750
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
630
Apple HIG 正式名称クイズ結果発表 / HIG Quiz Result
usamik26
0
180
ゆめみ大技林製作委員会の立ち上げの話 / daigirin project
usamik26
0
330
@ViewLoadingプロパティラッパの紹介と自前で実装する方法 / @ViewLoading property wrapper implementation
usamik26
0
480
これからUICollectionViewを実践活用する人のためのガイド / Guide to UICollectionView
usamik26
1
740
Xcodeとの最近の付き合い方のはなし / Approach To Xcode
usamik26
2
670
UICollectionView Compositional Layout
usamik26
0
790
Coding Swift with Visual Studio Code and Docker
usamik26
0
510
Swift Extension for Visual Studio Code
usamik26
2
1k
Other Decks in Programming
See All in Programming
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
240
deno-redisの紹介とJSRパッケージの運用について (toranoana.deno #21)
uki00a
0
150
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
320
PicoRuby on Rails
makicamel
2
110
第9回 情シス転職ミートアップ 株式会社IVRy(アイブリー)の紹介
ivry_presentationmaterials
1
240
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
1
690
ASP.NETアプリケーションのモダナイズ インフラ編
tomokusaba
1
420
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
640
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
110
都市をデータで見るってこういうこと PLATEAU属性情報入門
nokonoko1203
1
570
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
560
GraphRAGの仕組みまるわかり
tosuri13
8
490
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
53
7.7k
Gamification - CAS2011
davidbonilla
81
5.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The Language of Interfaces
destraynor
158
25k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
800
Stop Working from a Prison Cell
hatefulcrawdad
270
20k
A Modern Web Designer's Workflow
chriscoyier
694
190k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
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 αϙʔτ