Commit graph

429 commits

Author SHA1 Message Date
Michael Kirk
3affb07a11 post-merge formatting fixup
// FREEBIE
2017-12-14 11:43:27 -05:00
Michael Kirk
16448e2a0b Merge tag '2.19.3.0' 2017-12-14 11:42:57 -05:00
Michael Kirk
42dc872c9a use dedicated read connection to pre-populate cache
// FREEBIE
2017-12-13 19:08:47 -05:00
Michael Kirk
7ea4b85a2a Persist signal accounts (and their embedded Contact)
// FREEBIE
2017-12-13 17:31:36 -05:00
Matthew Chen
911c4d380b Rework thread safety in profile manager. 2017-12-11 12:28:28 -05:00
Michael Kirk
3ecf0a7537 Cancelling dismisses share extension, remove "import with signal"
Usinig the new ShareViewDelegate to dismiss the share extension, might
have broken the "import with signal" functionality. But because we
want to remove it anyway, I've done that now, rather than fix it up.

// FREEBIE
2017-12-07 17:12:03 -05:00
Matthew Chen
7a1e47cd26 Add asserts around Swift singletons. 2017-12-07 13:57:45 -05:00
Matthew Chen
8312614cf7 Respond to CR. 2017-12-07 13:53:13 -05:00
Matthew Chen
99f0b9d3e8 Fix issues around statics. 2017-12-07 12:34:02 -05:00
Matthew Chen
848f055da1 Add SAE error views. 2017-12-06 21:38:53 -05:00
Matthew Chen
310cf1330d Continue conversion of app setup. 2017-12-06 10:38:57 -05:00
Matthew Chen
8d014f057e Respond to CR. 2017-12-05 13:44:25 -05:00
Matthew Chen
f5353fc7d5 Clean up ahead of PR. 2017-12-05 11:35:43 -05:00
Matthew Chen
9da165b846 Continue conversion of app setup. 2017-12-05 11:19:11 -05:00
Matthew Chen
2eba371656 Clean up ahead of PR. 2017-12-05 10:29:29 -05:00
Matthew Chen
b4e8df79da Migrate environment to SignalMessaging. 2017-12-05 10:29:29 -05:00
Matthew Chen
c817aa51b3 Migrate environment to SignalMessaging. 2017-12-05 10:28:46 -05:00
Matthew Chen
bf21d0c0ed Enable logging in SAE; rework log file management to include multiple log directories. 2017-12-01 12:55:47 -05:00
Matthew Chen
66fae5bd54 Clean up ahead of PR. 2017-11-30 10:07:39 -05:00
Matthew Chen
ffa69b3502 Add application context class. 2017-11-30 10:07:20 -05:00
Matthew Chen
8d4e9b4565 Respond to CR. 2017-11-30 10:02:04 -05:00
Matthew Chen
7429e1968c Clean up ahead of PR. 2017-11-30 09:49:01 -05:00
Matthew Chen
edaf65223a Migrate to shared data NSUserDefaults. 2017-11-30 09:49:01 -05:00
Michael Kirk
2c4cf96515 Some proof of framework integration in the sample share extension
// FREEBIE
2017-11-29 13:58:27 -08:00
Michael Kirk
de028404bb Shared framework between app and extension
// FREEBIE
2017-11-29 13:58:27 -08:00
Matthew Chen
a6bfc0a60e Fix build warnings from XCode 9. 2017-11-09 02:52:44 -05:00
Matthew Chen
204902c111 Respond to CR.
// FREEBIE
2017-11-06 12:50:20 -05:00
Matthew Chen
03241128f6 Respond to CR.
// FREEBIE
2017-11-06 12:37:15 -05:00
Matthew Chen
1ea413ad48 Be more defensive about handling local notifications.
// FREEBIE
2017-11-06 11:14:31 -05:00
Matthew Chen
5af6b6f213 Respond to CR.
// FREEBIE
2017-10-26 11:53:35 -04:00
Michael Kirk
c5244e175e orphan cleanup shouldn't happen until DB is registered
// FREEBIE
2017-10-21 18:16:52 -07:00
Michael Kirk
6a65ee6def Pull to refresh on homeview fetches messages.
This is useful when you're using censorship circumvention and unable to
receive push notifications.

// FREEBIE
2017-10-16 12:25:07 -07:00
Michael Kirk
9a7e3cb9d8 Register for manual message fetching when unable to obtain push tokens
// FREEBIE
2017-10-12 12:02:22 -04:00
Michael Kirk
df15c904bc Rework push registration
== Account Registration ==

Not complete until push tokens are uploaded

== Remote Notifications Registration ==

Extracted from PushManager

- wait for notification-settings registration to complete before
  requesting push tokens, otherwise it's possible token requests will
  be ignored.

- Less state required for push notification callbacks, specifically, we
  no longer need to ensure we've created a promise before the
  registration delegate methods get called.

- no more TOCFuture in Signal-iOS (still in SSK for now). It's not in
  cases of inexplicable behavior - one a recently, push notification
  premature free, in redphone, and more popular use, and I've seen two
  futures inexplicably being nil.  Instead, let's consolidate around
  PromiseKit for popularly used, maintained, strongly-typed futures.

- separate logic for registering for vanilla push/voip notifications
  (few dependencies) from responding to UILocalNotifications (lots of
  dependencies). Ultimately I'd like to consolidate the remaining
  UILocalNotifications logic with the existing NotificationsManager

== Misc ==

more debug logging
more uniform logging
remove stale logic around newly registered user

// FREEBIE
2017-10-12 12:02:22 -04:00
Michael Kirk
b5258be9b5 respond to code review
// FREEBIE
2017-10-10 11:33:40 -04:00
Michael Kirk
876521f4c3 Fetch messages sooner when launched from background
The only reason a notification wakes/launches the app is to fetch
messages.

However, upon launching, especially if the app had been killed, it can
take a second or two before being notified of the notification that woke
us. Rather than wait, just fetch messages ASAP.

// FREEBIE
2017-10-10 11:33:40 -04:00
Michael Kirk
c7cfe188ee Sync push tokens on background launch as well
// FREEBIE
2017-10-10 11:33:40 -04:00
Matthew Chen
10c00501fd Fix the "is contact" test.
// FREEBIE
2017-10-02 17:38:54 -04:00
Matthew Chen
f001e8c225 Respond to CR.
// FREEBIE
2017-09-25 17:22:27 -04:00
Matthew Chen
b4312a5619 Merge remote-tracking branch 'origin/hotfix/2.16.1' 2017-09-24 20:49:13 -04:00
Matthew Chen
825503210b Remove extraneous database view.
// FREEBIE
2017-09-22 14:24:17 -04:00
Matthew Chen
11cadf4200 Send, receive & show read receipts to senders/from receivers.
* Send read receipts to senders.
* Honor "send read receipts" preference.
* Process read receipts from recipients.
* Refactor "mark as read" logic.
* Serialize and apply recipient read receipts received before sync transcript.
* Show recipient read receipts in conversation view.

// FREEBIE
2017-09-22 14:24:17 -04:00
Matthew Chen
1c8dbcd223 Respond to CR.
// FREEBIE
2017-09-21 16:58:07 -04:00
Matthew Chen
3eaeb4e0ec Add read receipts manager.
* Simplify read receipts plumbing.
* Rework incoming read receipts handling.
* Rework outgoing read receipts handling.
* Make "database view registration complete" check thread-safe.
* Don't send sync messages to self if no linked devices.

// FREEBIE
2017-09-21 16:23:03 -04:00
Matthew Chen
b28c4b74b2 Pull out TSMessageDecrypter class.
// FREEBIE
2017-09-21 14:38:30 -04:00
Michael Kirk
73bdae3366 Fix 1-time crash when launching 2.16 from notification
didBecomeActive is too late in the case of launching from a
notification.

Also, start tracking when app setup is complete, and prevent certain
actions from occurring in that case. Eventually we'll enqueue these
actions rather than ignoring them, but we'll want to do more testing
before releasing that. In the meanwhile, if the environment isn't setup
at this point, a crash would be eminent anyway.

// FREEBIE
2017-09-20 13:26:32 -04:00
Matthew Chen
afc753e7ed Add batch message processor.
// FREEBIE
2017-09-20 09:24:49 -04:00
Matthew Chen
c498e4b354 Decouple message decryption and processing.
// FREEBIE
2017-09-20 09:24:49 -04:00
Matthew Chen
65732af3da New users opt-out of read receipts; legacy users opt-in.
// FREEBIE
2017-09-19 17:35:42 -04:00
Matthew Chen
80e5f281c6 Rename app preferences class.
// FREEBIE
2017-09-19 17:35:42 -04:00
Matthew Chen
3367292ba0 Merge branch 'hotfix/2.16.1' 2017-09-19 17:25:24 -04:00
Matthew Chen
f92b221e6b Startup logging.
// FREEBIE
2017-09-19 17:22:56 -04:00
Matthew Chen
70602e3bca Startup logging.
// FREEBIE
2017-09-19 17:22:56 -04:00
Matthew Chen
400f536e37 Respond to CR.
// FREEBIE
2017-09-19 09:30:01 -04:00
Matthew Chen
e222b9df68 Normalize conversation presentation logic.
// FREEBIE
2017-09-18 16:08:18 -04:00
Matthew Chen
b6d782046a Normalize conversation presentation logic.
// FREEBIE
2017-09-18 16:08:18 -04:00
Matthew Chen
0b772b3a37 Move post-registration work from view to app delegate.
// FREEBIE
2017-09-14 15:29:59 -04:00
Matthew Chen
ab00342d67 Add modal activity indicator view.
// FREEBIE
2017-09-11 12:49:14 -04:00
Matthew Chen
9dfebb2d4b Apply OWSFail() in more places.
// FREEBIE
2017-09-11 10:20:48 -04:00
Matthew Chen
c21a7673c8 Rework preservation of attachment filenames.
// FREEBIE
2017-09-11 10:20:48 -04:00
Matthew Chen
69816cdf0e Convert DataSource to Objective-C.
// FREEBIE
2017-09-11 10:20:48 -04:00
Matthew Chen
2282733fa9 Add data source class.
// FREEBIE
2017-09-11 10:20:48 -04:00
Matthew Chen
948da2afbb Merge remote-tracking branch 'origin/release/2.16.0' 2017-09-07 15:20:45 -04:00
Michael Kirk
04bf548a7b Fix one-time crash when opening thread without having a local profile
// FREEBIE
2017-09-07 13:24:15 -04:00
Matthew Chen
928525c31e Rename home view.
// FREEBIE
2017-09-06 13:59:39 -04:00
Matthew Chen
3c90c3361a Respond to CR.
// FREEBIE
2017-08-29 16:31:27 -04:00
Matthew Chen
71d7490e35 Re-sync local profile state with service if necessary.
// FREEBIE
2017-08-29 16:29:54 -04:00
Michael Kirk
1f3d2d1ed6 Send any profile key in contact sync
// FREEBIE
2017-08-29 10:35:18 -04:00
Michael Kirk
b579ea5915 Use profile name when building avatar if contact name is unavailable
// FREEBIE
2017-08-25 12:40:19 -04:00
Matthew Chen
98eb4693c5 Rework the contact offers.
// FREEBIE
2017-08-21 17:05:42 -04:00
Matthew Chen
08347478a2 Implement alternative approach to veto-able back buttons.
// FREEBIE
2017-08-21 10:10:22 -04:00
Matthew Chen
d476bc286d * Add debug UI tools for clearing and logging the profile whitelist.
* Auto-add new contact threads to profile whitelist when local user sends first message to that thread.
* Ensure dynamic interactions have a non-negative timestamp even if the conversation was empty.
* Only call updateMessageMappingRangeOptions _after_ beginLongLivedReadTransaction and updating messageMappings.
* Improve documentation around how to avoid corrupt mappings in conversation view.
* Fix edge cases around large initial range sizes.
* Always treat dynamic interactions as read.
* Rebuild the “unseen” database views to remove dynamic interactions (see above).

// FREEBIE
2017-08-17 11:22:25 -04:00
Michael Kirk
2e83643327 Don't consider registration complete until user registers their push
notification tokens.

// FREEBIE
2017-08-17 10:56:36 -04:00
Michael Kirk
ed4de7e8af Simplify code / pre-cache localNumber
Now that localNumber is read from a dedicated dbConnection we don't have
to worry about it blocking.

// FREEBIE
2017-08-04 15:19:26 -04:00
Matthew Chen
6ec756de44 Move profile manager to Signal.
// FREEBIE
2017-08-04 09:45:33 -04:00
Matthew Chen
a3b16812ec Add convenience category for YapDatabaseConnection.
// FREEBIE
2017-08-02 10:38:23 -04:00
Matthew Chen
03a4ebc4d8 Respond to CR.
// FREEBIE
2017-08-01 16:30:24 -04:00
Matthew Chen
c331788c06 Modify the profile view to update profile manager state.
// FREEBIE
2017-08-01 16:17:59 -04:00
Michael Kirk
a196693425 Make sure DB views are ready before kicking processing job
// FREEBIE
2017-07-28 17:12:47 -04:00
Michael Kirk
6a5c6a9fc9 didBecomeActive kicks the processing queue
// FREEBIE
2017-07-28 17:12:47 -04:00
Matthew Chen
1890039165 Hide empty conversations in home view.
// FREEBIE
2017-07-27 15:40:19 -04:00
Matthew Chen
bca736a2b7 Merge tag '2.13.4.0'
// FREEBIE
2017-07-27 15:04:03 -04:00
Matthew Chen
f1807cd709 Add script to extract and gather analytics event names.
// FREEBIE
2017-07-27 12:29:05 -04:00
Matthew Chen
f973af5a83 Streamline analytics properties.
// FREEBIE
2017-07-27 10:16:16 -04:00
Matthew Chen
013bf62f7c Streamline analytics properties.
// FREEBIE
2017-07-27 10:16:16 -04:00
Matthew Chen
117bca7c48 Instrument errors in app delegate.
// FREEBIE
2017-07-24 16:05:39 -04:00
Matthew Chen
fdac0305cb Update analytics macros.
// FREEBIE
2017-07-21 15:04:41 -04:00
Matthew Chen
54a5b960c7 Add a reminder that you are in archive view.
// FREEBIE
2017-07-11 16:01:19 -04:00
Matthew Chen
2e727a24b5 Convert home view to programmatic layout.
// FREEBIE
2017-07-11 16:01:19 -04:00
Matthew Chen
9cbc1e6a1b Block device from sleeping while Debug UI is visible and during database upgrades.
// FREEBIE
2017-07-06 17:35:47 -04:00
Matthew Chen
9aa54cad63 Fix missing “database upgrade” label on launch screen.
// FREEBIE
2017-07-06 15:10:47 -04:00
Matthew Chen
ab9770c175 Fix missing “database upgrade” label on launch screen.
// FREEBIE
2017-07-06 15:05:09 -04:00
Matthew Chen
5038744811 Fix missing “database upgrade” label on launch screen.
// FREEBIE
2017-07-06 15:05:09 -04:00
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
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