iOS 13安排iOS后台任务 [英] iOS 13 Schedule iOS background tasks

查看:256
本文介绍了iOS 13安排iOS后台任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实现BackgroundTasks框架来更新数据.但是我遇到了以下问题

I am implementing BackgroundTasks Framework for updating the data. But I got the below issue

Could not schedule refreshApp: Error Domain=BGTaskSchedulerErrorDomain Code=1 "(null)"
Could not schedule data featch: Error Domain=BGTaskSchedulerErrorDomain Code=1 "(null)"
2019-10-01 19:19:32.550320+0530 SOBackgroundTask[34131:1129470] Can't end BackgroundTask: no background task exists with identifier 3 (0x3), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.

推荐答案

解决方案是在设备上运行.我在模拟器上运行.但是,这表明在模拟器上运行时,已在设置"中启用了后台应用刷新".

The solution is to run on a device. I was running on simulator. However, It was showing Background App Refresh has been enable in Settings while running on simulator.

这篇关于iOS 13安排iOS后台任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆