OGeek|极客世界-中国程序员成长平台

标题: iphone - 应用程序不活跃运行作业,怎么办? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 23:50
标题: iphone - 应用程序不活跃运行作业,怎么办?

大家好,我看到 google plus iphone 应用程序上传我的图像,而该应用程序没有处于事件状态或在后台完全关闭!我如何在我的应用程序中运行这样的进程



Best Answer-推荐答案


你错了。这不会发生。该应用程序会在您点击它时上传您的照片,并在使用主页按钮退出应用程序后在后台继续运行 10 分钟

- (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandlervoid (^)(void))handler

Google 甚至说 their instant upload FAQ 中会发生这种情况:

Note: Photos and videos will upload while the Google+ application is open and for a brief period of time afterwards.

你想要的,运行代码的能力

"without the app being active or in background it is closed completely!"

在 iOS 上是不可能的

关于iphone - 应用程序不活跃运行作业,怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13545512/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4