Commit graph

76 commits

Author SHA1 Message Date
Matthew Chen dcb7eef3fc Respond to CR.
// FREEBIE
2017-04-05 09:09:13 -04:00
Matthew Chen 8374ca149e Apply assert to ensure singletons are only created once.
// FREEBIE
2017-03-31 18:45:51 -04:00
Matthew Chen d12a582ee3 Rename source directories with a space in their name.
// FREEBIE
2017-03-31 11:58:52 -04:00
Michael Kirk da32570dc6 [SSK] remove convoluted dependency
Moved query method to PhoneNumberUtil since that's they only caller.
Moved corresponding tests to SSK

// FREEBIE
2017-03-20 15:35:09 -04:00
Matthew Chen 49ba0ff942 Flush logs before exiting the app.
// FREEBIE
2017-02-14 13:53:32 -05:00
Matthew Chen 192264e45b Respond to CR.
// FREEBIE
2017-02-08 14:26:32 -05:00
Matthew Chen adfbcc3e27 Update views that show contacts to reflect updates.
// FREEBIE
2017-02-08 14:26:32 -05:00
Matthew Chen 98e087a47f Fix font lookup on iOS before 8.2.
// FREEBIE
2017-01-12 10:14:35 -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
Michael Kirk 243ff190bc Fix crash in group listing / new group views
The broken code addressed in 8211d4584f
was duplicated a couple of places. This commit ferrets out the rest of
them and centralizes the logic in the ContactsManager.

// FREEBIE
2016-12-04 22:58:02 -05:00
Michael Kirk 103f0450a1 Build avatar from contact initials even if they don't have a phone
number

The invite contact picker was rendering the "#" avatar for contacts who
had a name, but no phone number.

In some ways this approach is dumber. But since we have "surprising"
logic to set the contacts firstName to a phone number or maybe a company
name when contacts are built from ABContacts, this approach is more on
the level with the existing assumptions of what could be in that field
(which is to say, pretty much anything).

// FREEBIE
2016-12-04 14:03:12 -05:00
Michael Kirk 8211d4584f Don't explode when missing first name
// FREEBIE
2016-12-04 14:01:08 -05:00
Russ Shanahan e7126f8c60 Less confusing "#" avatar for unknown Contact instead of "+"
For consistency with the Android and Desktop client behavior.

* Show a placeholder avatar when no image, initials (#1512)

  If all we know about the user is their phone number, their avatar image
  is rendered as a placeholder. Previously, it would render the first few
  characters of their phone number as if they were initials (eg. "+")

* Rename, extend OWSContactsManager methods (#1512)

  Rename from: nameStringForPhoneIdentifier
           to: displayNameForPhoneIdentifier

  Also, add:
  - (BOOL)nameExistsForPhoneIdentifier:(NSString *)identifier;

  Which reports whether there's any "name" for a contact.

* Remove unused typedefs

  These aren't used in the project anymore, and they were causing
  compiling warnings due to a lack of nullability indication.

* Resolve some OWSContactsManager nullability warnings

  Did a pass through all of the existing nullability warnings in
  OWSContactsManager. Tried to pick descriptors that best reflected the
  behavior of the methods.

// FREEBIE
2016-12-04 14:01:07 -05:00
Michael Kirk 1dcd1830e6 Fix crash in group member listing
Restore contactsComparator which is still being used in the group member
listing

partial revert of 81e1ec4b9e

// FREEBIE
2016-12-01 17:38:48 -05:00
Russ Shanahan 81e1ec4b9e Compare both first and last names when sorting (#1487)
If two names have the same last name, ensure we fall back on the
first name when sorting them.

// FREEBIE
2016-11-30 15:01:27 -05:00
Michael Kirk f30c733ef3 Custom contact picker for invite flow
Preferred to the system contact picker because:
1. removes "group" clutter from header, unlikely to be used much.
2. can select while searching
3. fixes unified contact problem where e.g.
   If only one of your contact has a phone number, they appear disabled
   when choosing to invite via messaging, even though the other linked
   contact *does* have a phone number.
4. label users w/o email so it's clearer why they can't be selected

Also:

* Twitter share-image was too tall

// FREEBIE
2016-11-26 14:43:42 -05:00
Michael Kirk 06ca3c9290 Mail and Message invite flow
* Spruce up compose contact-picker
- Fix random sorting for contacts missing first or last name
- Add Avatar to contact picker
- de-dupe contacts

Better copy for INVALID_MESSAGE error.

// FREEBIE
2016-11-22 12:11:35 -05:00
Michael Kirk bed5250397 remove redunant method
// FREEBIE
2016-11-21 22:03:37 -05: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 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 a181d218cf extract and test contact searcher
// FREEBIE
2016-06-28 14:13:39 -07:00
Michael Kirk 26f5418500 Remove distinction between TS and RP users
* Ensure we're always showing call button for non-group threads.
* search phone strings directly rather than precomputing field

// FREEBIE
2016-06-28 08:58:29 -07:00
Michael Kirk 62633ff7f4 remove unused code
// FREEBIE

dot notation is only for property access

// FREEBIE

remove unused code
2016-06-28 08:58:29 -07: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 76352bf471 Code Cleanup (#1229)
* remove unused Signal-Bridging-Header
* move Adapters out of ViewControllers directory
* remove unimplemented method from header
* Fix unused variable warning.
* Move SignalsViewControllers out of UITests directory.
* remove executable bit from source files

// FREEBIE
2016-06-17 15:41:41 -07:00
Michael Kirk 4a1c53f624 Access contacts atomically to avoid corruption (PR #1223)
4% of our crashes are from accessing latestContactsById with an invalid
address. This was partially addressed by assigning a value on init, but
it's still happening.

By converting the ivar to an atomic property we can avoid any funny
business that would happen when accessing this var while it's being
updated in a different thread.

Also, make sure we're copying to defensively strip mutability.

Also:
* bumped release target
* removed unused code
* dealloc at the top per style.
2016-06-16 13:54:33 -07:00
Michael Kirk 78a5355b04 Initialize latestContacts to empty dict (#1207)
Seeing intermittent segfaults on [latestContacts allKeys].
This could be because latestContacts is initialized async.

//FREEBIE
2016-06-09 12:06:10 -07:00
Michael Kirk a736e8de66 Fixes avatar not showing for single contact thread (#1202)
* requires update to SignalServiceKit
* updated Pod Dependencies
* bumped version

Fixes #1201

// FREEBIE
2016-05-26 15:49:34 -05:00
Frederic Jacobs 4034baedb9 Adapting to renaming. 2016-04-08 09:47:41 +02: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 3d4d4123f7 Removing APNavigation as a dependency. 2015-10-31 23:43:16 +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 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
Frederic Jacobs 02560f8b2f Flagging release.
- Bump up version number.
- Fetching latest localizations.
- Upgrading libPhoneNumber and Mantle dependencies.
//FREEBIE
2015-06-24 11:06:45 +02:00
Frederic Jacobs 2fc20702d9 Fixing crash on responding to phone call. 2015-06-19 16:09:05 +02:00
Frederic Jacobs 788aa8cb4f Dropping some required permissions. Smarter microphone permission. 2015-03-23 01:34:33 +01:00
Frederic Jacobs e8ea00d71a Perform contact intersection on AddressBook change. 2015-03-21 17:53:38 +01:00
Frederic Jacobs ea37894846 Fixes #708 2015-03-21 16:33:23 +01:00
Frederic Jacobs 9569a9b9c6 Multiple visual enhancements and repo cleanup.
- Revising iconography to stick to v2.0 design.
- Multiple bug fixes based on testers feedback
- Integration with system addressbook
- Removing unused assets.
2015-02-18 18:20:02 +01:00
Frederic Jacobs 7242680464 Contact ordering and graying out RedPhone-only users. 2015-01-31 02:26:38 -10:00
Frederic Jacobs 4833487e94 Removing call recorder + contacts refresh 2015-01-31 01:35:49 -10:00
Christine Corbett ccdc4b5d17 Redesign implementation.
Result of stashed commits by @corbett and @abolishme
2015-01-24 16:28:34 -10:00
Frederic Jacobs 9ae4a435a1 Show name for unregistered contact in threads.
//FREEBIE
2015-01-04 18:19:09 +01:00
Frederic Jacobs 5cf96b2b05 Incoming call when app closed: updates contact label when available. 2015-01-04 11:30:27 +01:00
Christine Corbett c11c4361eb Bugfix: Fixing ordering for compose view.
Reviewed-by: @FredericJacobs
2015-01-04 11:30:25 +01:00
Frederic Jacobs 1eff2b3ad5 Rewriting outgoing pipeline with GCD. 2015-01-04 11:30:23 +01:00
Frederic Jacobs 8514836032 Integrating call and messaging buttons. 2015-01-04 11:30:23 +01:00