简体   繁体   English

WhatsApp 网络客户端如何仍然使用最新的 iOS 更新(SDK 版本 13.0+)?

[英]How does the WhatsApp web client still work with the latest iOS update (SDK version 13.0+)?

Dark mode support was added to version 2.20.31 (released in March of 2020) of the WhatsApp client.暗模式支持已添加到 WhatsApp 客户端的 2.20.31 版(2020 年 3 月发布)中。 This is an iOS 13-only feature, and from the look & feel it appears to be a fully native implementation.这是一项仅限 iOS 13 的功能,从外观和感觉来看,它似乎是一个完全本机的实现。 I think it is safe to assume that the app is now being compiled with iOS SDK 13.0 or above.我认为可以安全地假设该应用程序现在正在使用 iOS SDK 13.0 或更高版本进行编译。

The thing is, as of iOS 13, Apple now requires the native call screen to be shown whenever a VoIP notification is received - otherwise, the app will not receive any further VoIP notifications.问题是,从 iOS 13 开始, Apple 现在要求在收到 VoIP 通知时显示本机呼叫屏幕- 否则,该应用程序将不会收到任何进一步的 VoIP 通知。 In previous version of iOS, some apps (including WhatsApp) appear to use "fake" incoming VoIP calls to silently wake up the app in background when the user attempted to use the web client, so that the latter could then connect and exchange data directly with the phone.在之前的 iOS 版本中,一些应用程序(包括 WhatsApp)似乎会在用户尝试使用 Web 客户端时使用“假”传入 VoIP 呼叫在后台静默唤醒应用程序,以便后者可以直接连接和交换数据用手机。

However, as of the latest version, the web client still appears to work as it did before despite the restriction introduced by Apple.但是,截至最新版本,尽管 Apple 引入了限制,但 Web 客户端似乎仍能像以前一样工作。 Using a debugger it is possible to observe the iOS app waking up whenever the user opens the web client on a PC, but no call screens are ever shown.使用调试器可以在用户在 PC 上打开 Web 客户端时观察到 iOS 应用程序唤醒,但从未显示呼叫屏幕。 This can be done repeatedly and as often as we want.这可以根据我们的需要反复进行。

The logs from WhatsApp seems to confirm what is written above : WhatsApp 的日志似乎证实了上面写的内容

default 17:09:44.515731+0000    callservicesd   Call source <CXXPCCallSource 0x111ecb0a0 identifier=UKFA9XBX6K.net.whatsapp.WhatsApp isConnected=1 processIdentifier=417 isPermittedToUsePublicAPI=1 isPermittedToUsePrivateAPI=0> registered with configuration <CXProviderConfiguration 0x111e9bb40 localizedName=‎WhatsApp ringtoneSoundURL=(null) iconTemplateImageData=0x0 maximumCallGroups=1 maximumCallsPerCallGroup=1 supportsAudioOnly=1 supportsVideo=1 supportsEmergency=0 supportsVoicemail=0 supportsCurrentPlatform=1 includesCallsInRecents=1 audioSessionID=1151157 supportedHandleTypes=2>

If we try to do this with our app, the results are quite different :如果我们尝试使用我们的应用程序执行此操作,结果会大不相同

error   18:56:19.949023+0000    callservicesd   Killing VoIP app com.xxxxx.xxxxx.xxxxx because it failed to post an incoming call in time.

Any idea what's going on here?知道这里发生了什么吗? Is WhatsApp using any sort of undocumented workaround or exploiting some sort of private API? WhatsApp 是否使用任何未公开的解决方法或利用某种私有 API?

This is WhatsApp latest entitlements file:这是 WhatsApp 最新的权利文件:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.developer.icloud-container-identifiers</key>
    <array>
        <string>57T9237FN3.net.whatsapp.WhatsApp</string>
    </array>
    <key>com.apple.developer.pushkit.unrestricted-voip</key>
    <true/>
    <key>com.apple.developer.ubiquity-container-identifiers</key>
    <array>
        <string>57T9237FN3.net.whatsapp.WhatsApp</string>
    </array>
    <key>application-identifier</key>
    <string>UKFA9XBX6K.net.whatsapp.WhatsApp</string>
    <key>com.apple.developer.carplay-messaging</key>
    <true/>
    <key>aps-environment</key>
    <string>production</string>
    <key>com.apple.developer.icloud-container-environment</key>
    <string>Production</string>
    <key>com.apple.developer.associated-domains</key>
    <array>
        <string>applinks:api.whatsapp.com</string>
        <string>applinks:v.whatsapp.com</string>
        <string>applinks:chat.whatsapp.com</string>
        <string>applinks:wa.me</string>
    </array>
    <key>com.apple.developer.siri</key>
    <true/>
    <key>com.apple.developer.team-identifier</key>
    <string>57T9237FN3</string>
    <key>com.apple.developer.icloud-services</key>
    <array>
        <string>CloudDocuments</string>
        <string>CloudKit</string>
    </array>
    <key>com.apple.security.application-groups</key>
    <array>
        <string>group.net.whatsapp.WhatsApp.shared</string>
        <string>group.com.facebook.family</string>
        <string>group.net.whatsapp.WhatsApp.private</string>
        <string>group.net.whatsapp.WhatsAppSMB.shared</string>
        <string>group.net.whatsapp.family</string>
    </array>
</dict>
</plist>

This specific entitlement seems to be the reason that they are allowed to not report an incoming call:这个特定的权利似乎是允许他们不报告来电的原因:

com.apple.developer.pushkit.unrestricted-voip

I can't find any documentation regarding this entitlement, so I'm pretty sure they have been given a special permission by Apple.我找不到有关此权利的任何文档,因此我很确定他们已获得 Apple 的特别许可。

I've asked eurodev support about this and just received:我已经就此询问了 eurodev 的支持,并且刚刚收到:

At this point we don't have any additional information about the unrestricted entitlement that you are asking about.目前,我们没有关于您所询问的不受限制的权利的任何其他信息。 The only information that's available is linked here.唯一可用的信息链接在这里。

https://developer.apple.com/documentation/bundleresources/entitlements https://developer.apple.com/documentation/bundleresources/entitlements

Pushing back to them to get more info.推回他们以获取更多信息。

Thanks.谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 更新到最新版本的 iOS SDK - Update to the latest version of the iOS SDK 考虑到操作系统在 30 秒内关闭应用程序,Whatsapp 的网络版本如何在 iOS 设备上运行? - How does the web version of Whatsapp work on iOS devices considering the OS shuts apps in 30 seconds? 将XCode 4更新到最新的IOS SDK - update XCode 4 to latest IOS SDK 在最新的 iOS 更新到 12.2 后,如何修复 iOS 主屏幕 Chrome 快捷方式中的“whatsapp://”协议点击中断? - How to fix the "whatsapp://" protocol click in iOS Homescreen Chrome Shortcut broken after latest iOS update to 12.2? Expo中如何更新iOS SDK版本 - How to Update iOS SDK Version in Expo 请将设备还原到下面列出的操作系统版本,或更新到最新版本的iOS SDK - Please restore the device to a version of the OS listed below, or update to the latest version of the iOS SDK Ionic-仅在IOS中无法发送whatsapp - Ionic - Sending a whatsapp does not work, only in IOS ViewController 未从 iOS 13.0 版本开始加载 - ViewController not loading from iOS 13.0 version onwards iOS - 提示用户更新到最新的应用版本 - iOS - Prompt User to Update to Latest App Version 如何确保最新版本的iOS模拟器版本? - How to ensure latest version of iOS Simulator Version?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM