gpt4 book ai didi

ios - 后台获取在 iOS 中执行的频率是多少?

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:58:55 24 4
gpt4 key购买 nike

在 iOS 7 中,当应用程序不在最前面时,支持后台获取模式以获取数据:

When it is convenient to do so, the system launches or resumes the app in the background and gives it a small amount of time to download any new content.

我的问题是:后台获取代码多久执行一次?

如果我设置最小间隔:

[[UIApplication sharedApplication] setMinimumBackgroundFetchInterval:10];

它是每 10 秒执行一次,还是一天执行一次?一般来说,我应该期望什么样的间隔?

最佳答案

您无法知道频率,这取决于用户使用模式、设备电池以及 Apple 算法中的其他任何内容......

minimumBackgroundFetchInterval 可用于指定您的应用不需要如此频繁地运行提取,它不会使提取更频繁地发生。您在 UIApplicationBackgroundFetchIntervalMinimum 中也有可能的最小值,如果您希望后台获取尽可能频繁地运行(但仍然不能保证它实际运行的频率),您可以使用它。

关于ios - 后台获取在 iOS 中执行的频率是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29147990/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com