How can WhatsApp encrypt Push Notifications on iOS? [closed]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-09 00:20:52

问题


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!


回答1:


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)



来源:https://stackoverflow.com/questions/36451413/how-can-whatsapp-encrypt-push-notifications-on-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!