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 octobre 2013)
Search
Vincent Tourraine
October 11, 2013
Programming
0
200
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
110
Other Decks in Programming
See All in Programming
実用的かつリーズナブルな 「Azure × Gemini × LINE」~キャラクターBot 実装ライブデモ~
tomodo_ysys
1
170
継続的な活動で築く地方エンジニアの道
myamashii
2
360
AWS CDKにおける「再利用性」を考える / aws-cdk-reusability
gotok365
6
1.3k
CSC307 Lecture 07
javiergs
PRO
0
220
DynamoDB コスト最適化っぽいことの基本 with Terraform
kuro_kurorrr
2
250
開発部に不満を持っていたCSがエンジニアにジョブチェンしてわかった「勝手に諦めない」ことの大切さ
sakuraikotone
28
16k
Harnessing Large Language Models for Training-free Video Anomaly Detection
tereka114
1
1.3k
企業向け生成AIアプリの 開発から得られた知見
takaakikakei
0
310
SDCon2024: Enabling DevOps and Team Topologies thru architecture: architecting for fast flow
cer
PRO
0
780
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
140
CSC307 Lecture 05
javiergs
PRO
0
210
入社1ヶ月でここまでやった!Findy Toolsインフラ支援の最適化
rvirus0817
6
1.4k
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
VelocityConf: Rendering Performance Case Studies
addyosmani
321
23k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
228
16k
Designing for Performance
lara
604
67k
Automating Front-end Workflow
addyosmani
1362
200k
YesSQL, Process and Tooling at Scale
rocio
166
14k
Clear Off the Table
cherdarchuk
89
320k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
245
1.2M
Building Better People: How to give real-time feedback that sticks.
wjessup
357
18k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
23
1.9k
Principles of Awesome APIs and How to Build Them.
keavy
124
16k
Navigating Team Friction
lara
181
13k
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