Schedule blob deletion on iOS
Summary:
This differential implements blob deletion on iOS. NSE runs in separate process that has constrained execution time so low-priority deferable networking should not be executed there. Therefore NSE persists blob metadata in a
TemporaryMessageStorage. Then the main app reads the storage on its start and issues delete requests. All happens on a background thread so no UI operation is blocked.
Test Plan:
- Build iOS app connected to locally running blob service.
- Send a couple of large notifications.
- Kill the app.
- Open it and ensure that for each notifications there is a corresponding DELETE request. It can be done either using local instance of blob service or by adding a log statement to successHandler argument to deleteBlobAsyncWithHash.
Additionally:
- Add line that logs blob holder when deletion is scheduled.
- Deploy the app to two different iOS devices and send large notification.
- Open the app on each device and using console app ensure that each of them logs different holder.
Reviewers: tomek, bartek, atul
Reviewed By: tomek
Subscribers: kamil, michal, ashoat
Differential Revision: https://phab.comm.dev/D9091