解决方法
Apps that regularly update their content by contacting a server can
register with the system and be launched periodically to retrieve that
content in the background. To register,include the @H_404_10@UIBackgroundModes
key with the @H_404_10@fetch value in your app’s @H_404_10@Info.plist file. Then,when
your app is launched,call the @H_404_10@setMinimumBackgroundFetchInterval:
method to determine how often it receives update messages. Finally,
you must also implement the
@H_404_10@application:performFetchWithCompletionHandler: method in your app
delegate.
在内部,application:performFetchWithCompletionHandler:
,在你必须调用completionHandler之前,总共需要30秒才能完成你需要做的事情.绝对建议尽快执行您的民意调查,并在完成执行后立即调用completionHandler.如果您未在指定的30秒内调用它,您的应用将暂停从后台获取.或者,如果您开始花费很长时间进行每次提取,那么您的应用将来获得后台提取的机会将会减少.
Apps that use push notifications to notify the user that new content
is available can fetch the content in the background. To support this
mode,include the @H_404_10@UIBackgroundModes key with the @H_404_10@remote-notification
value in your app’s @H_404_10@Info.plist file. You must also implement the
@H_404_10@application:didReceiveRemoteNotification:fetchCompletionHandler: method in your app delegate.