Commit graph

236 commits

Author SHA1 Message Date
Matthew Chen
944cd7beef Show app update nag on launch if necessary.
// FREEBIE
2017-07-06 12:56:27 -04:00
Michael Kirk
8e891eb357 Merge branch 'hotfix/2.13.3.0'
// FREEBIE
2017-07-06 09:33:57 -05:00
Matthew Chen
c5bf85d0b3 Respond to CR.
// FREEBIE
2017-07-05 18:49:02 -04:00
Matthew Chen
ab3aa9d0ce Respond to CR.
// FREEBIE
2017-07-05 18:12:06 -04:00
Matthew Chen
97169f521a Move more initialization until after didBecomeActive is complete to avoid the “bad food” crash.
// FREEBIE
2017-07-05 17:54:22 -04:00
Michael Kirk
89260e843f Unregistered users should have 0 badge count
// FREEBIE
2017-07-05 11:34:23 -05:00
Michael Kirk
a933fbf215 sync verifications with contact syncing
// FREEBIE
2017-06-22 15:21:25 -04:00
Matthew Chen
0738568b94 Fix upgrade launch screen.
// FREEBIE
2017-06-20 17:48:11 -04:00
Matthew Chen
5ae4b99f89 Refine observation of async registration completion.
// FREEBIE
2017-06-20 13:17:44 -04:00
Matthew Chen
9f2a2d1ee6 Don’t show “export with Signal” UI until async database view registration is complete.
// FREEBIE
2017-06-19 17:38:09 -04:00
Matthew Chen
3e38967590 Do not show database upgrade screen for unregistered users.
// FREEBIE
2017-06-16 12:07:15 -04:00
Matthew Chen
f9fcbad1aa Add a “last app completed launch” version.
// FREEBIE
2017-06-16 12:07:15 -04:00
Matthew Chen
cf3101226b Improve the upgrade screen.
// FREEBIE
2017-06-16 12:06:53 -04:00
Matthew Chen
16dd87a407 Use launch screen as root view controller while database views are loading.
// FREEBIE
2017-06-15 17:15:56 -04:00
Matthew Chen
c7426f9343 Avoid crashing on startup due to database view creation.
* Substitute unread view for unseen view until unseen view is ready.
* Register as many views as possible async.
* Perform blocking, safe migrations before async registration of views.
* Add debug settings view for internal app stats.
* Show blocking overlay until async registration of database views is complete.
* Convert version migrations to use AppVersions.

// FREEBIE
2017-06-15 13:44:30 -04:00
Matthew Chen
05e316381b Remove “block on safety number changes” setting in preferences.
// FREEBIE
2017-06-14 14:36:21 -04:00
Matthew Chen
3a83f93099 Tweak appearance of registration views.
// FREEBIE
2017-05-30 09:29:19 -04:00
Matthew Chen
d065c95270 Hide the socket status view when censorship circumvention is active.
// FREEBIE
2017-05-26 20:41:27 -04:00
Michael Kirk
2c7ccbe5db Make sure screen protection is applied before ending bg task
* code cleanup
* Prefer dispatch_async vs. dispatch_sync when possible

// FREEBIE
2017-05-26 09:45:51 -07:00
Michael Kirk
bb25d2beb6 IdentityKeyStore changes
1) Always accept keys from incoming messages

2) Block sending only if it's a recent change, or if always
   block is enabled

// FREEBIE

// FREEBIE
2017-05-24 18:01:24 -07:00
Matthew Chen
2475406258 Respond to CR.
// FREEBIE
2017-05-24 17:47:56 -04:00
Matthew Chen
4680a2465a Remove registration storyboard.
// FREEBIE
2017-05-24 17:46:32 -04:00
Michael Kirk
929ba06263 Merge branch 'hotfix/2.11.4' into mkirk/fix-push-sync-job 2017-05-10 16:56:41 -04:00
Matthew Chen
19b80d1f4b Rework the “disappearing messages” logic.
// FREEBIE
2017-05-10 15:02:16 -04:00
Matthew Chen
b2fba060d8 Fix edge case where screen protection is not removed.
// FREEBIE
2017-05-10 09:39:33 -04:00
Matthew Chen
2cffe78c22 Sync push tokens to service after every app upgrade.
// FREEBIE
2017-05-09 15:58:40 -04:00
Matthew Chen
73db16e068 Improve logging around push token sync.
// FREEBIE
2017-05-09 11:24:09 -04:00
Matthew Chen
2f3831e04b Respond to CR.
// FREEBIE
2017-05-09 10:45:20 -04:00
Matthew Chen
dd3d63623a Pull logging into SyncPushTokensJob.
// FREEBIE
2017-05-09 10:11:19 -04:00
Matthew Chen
aba29ac5ce Improve logging around SyncPushTokensJob.
// FREEBIE
2017-05-08 17:01:50 -04:00
Matthew Chen
b47337c0ba Respond to CR.
// FREEBIE
2017-05-08 14:24:32 -04:00
Michael Kirk
b24cf29189 don't request contacts until necessary
Most commonly this will be after hitting the "compose" button

But also we'll do it in the SignalViewController once you've received a
message.

- get rid blocking contacts nag
- use Contacts framework simplifies logic
- remove dead AB code

// FREEBIE
2017-05-04 09:47:04 -04:00
Matthew Chen
61f59067b6 Improve contact-related views.
* Add support for contacts with more than one Signal account using ContactAccount class.
* Use OWSTableViewController in contact-related views.
* Let users add non-contacts to groups.
* Improve the "new group" and "edit group" views.
* Add utility methods for displaying alerts.
* Warn users before discarding unsaved changes in "edit group" view.
* Pull out "contact view helper" to de-duplicate common logic among contact-related views.
* Pull out "group view helper" to de-duplicate common logic among group-related views.
* Pull out new base class for view used to add accounts to groups or the block list.

// FREEBIE
2017-05-02 09:28:02 -04:00
Michael Kirk
48971478dd Allow importing of any file that's not a directory
// FREEBIE
2017-04-27 10:13:26 -04:00
Michael Kirk
1b61c3b0ce fix attachment-import error alert presentation
// FREEBIE
2017-04-27 10:00:41 -04:00
Matthew Chen
2cc3232c01 Fix presentation of “open with Signal” errors.
// FREEBIE
2017-04-27 09:42:30 -04:00
Matthew Chen
c08e6e0fc6 Ignore “open with Signal” if there is an ongoing call.
// FREEBIE
2017-04-27 09:39:45 -04:00
Matthew Chen
791fee347b Improve errors in the 'export with Signal' feature.
// FREEBIE
2017-04-27 09:14:41 -04:00
Matthew Chen
6e36ce97a5 Let users share imported files to a thread or contact of their choice.
// FREEBIE
2017-04-26 13:29:56 -04:00
Matthew Chen
3c7574a908 Register Signal to handle a wide variety of common document types.
// FREEBIE
2017-04-26 13:29:43 -04:00
Matthew Chen
bfd29cd994 Send contacts sync messages whenever the contacts change.
// FREEBIE
2017-04-19 10:25:33 -04:00
Michael Kirk
fa5bb7ad9d Make it easier to track local users registration ID in debug log
// FREEBIE
2017-04-14 11:08:06 -04:00
Matthew Chen
625a448901 Respond to CR.
// FREEBIE
2017-04-12 11:59:45 -04:00
Matthew Chen
effa885614 Rework socket manager.
// FREEBIE
2017-04-12 11:59:45 -04:00
Michael Kirk
398ee22f50 [SSK] rename cipher queue to sessionStoreQueue
// FREEBIE
2017-04-06 21:06:13 -04:00
Michael Kirk
7f239c8040 [SSK] + Enforce singleton access for MessagesManager and MessageSender
// FREEBIE
2017-03-31 10:41:46 -04:00
Michael Kirk
0b49037179 Remove some more RP related code
// FREEBIE
2017-03-30 11:00:28 -04:00
Matthew Chen
3cb02fcd60 Improve handling of incomplete and failed attachment downloads.
// FREEBIE
2017-03-29 12:36:40 -04:00
Matthew Chen
9db33a9651 Remove RedPhone code.
// FREEBIE
2017-03-29 12:25:33 -04:00
Michael Kirk
8adba61b37 intern Pastelog back into Signal.
Not worth the cocaopods/framework/project mgmt machinery for making
changes to 1 class.

// FREEBIE
2017-03-17 17:37:32 -04:00
Matthew Chen
15e14a9b5c Convert "is logging enabled" methods to class methods so that they can safely be used before Environment has been initialized.
// FREEBIE
2017-03-13 10:33:58 -03:00
Matthew Chen
01d2582074 Add and honor the “CallKit Privacy” setting.
// FREEBIE
2017-02-24 23:01:09 -05:00
Matthew Chen
165e5238cf Simplify the prekey check on app launch and activation.
// FREEBIE
2017-02-21 09:26:53 -05:00
Matthew Chen
2fb89ae8b4 Merge remote-tracking branch 'origin/release/2.7.1'
// FREEBIE
2017-02-17 12:40:08 -05:00
Matthew Chen
c7d08fba46 Avoid checking prekeys twice on app launch.
// FREEBIE
2017-02-14 17:42:22 -05:00
Matthew Chen
49ba0ff942 Flush logs before exiting the app.
// FREEBIE
2017-02-14 13:53:32 -05:00
Matthew Chen
21e55d3be5 Mark "attempting out" messages as "unsent" on app launch.
// FREEBIE
2017-02-13 17:16:32 -05:00
Matthew Chen
cf828dc1cf Rework “verify code” view.
* Ensure all controls visible at all times, on all form factors, even with keyboard active.
* Improve focus (i.e. auto-focus textfield on arrival and after errors).
* Move to programmatic view creation and layout.
* Improve spacing and sizing.
* Replace “change number” button with “back” button.
* Submit code with return key.
* Improve copy for clarity.

// FREEBIE
2017-02-13 11:42:45 -05:00
Matthew Chen
97001018ae Clean up prekey logic.
// FREEBIE
2017-02-10 16:35:16 -05:00
Matthew Chen
dea37b422b Respond to CR.
// FREEBIE
2017-02-08 16:47:09 -05:00
Matthew Chen
8f6483e9b4 Fix bug in the busy logic.
// FREEBIE
2017-02-03 16:47:34 -05:00
Matthew Chen
d7138b6c83 Respond to CR.
// FREEBIE
2017-02-03 11:33:22 -05:00
Matthew Chen
660ff056e2 Modify handling of INStartVideoCallIntent and INStartAudioCallIntent if there already is an ongoing WebRTC or RedPhone call.
// FREEBIE
2017-02-03 11:32:55 -05:00
Michael Kirk
b35c20a06b Don't handle intents pre iOS10.
// FREEBIE
2017-02-01 18:56:38 -05:00
Michael Kirk
17b89f44aa share global callUIAdapter, outboundCallInitiator
// FREEBIE
2017-02-01 18:56:38 -05:00
Michael Kirk
bbfd9ba74d Place Signal/Redphone calls from system contacts
// FREEBIE
2017-02-01 18:56:37 -05:00
Michael Kirk
d3e6747499 Merge remote-tracking branch 'origin/master' into feature/webrtc 2017-01-25 12:13:37 -05:00
Michael Kirk
4e72ab92c8 Prevent session corruption by using a single serial queue for encrypt and decrypt
coordinate SignalProtocol encryption/decryption on a single serial
queue. Previously message sending encrypted on the sending thread, while
message receiving decrypted on the main thread.

// FREEBIE
2017-01-25 11:00:21 -05:00
Michael Kirk
a6029f2545 Merge remote-tracking branch 'origin/master' into feature/webrtc 2017-01-25 09:54:33 -05:00
Michael Kirk
6af933c17d Merge branch 'release/2.6.13' 2017-01-24 14:40:44 -05:00
Michael Kirk
d6f2fa92a6 remove negative notification
There isn't much the user can do in response to it, and the user will
get a subsequent "new message" notification when the fallback push
triggers.

// FREEBIE
2017-01-23 20:10:59 -05:00
Michael Kirk
2355c74173 fixup condition
// FREEBIE
2017-01-23 18:27:43 -05:00
Michael Kirk
870fb960a2 Start logging earlier in app setup.
Because logging-preference was previously stored on the storageManager
this meant we couldn't possible log anything related to the init'ing the
storage manager.

TODO: migrate old logging preference to use the new NSUserDefaults
setting

// FREEBIE
2017-01-23 18:25:59 -05:00
Michael Kirk
9516ab1106 Bail on startup if DB password is inaccessible
Most likely this would be  because the user hasn't unlocked their device
since last restart.

This behavior existed once before, but the startup ordering is pretty
delicate. So, we're now redundantly checking in SSK in case this
delicate startup logic gets mis-ordered again.

Also fixed the AppDelegate method to check for the proper
applicationState, since it will never be "active" in didFinishLaunching.

fixes https://github.com/WhisperSystems/Signal-iOS/issues/1627

// FREEBIE
2017-01-23 17:32:02 -05:00
Matthew Chen
9e739433c5 Start work on video.
// FREEBIE
2017-01-23 13:41:59 -05:00
Matthew Chen
698b914049 Elaborate logging in app delegate.
// FREEBIE
2017-01-23 13:31:23 -05:00
Matthew Chen
1898b9fa19 Merge branch 'charlesmchen/fixWebsocket' into feature/webrtc 2017-01-17 18:47:34 -05:00
Matthew Chen
a023d02ae2 Respond to CR.
// FREEBIE
2017-01-17 17:10:57 -05:00
Matthew Chen
cb3f564446 Fix web socket issue.
// FREEBIE
2017-01-17 16:01:19 -05:00
Michael Kirk
f9b44c8892 Added CallService documentation
// FREEBIE
2017-01-12 09:56:08 -05:00
Michael Kirk
647b2b37e9 WIP: WebRTC calling
* Ensure NotificationsManager has dependencies
    Otherwise it's easy to mess up the order of the required dependencies.
* move AccountManager into Environment, it's heavy to construct

// FREEBIE
2017-01-12 09:56:05 -05:00
Matthew Chen
2ce4d39f9e Respond to CR.
// FREEBIE
2017-01-06 13:28:41 -05:00
Matthew Chen
2dac6c888a Update SignalServiceKit pod.
* Fetch messages when app becomes active.
2017-01-06 13:28:41 -05:00
Thomas Guillet
97500d55ec Prevent iRate mechanism when handling local notifications 2016-12-09 15:56:58 -05:00
Michael Kirk
88d9ef987f Share dialog for Safety Numbers
// FREEBIE
2016-11-15 18:44:52 -05:00
Michael Kirk
1dd06a5e6c Fix registration flow / Keep push tokens in sync
* Separate registering an account from registering for push notifications
  * Allows us to complete registration without prompting user for
    notification settings.

UX Changes
----------
* Automatically keep push tokens in sync on startup.
  Push tokens *can* change, though they rarely do. It happens more often
  for people switching between appstore/beta builds.

  fixes #1174

* Show alert with registration failure
  * add secret 8-tap debug log gesture to registration flow

* Move registration to separate flow
  * don't see flash of inbox when first launching

* show useful error messages when given wrong code / no code

* remove background fetch
  We werent using it, but only relying on a side effect of it which is
  no longer necessary.

Code Changes
------------

* More registration logging.

* Install PromiseKit with carthage

  Our dependencies are not yet framework compatible, so we can't use
  cocoapods.

* Merge preferences util "category" into superclass.

  The immediate reason for this is Swift interop was assuming optional
  types were not optional, and exploding when a value was nil.

  This is clearer anyway, since we were treating it like a subclass, and
  it was the only thing using the class anyway.

* auto-genstrings now searches *.swift (and *.h, which was previously
  broken) for translateable strings.

// FREEBIE
2016-11-03 16:13:49 -04:00
Michael Kirk
33f6a95520 Explain send failures for text and media messages
fixes #1231

Motivation
----------
Previously when messages failed to send, there was no reason given.
Furthermore, when media messages failed to send there was no indication
that any attempt to send the message even occurred, nor a retry
dialog.

UX Changes
----------
- Show "uploading" status for media
- Show specific error message in retry-send dialog
- Only scroll to bottom when new message is inserted
- Show specific errors when group creation fails

Code Changes
-----------
- Updated incorrect references to TSMessageAdapters which were actually
  references to OWSMessageData
- MessageSender was extracted from SSK MessagesManager
- access MessagesManager as property
- idiomatic init/properties for Env
- log contact intersections
- Move scroll-to-bottom animation to main thread.

// FREEBIE
2016-10-26 15:22:35 -04:00
Michael Kirk
2edd2b8f81 set launch state correctly
// FREEBIE
2016-10-12 09:30:25 -04:00
Michael Kirk
ee0cce75e8 Disappearing Messages
* Per thread settings menu accessed by tapping on thread title

  This removed the toggle-phone behavior. You'll be able to see the phone
  number in the settings table view.

  This removed the "add contact" functionality, although it was already
  broken for ios>=9 (which is basically everybody).

  The group actions menu was absorbed into this screen

* Added a confirm alert to leave group (fixes #938)

* New Translation Strings
* Extend "Add People" label to fit translations.
* resolved issues with translations not fitting in group menu

* Fix the long standing type warning where TSCalls were assigned to a TSMessageAdapter.

* Can delete info messages

  Follow the JSQMVC pattern and put UIResponder-able content in the
  messageBubbleContainer. This gives us more functionality *and* allows us
  to delete some code. yay!

  It's still not yet possible to delete phone messages. =(

* Fixed some compiler warnings.

* xcode8 touching storyboard. So long xcode7!

* Fixup multiline info messages.

  We were seeing info messages like "You set disappearing message timer to
  10" instead of "You set disappearing message timer to 10 seconds."

  Admittedly this isn't a very good fix, as now one liners feel like they
  have too much padding.

   If the message is well over one line, we were wrapping properly, but
  there's a problem when the message is *just barely* two lines, the cell
  height grows, but the label still thinks it's just one line (as evinced
  by the one line appearing in the center of the label frame. The result
  being that the last word of the label is cropped.

* Disable group actions after leaving group.

// FREEBIE
2016-10-12 09:30:25 -04:00
Michael Kirk
11a586a835 New Fingerprint Format
Rather than verifying eachothers keys separately, you now verify the
privacy with your recipient by sharing a single composite number or
QRCode.

This is a breaking change, in coordination with Desktop and Android.

UX
--

Fingeprint is no longer in line with identity key error. Instead you
have the option of going to the full-screen safety number verification
experience.

Overhauled fingerprint design
-----------------------------

* use same modal dismiss button as elsewhere
* remove fingerprint from settings.
* quick slide in animation vs slow fade
  * existing was painfully slow
  * blur effect is better metaphor for something slide over top
  * anyway there was a rendering glitch in the end of fade where
    underlying navbar would "snap" out

Also Fixed
----------
Always provide a name string for contact

* Centralize all the nil-checking
* Fall back to "unknown contact"

allow multi-line error messages

// FREEBIE
2016-10-12 09:30:25 -04:00
Michael Kirk
3e7e67e276 Async migrations framework
* nonblocking by default
* track success of each migration independently

// FREEBIE
2016-09-28 17:09:11 -04:00
Michael Kirk
1433ee2655 Fix crash on boot =/ (#1349)
I botched a migration 6 months ago, which left some lingering TSRecipients serialized in our data store, laying in wait to explode the next time we enumerate every object in the database (e.g. when we add an index).

The bloom filter migration failed to remove TSRecipients in the somewhat rare event that the local user had no downloaded bloom filters. This could happen e.g. if they were low on disk space at the time of running the migration, I believe the app would remove the bloom filter cache.

// FREEBIE
2016-09-26 21:57:34 -04:00
Michael Kirk
7c6e9e07b8 Read receipts remove lockscreen notifications
No need to have a notification for a message you've already read on
desktop.

// FREEBIE
2016-09-17 13:51:33 -04:00
Michael Kirk
9006ff604f Multi device read receipts.
All the heavy lifting is in SignalServiceKit.

// FREEBIE
2016-09-06 15:57:44 -04:00
Michael Kirk
58548c68cc code cleanup
- refactor screen protection code for clarity
- remove unused settings cell class
- remove unused preferences

// FREEBIE
2016-08-15 10:07:14 -04:00
Michael Kirk
1e0f0157c1 namespace ContactsManager -> OWSContactsManager
rename test class ContactManager->OWSContact_s_Manager
update docs

// FREEBIE
2016-06-28 08:58:29 -07:00
Michael Kirk
fc494d735f Merge pull request #1140 from michaelkirk/fix-screen-protection-image
After removing launch image, we need to update screen security
2016-04-11 16:22:15 -04:00
Frederic Jacobs
1b02e186f8 Fixes #146 #147. 2015-12-24 18:52:18 +01:00
Frederic Jacobs
a7ec383a7b Fixes #984 Fixes #948.
A future improvement could be to store the usage data in the encrypted
database than in the NSUserDefaults that are more vulnerable to
forensics.
2015-12-24 15:40:50 +01:00
Frederic Jacobs
c6d44e59e2 TextSecureKit Refactoring
- Using same clang format file for old and new files.
- Moving out all TextSecure code to allow other clients (OS X, iOS) to
  integrate easily TextSecure functionality.
- Use TextSecure API to signup.
2015-12-22 23:41:10 +01:00