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
iOS 7 - Background Fetching (CocoaHeads Lyon oc...
Search
Vincent Tourraine
October 11, 2013
Programming
0
230
iOS 7 - Background Fetching (CocoaHeads Lyon octobre 2013)
Billet de blog associé :
http://www.vtourraine.net/blog/ios-7-background-fetching
Vincent Tourraine
October 11, 2013
Tweet
Share
More Decks by Vincent Tourraine
See All by Vincent Tourraine
iOS 7 - View Controllers Custom Transitions (CocoaHeads Lyon avril 2014)
vtourraine
0
150
Activity View Controller (CocoaHeads Lyon octobre 2013)
vtourraine
0
130
Other Decks in Programming
See All in Programming
Introduce Hono CLI
yusukebe
6
3.3k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
670
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
18
9.4k
CSC509 Lecture 11
javiergs
PRO
0
280
NIKKEI Tech Talk#38
cipepser
0
350
開発組織の戦略的な役割と 設計スキル向上の効果
masuda220
PRO
10
2k
業務でAIを使いたい話
hnw
0
220
Vueのバリデーション、結局どれを選べばいい? ― 自作バリデーションの限界と、脱却までの道のり ― / Which Vue Validation Library Should We Really Use? The Limits of Self-Made Validation and How I Finally Moved On
neginasu
3
1.8k
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
5.9k
iOSでSVG画像を扱う
kishikawakatsumi
0
180
Dive into Triton Internals
appleparan
0
400
Migration to Signals, Resource API, and NgRx Signal Store
manfredsteyer
PRO
0
140
Featured
See All Featured
Optimizing for Happiness
mojombo
379
70k
Bash Introduction
62gerente
615
210k
BBQ
matthewcrist
89
9.9k
Designing for Performance
lara
610
69k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
8k
Keith and Marios Guide to Fast Websites
keithpitt
412
23k
Facilitating Awesome Meetings
lara
57
6.6k
Automating Front-end Workflow
addyosmani
1371
200k
Into the Great Unknown - MozCon
thekraken
40
2.1k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
2
240
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
Transcript
Background Fetching CocoaHeads Lyon - octobre 2013 Vincent Tourraine -
shazino
Pour quoi faire ? ➡ Télécharger des nouvelles données sans
ouvrir l’application ➡ Exécution régulière en tâche de fond
Mise en place
Configuration du projet
Info.plist <key>UIBackgroundModes</key> <array> <string>fetch</string> </array>
Définir l’intervalle - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [application setMinimumBackgroundFetchInterval:
UIApplicationBackgroundFetchIntervalMinimum]; // ... }
Appel en tâche de fond - (void)application:(UIApplication *)application performFetchWithCompletionHandler: (void
(^)(UIBackgroundFetchResult))completionHandler { [self.manager GET:@"http://example.com/resources.json" parameters:nil success:^(id operation, id responseObject) { completionHandler(UIBackgroundFetchResultNewData); } failure:^(id operation, NSError *error) { completionHandler(UIBackgroundFetchResultFailed); }]; }
Debug
Configuration du scheme
Plus d’infos • UIApplication Class Reference https://developer.apple.com/library/ios/documentation/uikit/reference/ UIApplication_Class/Reference/Reference.html • UIApplicationDelegate
Protocol Reference https://developer.apple.com/library/ios/documentation/uikit/reference/ UIApplicationDelegate_Protocol/Reference/Reference.html