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
120
Other Decks in Programming
See All in Programming
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
190
技術同人誌をMCP Serverにしてみた
74th
0
280
第9回 情シス転職ミートアップ 株式会社IVRy(アイブリー)の紹介
ivry_presentationmaterials
1
230
Java on Azure で LangGraph!
kohei3110
0
170
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
1.2k
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
800
Is Xcode slowly dying out in 2025?
uetyo
1
190
エラーって何種類あるの?
kajitack
5
300
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
810
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
210
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
980
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
470
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
693
190k
Practical Orchestrator
shlominoach
188
11k
How to Ace a Technical Interview
jacobian
277
23k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
33
5.9k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Six Lessons from altMBA
skipperchong
28
3.8k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Thoughts on Productivity
jonyablonski
69
4.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
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