Commit Graph

213 Commits

Author SHA1 Message Date
Matthew Chen
c0c72ef3fb Introduce WebSocketFactory. 2021-11-03 19:48:48 -07:00
Matthew Chen
539dff09e4 Move MobileCoin SDK to SignalUI. 2021-11-02 14:26:03 -03:00
Michelle Linington
77b7ea5c40 Fix a whole bunch of warnings 2021-10-21 21:11:26 -07:00
Matthew Chen
05940be99d Respond to CR. 2021-10-19 09:40:26 -03:00
Matthew Chen
c416609108 Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
Matthew Chen
b9b66646ff Add SignalUI framework target. 2021-10-19 09:39:52 -03:00
Matthew Chen
d402636225 Simplify AFNetworking usage. 2021-10-15 10:50:35 -03:00
Nora Trapp
2814ab7629 Convert to new Promise library 2021-09-03 11:41:34 -07:00
Artem Varaksa
7378eff81d Allow sharing items with UTI com.apple.pkpass. 2021-08-18 15:26:26 -07:00
Matthew Chen
4b77df38fa Refine names. 2021-08-18 15:01:04 -03:00
Matthew Chen
d51213a8f5 Refine error localizedDescription. 2021-08-18 15:01:04 -03:00
Matthew Chen
fcdca12cf5 Deprecate REST, Part 1
* Port socket manager to Swift.
* Clean up HTTP request success/failure state & errors.
* Rework network manager.
* Rework HTTP errors.
* Rework errors "properties": isRetryable, etc.
* Fix test breakage.
2021-08-18 14:25:36 -03:00
Nora Trapp
fdccbd71a6 Allow image quality selection 2021-07-22 13:57:25 -07:00
Nora Trapp
1845834dc9 Show error when you try and share too many photos 2021-04-13 08:50:57 -07:00
Nora Trapp
4e535fa7ef Make database recovery async 2021-04-01 12:50:41 -07:00
Nora Trapp
c40a786050 Fix extensions in post YDB world 2021-03-27 12:13:20 -07:00
Matthew Chen
86b8eb08b8 Remove YapDatabase.
Apply asset from design.

Fix rebase breakage.
2021-03-25 11:41:16 -03:00
Matthew Chen
b4aa2aa1c3 Clean up app readiness. 2021-03-25 09:36:16 -03:00
Matthew Chen
d0cbf8cfd0 Rework dependency access. 2021-03-25 09:24:27 -03:00
Nora Trapp
3669066e42 Begone OWSBatchMessageProcessor 2021-02-23 10:45:50 -08:00
Nora Trapp
91d2953843 Begone OWSMessageReceiver 2021-02-23 10:45:50 -08:00
Matthew Chen
645bd76bd5 Rework app readiness. 2021-02-04 09:55:39 -03:00
Matthew Chen
23dc0f021c Avoid OOM crashes in SAE. 2021-01-22 23:22:43 -03:00
Matthew Chen
0931081de1 Avoid OOM crashes in SAE. 2021-01-22 23:22:43 -03:00
Matthew Chen
fdaff8918e Disable system contact fetches in SAE. 2021-01-22 23:22:43 -03:00
Nora Trapp
7230dabbc8 Add support for sharing suggestions 2021-01-21 20:00:29 -08:00
Nora Trapp
c073d8e204 Speed up presentation of conversation picker, eliminate 'loading' state 2021-01-21 20:00:29 -08:00
Jordan Rose
c799f663c8 Always re-encode video attachments
This is more consistent, results in smaller videos, and makes sure
we're stripping metadata.
2021-01-12 16:43:01 -08:00
Nora Trapp
08baf57151 Allow sharing to multiple threads 2021-01-12 15:33:54 -08:00
Nora Trapp
81b3b5552b Fix sharing of heic images taken on iPhone 12 Pro 2020-11-06 20:04:34 -03:00
Fumiaki Yoshimatsu
3afd472829 Accepts PDF data from Sarari to share to Signal. Fixes #4377 2020-09-23 14:54:23 -07:00
Matthew Chen
239fbbc8ba DRY singleton accessors. 2020-09-17 21:13:14 -03:00
Matthew Chen
ad6bda8a44 Rename singleton accessors. 2020-09-17 21:11:07 -03:00
Matthew Chen
137114ac2d Fix races in share extension completion. 2020-08-13 12:40:33 -03:00
Matthew Chen
02e812deef Tweak readiness checking. 2020-07-08 15:02:14 -03:00
Matthew Chen
c3a9daf224 Recover off main thread. 2020-06-07 11:45:07 -03:00
Matthew Chen
6b4f192b1b Remove usage of retainUntilComplete. 2020-05-22 09:51:12 -03:00
Matthew Chen
16bf7288f5 Tweak SAE's 'dismiss in background' behavior. 2020-04-08 10:08:42 -03:00
Michael Kirk
f198d9037d Merge tag '3.5.0.5' 2020-02-19 19:26:05 -07:00
Michael Kirk
2560b05f32 suppress some actions until onboarded 2020-02-18 18:39:15 -07:00
Nora Trapp
e43140a5c2 Fix sharing of URLs. 2020-01-30 20:13:17 -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
Matthew Chen
2734f01dcd Merge tag '3.3.0.5' 2020-01-27 12:00:09 -03:00
Nora Trapp
f522313198 Fix sharing of URLs. 2020-01-25 14:13:19 -08:00
Matthew Chen
26ecb2b371 Rewrite queue to process incoming group v2 messages. 2020-01-23 12:00:42 -03:00
Michael Kirk
f8aabeea76 FIX: can't share from screenshot app
fall back to UIImage provider if URL provider is not available
2020-01-22 07:55:15 -07:00
Michael Kirk
cce628a069 fixup! Merge branch 'mkirk/pdf-share' 2020-01-14 09:24:06 -07:00
Michael Kirk
1ac44de0d5 FIX: some PDF's fail to share
Some PDF shares (and presumably other files) were not shareable due to a failure to convert.

The root of this is that the behavior of
NSItemProvider.loadItemForTypeIdentifier(_:,options:,completionHandler:)
depends on the signature of the completion handler.

The documented signature of the completion handler is: (NSSecureCoding, NSError) -> Void

For example, if you want an NSURL back, it's expected that you'll pass in a
`(NSUrl, NSError)` block, or if you want a Data you'll pass in a `(NSData, NSError)`.

However, that's not possible with Swift strict typing. The type of the block must match.

```
loadItmForTypeIdentifier('myType', nilOptions) { loadedItem, error in

}
```

The type of `loadedItem` is SecureCoding. What we were seeing is that we were
getting returned to us unexpected classes, e.g. private iOS internal classes
like "_NSSandboxedDocument", which indeed do conform to NSSecureCoding.

Instead, we should cut with the grain of the existing API design and request
the exact type of object we want. We do this is ObjC, since this isn't possible in swift,
and provide some bespoke Swift wrappers.

Doing this requires tracking some information about the itemprovider, and
funneling that through the extensionItem -> SignalAttachment process.
2020-01-14 09:21:04 -07:00
Michael Kirk
901bb83a39 FIX: all file attachments labeled Contact.vcf 2020-01-14 09:21:04 -07:00
Matthew Chen
663e015d77 Tweak order of share extensions launch checks. 2020-01-02 12:12:18 -08:00