$30 off During Our Annual Pro Sale. View Details »
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
CSC305 Lecture 17
javiergs
PRO
0
320
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
430
dotfiles 式年遷宮 令和最新版
masawada
1
710
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
340
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
310
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
190
関数実行の裏側では何が起きているのか?
minop1205
1
670
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
110
React Native New Architecture 移行実践報告
taminif
1
150
CSC509 Lecture 14
javiergs
PRO
0
220
TypeScript 5.9 で使えるようになった import defer でパフォーマンス最適化を実現する
bicstone
1
1.2k
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
290
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
Side Projects
sachag
455
43k
A better future with KSS
kneath
240
18k
Rails Girls Zürich Keynote
gr2m
95
14k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
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