Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
240
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
160
Activity View Controller (CocoaHeads Lyon octobre 2013)
vtourraine
0
130
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
320
認証・認可の基本を学ぼう後編
kouyuume
0
250
SwiftUIで本格音ゲー実装してみた
hypebeans
0
490
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3k
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
3.8k
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.3k
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
290
Grafana:建立系統全知視角的捷徑
blueswen
0
190
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
890
マスタデータ問題、マイクロサービスでどう解くか
kts
0
120
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
0
270
GISエンジニアから見たLINKSデータ
nokonoko1203
0
180
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
34
Digital Ethics as a Driver of Design Innovation
axbom
PRO
0
130
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
0
22
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Un-Boring Meetings
codingconduct
0
160
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Git: the NoSQL Database
bkeepers
PRO
432
66k
How to build a perfect <img>
jonoalderson
0
4.7k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.3k
What does AI have to do with Human Rights?
axbom
PRO
0
1.9k
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