考虑到操作系统在30秒内关闭应用程序,Whatsapp的Web版本如何在iOS设备上运行? [英] How does the web version of Whatsapp work on iOS devices considering the OS shuts apps in 30 seconds?

查看:129
本文介绍了考虑到操作系统在30秒内关闭应用程序,Whatsapp的Web版本如何在iOS设备上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在对于那些不知道的人,可以去 https://web.whatsapp.com/ 并同步你的 Whatsapp 聊天通过交换二维码并通过应用程序的网络扩展聊天。

Now for those who don't know, can go to https://web.whatsapp.com/ and sync your Whatsapp chats by exchanging a QR code and chat via the web extension of the app.

我对如何他们有初步握手(可能与whatsapp服务器通信),也没有如何快速同步数据进行聊天(可能是直接从设备到客户端使用Open套接字)。

I am not interested in how they have an initial handshake( might be communicating with whatsapp servers) nor how they sync data so fast for chatting (might be using Open sockets directly from device to client).

我很好奇应用程序如何在iOS背景中运行。 AFAIK运行后台意图服务非常简单。但不适用于iOS。应用程序正常关闭后,iOS最多只允许30秒。

I am curious as to how the app works in Background on iOS . AFAIK running a background Intent Service is pretty simple. But not for iOS. iOS allows only up to 30 seconds after the app is shut down normally.

1)我试过崩溃应用程序(向上滑动)(网络版仍然正常运行)

1) I tried crashing the App(swipe up) (Still the web version was running normally)

2)我禁用后台应用刷新网页版本没有停止。

2) I disabled Background App refresh the web version didn't stop.

3)甚至禁用通知网络版仍然正常工作。

3) Even disable Notifications still the web version worked normally.

4)他们也没有蓝条喜欢 Google地图为您提供指示应用程序在BG中运行的指示

4) As well they do not have a Blue bar the likes when Google Maps is giving you directions that indicates the app is running in BG

5)他们是否使用Dummy Geo Fencing 让它们保持活力? (但是这也需要BG App Refresh)

5) Are they using Dummy Geo Fencing to keep them alive? (but that d require BG App Refresh too)

是否引入了iOS 8上的一些新功能,我不知道

Is it some new feature on iOS 8 that was introduced and I am not aware of

推荐答案

正如附注中所述,Apple在iOS 10中引入了Notification Service扩展点,可用于实现此目的。以下内容仅适用于iOS 9.x或更早版本。

Just as a side note, Apple introduced the Notification Service extension point in iOS 10, which can be used to achieve this. The following applies only to iOS 9.x or earlier.

iOS中的应用程序无法在后台运行保持活动套接字或
保证通过远程通知唤醒,但使用VoIP后台模式(OT:和IIRC蓝牙背景模式)除外。

No app in iOS can be long alive in background with a keep-alive socket, or guaranteed to wake by remote notifications except those using VoIP background mode (OT: and IIRC Bluetooth background modes).


  • 除非为任何后台模式或任务注册,否则应用程序在放入后台后的 applicationDidEnterBackground:上只有约5秒的运行时间。如果该委托方法的时间不足,该应用程序将被终止。

  • @xoail提到的后台任务模型具有特定于应用程序的系统限制时间限制(最多30个)秒......?)并且无法延长。应用程序可以完成当前的工作,例如在暂停之前上传媒体。自iOS 7.0以来,后台传输服务是长时间运行文件传输的替代方案。

  • 观察到静音远程通知仅在充电器和Wi-Fi上一致触发,但始终受到iOS的限制除此以外。所以它有点不确定 - 更不用说通过翻转应用程序的后台应用程序刷新开关可以关闭它。

  • VoIP后台模式(在iOS 8及更高版本中)保证可以调用从APN收到VoIP通知时应用程序的处理程序。但App App指南明确规定,背景模式只应用于其预期目的。

  • An app has only ~5 seconds of runtime on applicationDidEnterBackground: after being put in background, unless it is registered for any background modes or tasks. The app would be terminated if it runs out of time in this delegate method.
  • The background task model mentioned by @xoail has a app-specific, system-imposed time limit (up to 30 seconds...?) and cannot be extended. It is for an app to complete its current work, e.g. uploading a media, before being suspended. Background Transfer Service, since iOS 7.0, is an alternative for long running file transfer.
  • Silent Remote Notificaiton is observed to be triggered consistently only on charger and Wi-Fi, but always throttled by iOS otherwise. So it is sort of indeterministic - let alone the fact that this can be switched off by flipping the app's Background App Refresh switch.
  • VoIP background mode (in iOS 8 and later) guarantees to call the app's handler when a VoIP notification is received from APNs. But App Review Guidelines states clearly that background modes should only be used for their intended purpose.

因此,苹果放弃WhatsApp使用VoIP除WhatsApp Call之外的其他目的的背景模式,或WhatsApp恰好远离使用你的手机同步架构,并为iPhone做了新的事情。

So either Apple waives WhatsApp the use of VoIP background mode for purpose other than WhatsApp Call, or WhatsApp happens to get away from the "use your phone to sync" architecture and does something new for the iPhones.

这篇关于考虑到操作系统在30秒内关闭应用程序,Whatsapp的Web版本如何在iOS设备上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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