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
いまさらですがRxSwiftつかってみました
Search
Tsuyoshi Yonemoto
March 22, 2017
Programming
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
いまさらですがRxSwiftつかってみました
https://potatotips.connpass.com/event/50155/
で発表した発表資料です。
アプリに実際にRxSwiftを使ってみた事をまとめました。
Tsuyoshi Yonemoto
March 22, 2017
More Decks by Tsuyoshi Yonemoto
See All by Tsuyoshi Yonemoto
Serverless Frameworkを試してみたよ
yoneapp
1
780
WebとiOSの連携方法は何がベストか? 2016年版 #potatotips 27
yoneapp
0
3.1k
Other Decks in Programming
See All in Programming
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
460
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
330
Intent as Code
shoppingjaws
6
980
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
6
1.8k
新卒PdEのリアル
ryu1013
1
490
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
330
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
110
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
540
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
190
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.8k
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
230
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
490
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
790
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
880
The World Runs on Bad Software
bkeepers
PRO
72
12k
Between Models and Reality
mayunak
4
460
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
450
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Scaling GitHub
holman
464
140k
Visualization
eitanlees
152
17k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Transcript
͍·͞ΒͰ͕͢ RxSwift͔ͭͬͯΈ·ͨ͠ potatotips #38 @yoneapp Tsuyoshi Yonemoto
@yoneapp • ̎̌̍̎ɿελʔτΞοϓͷڞಉۀऀ • ̎̌̍̑ɿiOS & RailsϑϦʔϥϯε
ΞϓϦ͕ग़·ͨ͠ʂʢ̍ʣ
ΞϓϦ͕ग़·ͨ͠ʂʢ̎ʣ
RxSwiftΛͬͯΈ·ͨ͠
PRESS BLOGͰͷࣄྫ
PRESSͷॳճىಈ
PUSH௨τʔΫϯͷڞ༗ • ΩʔΛૹΔʹϩάΠϯೝূใ͕ඞཁ • PUSH௨τʔΫϯͷऔಘλΠϛϯά • ॳճঝೝ࣌ • ઃఆ͔Βঝೝ͞Ε͔ͯΒΞΫςΟϒ •
γεςϜతʹมߋʁ • ผΞΧϯτͰϩάΠϯ͞ΕͨΒͲ͏͢Δ
ෳࡶͩͳʔ
RxSwiftΛͬͯΈΑ͏
࣮ࡍͷίʔυ let sessionId = Session.shared.sessionId.asObservable().unwrap() let pushToken = pushTokenObservable.unwrap() Observable.combineLatest(sessionId,
pushToken) { PushTokenUpdateRequest(sessionId:$0, pushToken: $1) } .subscribe(onNext: { _ = $0.post() }) .addDisposableTo(disposeBag) ※ unwrap(RxSwiftExt)nilΛফ͢
࣮ࡍͷίʔυ OneSignal.idsAvailable { (playerId, pushToken) in self.pushTokenObservable.onNext(pushToken) }
࣮ࡍͷίʔυ class Session { static let shared = Session() var
sessionId: Variable<String?> }
RxSwift ঢ়ଶΛมͱͯ͠ఆٛͰ͖Δͱཧղͨ͠
ෳࡶͳΛղܾͰ͖ͨ let sessionId = Session.shared.sessionId.asObservable().unwrap() let pushToken = pushTokenObservable.unwrap() Observable.combineLatest(sessionId,
pushToken) { PushTokenUpdateRequest(sessionId:$0, pushToken: $1) } .subscribe(onNext: { _ = $0.post() }) .addDisposableTo(disposeBag) ※ unwrap(RxSwiftExt)nilΛফ͢
࣮ͯ͠Έͯ…
pausableBuffered http://rxmarbles.com/#pausableBuffered
RxSwiftʹແ͍
ແ͍ͷ͋Δ http://reactivex.io/documentation/operators/backpressure.html
Observable.combineLatest http://rxmarbles.com/#combineLatest
unwrap(RxSwiftExt) https://github.com/RxSwiftCommunity/RxSwiftExt#unwrap
ͬͱRxSwiftΛ͍͜ͳ͠ ͯૉఢͳΞϓϦΛ࡞Γ·͢
END