Commit Graph

16 Commits

Author SHA1 Message Date
Matthew Chen
4e88281dab "Bump build to 3.6.1.1." 2020-03-04 12:38:06 -03:00
Matthew Chen
4ee2c2d604 "Bump build to 3.6.1.0." 2020-03-04 09:50:48 -03:00
Matthew Chen
849f185747 "Bump build to 3.6.0.9." 2020-03-03 15:49:56 -03:00
Matthew Chen
673dd0fe41 "Bump build to 3.6.0.8." 2020-03-03 13:15:52 -03:00
Matthew Chen
3b60066191 "Bump build to 3.6.0.7." 2020-03-02 17:02:12 -03:00
Nora Trapp
9242870c09 "Bump build to 3.6.0.6." (Internal) 2020-02-28 17:52:52 -08:00
Matthew Chen
51c2367472 "Bump build to 3.6.0.5." 2020-02-27 17:48:32 -03:00
Matthew Chen
7f6aed3701 "Bump build to 3.6.0.4." 2020-02-25 09:49:11 -03:00
Matthew Chen
a5ef90663d "Bump build to 3.6.0.3." (Internal) 2020-02-25 09:25:48 -03:00
Matthew Chen
92f67999b6 "Bump build to 3.6.0.2." (Internal) 2020-02-25 09:25:43 -03:00
Matthew Chen
9f1483e038 "Bump build to 3.6.0.1." 2020-02-20 12:19:58 -03:00
Nora Trapp
f6216f3c4e PR Feedback 2020-01-30 11:45:11 -08:00
Nora Trapp
97d0ca1b0d Crash if we receive a message in the NSE before we intend to support it. 2020-01-30 11:45:11 -08:00
Nora Trapp
9e182e65f2 Handle received notifications while the app is running. 2020-01-30 11:44:42 -08:00
Nora Trapp
6437730084 Handle the fact that multiple notifications can be processed in the same instance of the NSE 2020-01-30 11:44:42 -08:00
Nora Trapp
88ac10de05 Notification Service Extension
The NSE should only run on iOS 13.3 or later where the "filtering" entitlement
is available since our notifications don't contain any content and will often
not trigger any user visible content. We control this by setting the deployment
target to iOS 13.3.

This does not handle calls as it's currently impossible to wake the main app or
launch CallKit from within the NSE. Should we reach a point where we need to use
this extension in production the service will need to be able to differentiate
between call and non-call messages and deliver them as VOIP or Vanilla pushes as
appropriate. Alternatively, Apple may introduce some way for us to signal the
main app that a call message has been received.

This does not currently address the potential for the NSE and the main app to be
running and trying to process messages at the same time. As long as the
websocket is connected and the main app is processing messages in a timely
fashion the NSE will never be called since the service will not send pushes for
these messages, but censorship circumvention users and users where the websocket
is disconnected for some reason will legitimately receive pushes and we will
want to process those messages. How we will handle these cases requires further
thought since just terminating the NSE when the app launches is not sufficient.
We could potentially do something like terminate the NSE everytime the main app
runs the message fetcher job which should only happen if either the user
pulls-to-refresh on the conversation list or the websocket is actively connected
and receiving messsages. I plan to address this in a follow-up pull request.

Currently this code will not ever be run since the service never sends vanilla
push notifications. Eventually we will need to add logic into the main app to:
a) detect we're on iOS 13.3 or later and b) update a flag on the service telling
it to stop using VOIP pushes for non-call messages. The API for requesting this
from the service does not yet exist.
2020-01-30 11:44:41 -08:00