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
130
Other Decks in Programming
See All in Programming
さようなら Date。 ようこそTemporal! 3年間先行利用して得られた知見の共有
8beeeaaat
3
1.4k
AWS発のAIエディタKiroを使ってみた
iriikeita
1
180
速いWebフレームワークを作る
yusukebe
5
1.7k
個人軟體時代
ethanhuang13
0
320
ファインディ株式会社におけるMCP活用とサービス開発
starfish719
0
900
Ruby Parser progress report 2025
yui_knk
1
440
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
意外と簡単!?フロントエンドでパスキー認証を実現する WebAuthn
teamlab
PRO
2
750
Design Foundational Data Engineering Observability
sucitw
3
200
Testing Trophyは叫ばない
toms74209200
0
870
機能追加とリーダー業務の類似性
rinchoku
2
1.3k
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.3k
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
231
18k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.1k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Making Projects Easy
brettharned
117
6.4k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Embracing the Ebb and Flow
colly
87
4.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
GraphQLとの向き合い方2022年版
quramy
49
14k
How GitHub (no longer) Works
holman
315
140k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
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