我正在尝试实现新的iOS7应用程序刷新功能,但我认为它不正常工作。
我添加到info.plist
必需的后台模式 - 应用程序从网络下载内容
在我的主视图控制器中,
UIApplicationDelegate
is set as delegateIn
Viewdidload
I put in[[UIApplication sharedApplication] setMinimumBackgroundFetchInterval:1.0];
I add the following method
- (void)application:(UIApplication *)application performFetchWithCompletionHandler: (void (^)(UIBackgroundFetchResult result))completionHandler { NSLog(@"Refresh from Background"); }
我插上我的iPhone并启动应用程序,然后进入“调试”->“模拟后台获取”
NSLog不会打印出来。(如果我的应用程序在前景中,它会将其放到后台)
谢谢!