英文:
Ionic IOS app's Signal-R events are not updating (realtime) when the app moved to background?
问题
我正在开发基于短信的Ionic IOS应用。我们正在使用Signal-R事件来实时更新应用程序。在Android上,当应用程序打开时,甚至在后台时,应用程序会实时更新。但在IOS应用中,当应用程序在后台运行时,它不起作用。 (这是一个电容器离子应用)
可能是什么问题?
英文:
I'm developing an sms based Ionic IOS app. And we are using Signal-R events to update the app in real-time. In Android, the app is updating real-time when it's opened and even in the background. But in the IOS app, it's not working when the app is in the background.
(This is a capacitor ionic app)
What may be the issue?
答案1
得分: 2
你需要使用 Capacitor 后台任务插件。此外,确保阅读指南。Apple 目前允许在应用关闭后最多运行 30 秒的后台任务,因此时间很有限。
英文:
You need to use the Capacitor background task plugin. Also make sure to read the guidelines. Apple currently allows a maximum of 30 seconds after an app has closed to run any bg task, so you have minimal time.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论