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
220
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
もう一人で悩まない! 個の知見をチームの知見にする3つの習慣と工夫 / Into team knowledge.
honyanya
2
200
Rubyと自由とAIと
yotii23
6
1.9k
バイセルでの AI を用いた開発の取り組み ~ Devin, Cursor の活用事例・知見共有 ~
umaidashi
0
130
はじめての Go * WASM * OCR
sgash708
1
130
運用しながらリアーキテクチャ
nealle
0
240
バッチを作らなきゃとなったときに考えること
irof
2
570
Jakarta EE meets AI
ivargrimstad
0
900
「個人開発マネタイズ大全」が教えてくれたこと
bani24884
1
320
推しメソッドsource_locationのしくみを探る - はじめてRubyのコードを読んでみた
nobu09
2
370
Devin入門 〜月500ドルから始まるAIチームメイトとの開発生活〜 / Introduction Devin 〜Development With AI Teammates〜
rkaga
5
1.6k
Djangoにおける複数ユーザー種別認証の設計アプローチ@DjangoCongress JP 2025
delhi09
PRO
4
520
Rails 1.0 のコードで学ぶ find_by* と method_missing の仕組み / Learn how find_by_* and method_missing work in Rails 1.0 code
maimux2x
1
280
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Statistics for Hackers
jakevdp
797
220k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
11
560
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Six Lessons from altMBA
skipperchong
27
3.6k
The Invisible Side of Design
smashingmag
299
50k
Faster Mobile Websites
deanohume
306
31k
GraphQLとの向き合い方2022年版
quramy
44
14k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
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