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
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.6k
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
APNsからLive Activityを開始する話
yumnumm
0
180
Inertia Rails: The One-Person Framework with React & Friends
skryukov
0
120
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
200
Simple Storage Service(S3) is not simple
iwatsukayura
0
330
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
190
続・コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions-again
handlename
0
120
気持ちぃ〜角丸 Squircle
ryu1013
0
340
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1.3k
Seven New Principles of Software Engineering
yegor256
0
320
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
120
[2026-10-14](C)Re:ゼロから始める異世界生活〜始まりの終わりと終わりの始まり〜
tosite
0
160
JIS keyboard support in Omarchy
lef237
0
160
Featured
See All Featured
New Earth Scene 8
popppiees
4
2.7k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Everyday Curiosity
cassininazir
0
360
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
760
The Invisible Side of Design
smashingmag
301
52k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Ruling the World: When Life Gets Gamed
codingconduct
0
420
Why Our Code Smells
bkeepers
PRO
340
58k
Building AI with AI
inesmontani
PRO
1
1.3k
Designing for Timeless Needs
cassininazir
1
530
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
290
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
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Λͯ͠ ΑΓΑ͍ϢʔβମݧΛʂ