Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在实现 ios 应用程序,它需要在后台状态下每 10 秒发送一次 GET 请求。请给我一个提示如何实现这个选项。
这在 iOS 上是不可能的。无法保证操作系统会每 10 秒授予您一次后台时间来执行某项操作。
您应该阅读有关背景模式的信息。
https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html