Commit Graph

120 Commits

Author SHA1 Message Date
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
Frederic Jacobs 26f9207cab Bye Bye Bloomfilters
For reasons outlined in
https://whispersystems.org/blog/contact-discovery/ , Signal will no
more use bloom filters for RedPhone contact intersection.
2015-11-29 01:14:49 +01:00
Frederic Jacobs 861e3d6266 Fixes #930 2015-11-03 00:26:48 +01:00
Frederic Jacobs 777e7e16f0 3D Touch: Quick Compose 2015-10-31 23:44:16 +01:00
Frederic Jacobs 8189e593ef Fixes glitching of inbox label when coming back from background.
The method was not called on the main thread, resulting in rendering
issues.
2015-10-31 05:00:05 +01:00
Frederic Jacobs bbde7cd2a8 iOS 9 Support
- Fixing size classes rendering bugs.
- Supporting native iOS San Francisco font.
- Quick Reply
- Settings now slide to the left as suggested in original designed
  opposed to modal.
- Simplification of restraints on many screens.
- Full-API compatiblity with iOS 9 and iOS 8 legacy support.
- Customized AddressBook Permission prompt when restrictions are
  enabled. If user installed Signal previously and already approved
  access to Contacts, don't bugg him again.
- Fixes crash in migration for users who installed Signal <2.1.3 but hadn't signed up
  yet.

- Xcode 7 / iOS 9 Travis Support
- Bitcode Support is disabled until it is better understood how exactly
  optimizations are performed. In a first time, we will split out the
  crypto code into a separate binary to make it easier to optimize the
  non-sensitive code. Blog post with more details coming.
- Partial ATS support. We are running our own Certificate Authority at
  Open Whisper Systems. Signal is doing certificate pinning to verify
  that certificates were signed by our own CA. Unfortunately Apple's App
  Transport Security requires to hand over chain verification to their
  framework with no control over the trust store. We have filed a radar
  to get ATS features with pinned certificates. In the meanwhile, ATS is
  disabled on our domain. We also followed Amazon's recommendations for
  our S3 domain we use to upload/download attachments. (#891)
- Implement a unified `AFSecurityOWSPolicy` pinning strategy accross
  libraries (AFNetworking RedPhone/TextSecure & SocketRocket).
2015-10-31 04:45:55 +01:00
Frederic Jacobs c95f190140 Require AddressBook permission.
Signal requires the AddressBook permission to use the app at the
moment. This avoids the edgecases where a user doesn’t allow access to
his address book and then tries to use the app. We’re also doing a
significantly better job at explaining why we need this permission to
the user.
2015-08-24 01:47:25 +02:00
Frederic Jacobs 0090030f3d Adding rating code
We’ve noticed that most people went to the App Store to leave really
bad reviews of the app and it is severely affecting our discoverability.
We will ask for a rating if we see you’ve been using the app for some
time. If you rate the app or decline to rate, that’s fine. We will
never bug you again!
2015-08-24 00:28:50 +02:00
Frederic Jacobs ada07351e1 Support for `supportsVOIP` attribute.
- Deprecates RedPhone upgrade flow.
- Adds a generic upgrade dialog.
- Upgrades dependencies.
- Reorganizes `TSStorageManager` & TSNetworkManager imports.
2015-08-23 00:00:39 +02:00
Frederic Jacobs f6c0625c2c Removing unused imported classes.
//FREEBIE
2015-07-27 16:19:08 +02:00
Mert Buran 040e4c750b Removing literals and self within block.
declaring constants instead of string literals
avoiding using self within block
removed unused method decleration from header file

Reviewed-by: @FredericJacobs
2015-07-13 13:49:43 +02:00
Frederic Jacobs 57f86008d1 UX and Notifications fixes
- Removes large confusing UX bar and related assets. Replaced with UISwitch.
- Enhanced user experience for missed calls.
- Fixes issue where missed call would appear as incoming call in call log.
- Fixing issues where PushKit handler not called on launch.
2015-06-07 22:38:28 +02:00
Frederic Jacobs 0f45294221 Reliability enhancements for notifications. 2015-05-12 22:43:32 +02:00
Frederic Jacobs 1550c61216 Addressing issues with background decryption.
- Simplifying background timeout strategy for reliabilty.
- Adding Notifications settings.
- Dropping support for VOIP Push < 8.2 because buggy.
2015-05-06 12:36:40 +02:00
Frederic Jacobs e47e9759e9 Fixing leaky caches. 2015-04-28 02:15:41 +02:00
Frederic Jacobs 13448bdb2d Notifications enhancements.
- Tap to reply to a message.
- Badges application with the number of unread messages.
- Pick up a phone call from lock screen, or decline it.
- Settings for notification sounds while app in foreground and text displayed on local notifications.
2015-04-28 02:15:37 +02:00
Frederic Jacobs c6cdbea89a Fixes #761 2015-04-07 17:22:57 +02:00