Commit Graph

95 Commits

Author SHA1 Message Date
Sasha Weiss
be92c40068
Handle attributed text from RTF item providers in share extension 2023-03-01 09:08:59 -08:00
Max Radermacher
75e377b164
Fix NSE build expiration
The NSE’s Info.plist didn’t contain a BuildTimestamp, so it wouldn’t
have a default expiration.

The new approach reads the main app’s expiration from all of the
extensions, which helps ensure they all expire at the same time.
2022-12-09 15:11:39 -08:00
Evan Hahn
370ff654e7
Change license to AGPL
Change license to AGPL

This commit:

- Updates the `LICENSE` file

- Start every file with something like:

      // Copyright YEAR_FIRST_PUBLISHED Signal Messenger, LLC
      // SPDX-License-Identifier: AGPL-3.0-only

---

First, I removed existing license headers with this Ruby 3.1.2 script:

    require 'set'

    EXTENSIONS_TO_CHECK = Set['.h', '.hpp', '.cpp', '.m', '.mm', '.pch', '.swift']

    same = 0
    different = 0

    all_files = `git ls-files`.lines.map { |line| line.strip }
    all_files.each do |relative_path|
      if relative_path == 'Pods'
        next
      end

      unless EXTENSIONS_TO_CHECK.include? File.extname(relative_path)
        next
      end

      path = File.expand_path(relative_path)

      contents = File.read(path)
      new_contents = contents.sub(/\/\/\n\/\/  Copyright .*\n\/\/\n\n/, '')

      if contents == new_contents
        same += 1
      else
        different += 1
      end

      File.write(path, new_contents)
    end

    puts "updated #{different} file(s), left #{same} untouched"

I'm sure this script could be improved, but it worked well enough.

Then, I created `Scripts/lint/lint-license-headers` and ran it to auto-
fix a lot of files. This changed the mode of some files, but I think
that's actually desirable. For example,
`SignalServiceKit/src/Util/AppContext.m` previously had a mode of
`0755/-rwxr-xr-x`, and it's now `0644/-rw-r--r--`.

Then I fixed some stragglers and updated the precommit script.

See [a similar change in the Desktop app][0].

[0]: 8bfaf598af
2022-10-13 08:25:37 -05:00
harry-signal
2a23f61a3f
Video Story muting/unmuting
* Start muted, unmute when pressing volume buttons

* move ringer switch observation into its own class

* observe ringer switch in stories

* add foreground time to AppContext; use to drive mute foregrounding behavior

* dont double observe

* mix story volume with others, show volume controls
2022-08-10 16:25:49 -07:00
Jordan Rose
094c8290ce Remove unnecessary NotificationCenter.removeObserver calls
As of iOS 9, selector-based observers in NotificationCenter do not
need to be explicitly unregistered.
2022-08-02 17:43:52 -07:00
Nora Trapp
27e03b6a70 Render 1:1 story replies 2022-04-15 19:28:14 -07:00
Dimitris Apostolou
62724cf0be Fix typos 2022-03-18 11:31:06 -07:00
Igor Solomennikov
71ac19adae Do not use -[UIApplication setStatusBarHidden:animated:].
Deprecated in iOS 9.
2022-01-31 15:15:18 -08:00
Matthew Chen
fc749b4d72 Change phone number. 2021-11-19 14:28:18 -03:00
Matthew Chen
bba0517478 Clean up logging. 2021-10-28 13:10:46 -03:00
Matthew Chen
69d21a2121 Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
Matthew Chen
fbde0356f7 Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
Michelle Linington
7e6e99074e PR Feedback 2021-09-03 16:11:19 -07:00
Michelle Linington
88309e7cc1 Fix various issues with TESTABLE_RELEASE
While running some perf tests on database queries, I was building
against TESTABLE_RELEASE to have things built with optimizations.

I saw some weird behavior:
- Share extension would crash
- No logs would be recorded

I went through and cleaned up some things that appeared incorrect with
how we handled TESTABLE_RELEASE
2021-09-03 16:11:19 -07:00
Nora Trapp
2814ab7629 Convert to new Promise library 2021-09-03 11:41:34 -07:00
Nora Trapp
709528bcec Don't download attachments outside of the main app 2021-06-24 12:20:46 -07:00
Matthew Chen
ce7f557158 Skip media downloads during calls. 2021-01-21 20:56:10 -03:00
Matthew Chen
1e8c8980fc Rework debug log file handling. 2020-10-23 14:10:00 -03:00
Nora Trapp
6ca4bfeff9 Add backwards compatible support for new photo library APIs 2020-10-05 14:32:07 -07:00
Matthew Chen
8274c4feab Respond to CR. 2020-06-30 15:56:30 -03:00
Matthew Chen
781ffa5741 Add checks to thread record deserialization that can be resymbolicated. 2020-06-30 15:31:26 -03:00
Matthew Chen
67a773e6fe Use display link to push database snapshot updates. 2020-06-07 12:05:21 -03:00
Matthew Chen
7246c613d5 Fix more build warnings. 2020-04-10 13:17:08 -03:00
Matthew Chen
bcfba85356 Add message processing class.
* Modify message processing to allow observation of websocket queue being drained.
* Extend MessageProcessing to allow observation of REST message fetching and "all message fetching and processing".
2020-01-27 10:42:03 -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
Matthew Chen
b7409be74f Allow parallel usage of staging and production services. 2020-01-15 10:48:42 -03:00
Matthew Chen
e88df8a8cf Allow parallel usage of staging and production services. 2020-01-15 10:48:42 -03: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
Matthew Chen
c23ed76df0 Always migrate to GRDB; show notification during background migrations. 2020-01-02 12:12:18 -08:00
Michael Kirk
97dcad7015 Fix sleep manager v. main thread 2019-11-22 18:18:56 -07:00
Matthew Chen
50c2e985bf Improve logging around perf bottlenecks around application state changes. 2019-11-04 13:37:46 -03:00
Nora Trapp
65d54e7282 UIAlertController -> ActionSheetController 2019-10-28 14:43:59 -07:00
Matthew Chen
e2e6e1aef8 Handle ydb-to-grdb migration edge cases. 2019-10-17 14:58:18 -03:00
Nora Trapp
2ecb94a5ee Fix stale hash reference for YDB pod 2019-10-05 18:58:01 -07:00
Nora Trapp
93004d1d1a PR Feedback 2019-10-05 18:50:51 -07:00
Nora Trapp
36cbf4cc61 Support iPad multi tasking 2019-10-05 16:57:44 -07:00
Matthew Chen
3ff3f9bb0d Fix tests. 2019-09-16 10:00:26 -03:00
Matthew Chen
4acdcbebc7 Remove YDB header usage. 2019-08-29 10:24:27 -03:00
Michael Kirk
980d7e905f use "ask" helper when saving media
This required moving the ask helpers to SignalMessaging
2019-08-13 16:47:50 -06:00
Nora Trapp
868e49f1ff Match StickerKeyboard to system keyboard size, set scaffolding for other custom keyboards. 2019-08-06 10:53:31 -07:00
Nora Trapp
1053da3fef PR Feedback 2019-05-28 13:07:34 -07:00
Nora Trapp
9d3e8729ad Expire the app 90 days after compilation. 2019-05-27 20:55:16 -07:00
Matthew Chen
57394f0015 Respond to CR. 2019-02-14 09:23:50 -05:00
Matthew Chen
2a4b9426c3 Sketch out the 'onboarding phone number' view. 2019-02-14 08:54:27 -05:00
Matthew Chen
1a53005e08 Respond to CR. 2018-10-22 14:43:07 -04:00
Matthew Chen
bbcbbafaab Sync local profile key after rotating it. 2018-10-18 16:47:18 -04:00
Matthew Chen
693b3e13a9 Revert "Sync local profile key after rotating it."
This reverts commit ddbd20e706.
2018-10-18 16:00:48 -04:00
Matthew Chen
ddbd20e706 Sync local profile key after rotating it. 2018-10-18 15:59:43 -04:00
Matthew Chen
bcceda1861 Respond to CR. 2018-09-07 16:05:57 -04:00
Matthew Chen
cfb511aa57 Respond to CR. 2018-09-07 16:00:32 -04:00