WhatsApp 如何在 iOS 上加密推送通知? [英] How can WhatsApp encrypt Push Notifications on iOS?
问题描述
最近 WhatsApp
Recently WhatsApp integrated the Signal protocol for End-to-End Encryption for all platforms.
I tried it with a friend and it said that the encryption was activated. With the app closed and background tasks disabled on iOS 8, the push notifications from my friend still showed the message.
Question: Does WhatsApp encrypt the APNS message? If yes, how do they display the text? Is there a method on iOS for processing push notifications?
Thanks in advance!
WhatsApp could be using VoIP background mode along with PushKit for solving this problem.
VoIP pushes are:
- delivered directly to the app.
- considered high-priority notifications and are delivered without delay.
- delivered even if the app was force-quit by the user.
For details refer to Voice Over IP (VoIP) Best Practices
Once the encrypted payload of VoIP push is decrypted they show a "Local Notification" with the decrypted message.
There is one small issue though, PushKit is available only on iOS 8 and later. So, how is Whatsapp doing it for earlier versions of iOS? Well, it isn’t. They don’t allow you to see message preview in notifications on versions earlier that iOS 8 (Verified it on iOS 7, see screenshot)
这篇关于WhatsApp 如何在 iOS 上加密推送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!