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
20190726 Background App Refresh Taskがやってきた
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kei Ito
July 26, 2019
Programming
2.4k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
20190726 Background App Refresh Taskがやってきた
Kei Ito
July 26, 2019
More Decks by Kei Ito
See All by Kei Ito
20211015 Mac CatalystでmacOS用アプリを作る
itok
2
4.5k
20210219 Flutterに入門してみた
itok
1
4.1k
20201009 iOS 14 ウィジェットをつくってみた
itok
1
2.5k
20191206 Property Wrappers 入門
itok
0
1.8k
20190920 iOS 13 対応ではまった話
itok
1
2.6k
20190722 Firebase Remote Configでアドネットワークを管理する
itok
0
1.7k
20190419 iOSアプリで証明書の情報を参照する
itok
0
1.6k
20190412 Android TV向けアプリを作ってみる
itok
0
1.2k
20190215 iOS/Androidでドキュメントスキャナーを作ってみた
itok
0
1.9k
Other Decks in Programming
See All in Programming
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
480
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
910
AWSに止められる覚悟してますか?
morizo_1984
2
510
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
130
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
1
2.2k
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
7
1.8k
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
440
iOSDC2026登壇資料.pdf
riofujimon
0
210
GitHubハンズオン講座 — 実務レベルのチーム開発のフローを身につけよう
junhat6
0
120
wkhtmltopdfの次どうするか問題2026
willnet
2
1.8k
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
370
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
310
Featured
See All Featured
The untapped power of vector embeddings
frankvandijk
2
1.9k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Claude Code のすすめ
schroneko
67
230k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
470
Crafting Experiences
bethany
1
370
Marketing to machines
jonoalderson
1
5.8k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
The Limits of Empathy - UXLibs8
cassininazir
1
700
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.2k
Paper Plane
katiecoart
PRO
4
53k
Typedesign – Prime Four
hannesfritz
42
3.2k
Transcript
#BDLHSPVOE"QQ 3FGSFTI5BTL͕ ͖ͬͯͨ .PCJMF"DU04"," JUPL!ͦΒ͔ͥ
JUPL!ͦΒ͔ͥ w ͍ͱ͏͚͍ʢJUPLʣ w ɹɹɹɹɹɹͷதͷਓʢʴ෭ۀˏͯͳʣ w ϞόΠϧΞϓϦΤϯδχΞ݉$&0 w IUUQTJUPLKQ IUUQTTPSBLB[FDPKQ
!JUPLKQ
ॴࡏɿژࢢதژ۠ ࣾһਓࣗ
J04"OESPJENBD048JOEPXTαʔό ҰਓͰͬͯ·͢ʢσβΠϯҎ֎ʣ
#BDLHSPVOE"QQ 3FGSFTI5BTL͕ ͖ͬͯͨ
"EWBODFTJO"QQ #BDLHSPVOE&YFDVUJPO EFWFMPQFSBQQMFDPNWJEFPTQMBZXXED 88%$4FTTJPO
J04
#BDLHSPVOE5BTLT GSBNFXPSL
None
#BDLHSPVOE"QQ 3FGSFTI5BTL w ඵؒಈ͚Δ w ΞϓϦΛ࠷৽ͷঢ়ଶʹอͯΔ w CBDLHSPVOEGFUDIͷ"1*EFQSFDBUFE w NBD04چ"1*Ͱಈ͔ͳ͍͔ΒJ1BE04
$BUBMZTU͏ͳΒ͜ΕʹҠߦ͢͠
#BDLHSPVOE1SPDFTTJOH 5BTL w ಈ͚Δ w %#ͷϝϯςφϯεͱ͔ɺ.-ͷֶशͱ͔
४උ w DBQBCJMJUZˠCBDLHSPVOENPEFTˠ w CBDLHSPVOEGFUDI w CBDLHSPVOEQSPDFTTJOH w *OGPQMJTUˠ#(5BTL4DIFEVMFS1FSNJUUFE*EFOUJpFST w
λεΫͷࣝผࢠΛྻڍ
λεΫͷొ BGTaskScheduler.shared.register(forTaskWithIdentifier: "XXX", using: nil) { task in self.handleAppRefresh(task: task
as! BGAppRefreshTask) }
λεΫͷೖ func applicationDidEnterBackground(_ application: UIApplication) { scheduleAppRefresh() } func scheduleAppRefresh()
{ let request = BGAppRefreshTaskRequest(identifier: "XXX") request.earliestBeginDate = Date(timeIntervalSinceNow: 15 * 60) do { try BGTaskScheduler.shared.submit(request) } catch { print("Could not schedule app refresh: \(error)") } }
λεΫͷ࣮ߦ func handleAppRefresh(task: BGAppRefreshTask) { // ඞཁ͕͋Ε࠶ೖ scheduleAppRefresh() task.expirationHandler =
{ // ࣮ߦظݶ͕Εͨͱ͖ͷΩϟϯηϧॲཧ } // do something // λεΫྃ task.setTaskCompleted(success: true) }
ύϥϝʔλ w ڞ௨ w FBSMJFTU#FHJO%BUF w ԕ͗͢ΔະདྷͩΊ w िؒҎ͘Β͍͕·͍͠ w
ʮ࠷ʯͳͷͰ࣮ߦ͞ΕΔͱݶΒͳ͍
ύϥϝʔλ w QSPDFTTJOHUBTL w SFRVJSFT/FUXPSL$POOFDUJWJUZ w SFRVJSFT&YUFSOBM1PXFS w $16Λ͏ࣄΛ͢Δ߹USVFʹ͓ͯ͜͠͏
σόοά w σόοΨ͔ΒλεΫͷ࣮ߦظݶΕΛςετՄೳ IUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPOCBDLHSPVOEUBTLT TUBSUJOH@BOE@UFSNJOBUJOH@UBTLT@EVSJOH@EFWFMPQNFOU FMPCKD WPJE <<#(5BTL4DIFEVMFSTIBSFE4DIFEVMFS>a @TJNVMBUF-BVODI'PS5BTL8JUI*EFOUJpFS!999>
#BDLHSPVOEΛͯ͠ ΑΓΑ͍ϢʔβମݧΛʂ