Share extension (#3506)

* Setup simple share extension

* Switch the app url scheme to be the full bundle identifier

* Setup a share extension that show a SwiftUI view, uses rust tracing and redirects to the hosting aplication

* Move media as json through the custom scheme into the main app and deep link into the media upload preview screen

* Fix message forwarding and global search screen room summary provider filtering.

* Tweak the message forwarding and global search screen designs.

* Add a room selection screen to use after receiving a share request from the share extension

* Fix share extension entitlements

* Share the temporary directory between the main app and the extensions; rename the caches one.

* Remove the no longer needed notification avatar flipping fix.

* Extract the placeholder avatar image generator from the NSE

* Nest `AvatarSize` within the new `Avatars` enum

* Donate an `INSendMessageIntent` to the system every time we send a message so they appear as share suggestions

* Support suggestions in the share extension itself

* Improve sharing animations and fix presentation when room already on the stack

* Clear all routes when sharing without a preselected room.

* Fix broken unit tests

* Various initial tweaks following code review.

* Correctly clean up and dismiss the share extension for all paths.

* Move the share extension path to a constants enum

* Rename UserSessionFlowCoordinator specific share extension states and events

* Add UserSession and Room flow coordinator share route tests

* Tweak the share extension logic.
This commit is contained in:
Stefan Ceriu
2024-11-13 14:02:47 +02:00
committed by GitHub
parent 3a600a94d5
commit b122b02bee
69 changed files with 1583 additions and 272 deletions
@@ -701,6 +701,12 @@ extension PreviewTests {
}
}
func test_roomSelectionScreen() {
for preview in RoomSelectionScreen_Previews._allPreviews {
assertSnapshots(matching: preview)
}
}
func test_sFNumberedListView() {
for preview in SFNumberedListView_Previews._allPreviews {
assertSnapshots(matching: preview)
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:481969f82410ed28b3c259d53e88310fd5669d1c6041020c99c47a7a64fde666
size 151180
oid sha256:ec8339fcf606ac520989a6915da4f3a15a43d049e49c3e93524ad70bd8097778
size 148064
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ac9dc777f9bdaca948c7a5cf56aebb163ff80be491a124c78084b5d1309396af
size 151589
oid sha256:aa3fb400d0af05b6c81181a040f3746c11fafe82703f7587ae9d98cdcce44386
size 148467
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:656ab8534b3b28a11a09b7ee3bd735de4f9173687006d8346093ec8fa70caf54
size 88511
oid sha256:ed42c3e99db34f3dedb33b5faaf768caee7d15d8d5dfb50fbed0f97da2b990f0
size 85859
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6dece45267d9514a73241f045de87eb76d7d87ccc236aed3d114ccfbe9507d74
size 88837
oid sha256:f33f9d8cc790b5a03c0da8423e948bc9faffa7580e587d509e13fb691a255eaf
size 86196
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7001c732a5f38e3b8093488f80504a474c0b8f4f494e68793029f387047522e8
size 152484
oid sha256:1705df7384f16656d63d4efca503b4533cd3d67f54733855f284ddc49cdf973f
size 149086
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4d213faa018f71016ebc6f31691ac3cbf97849e8a739937d9e351b92bef7877c
size 154392
oid sha256:de6fe930505a8b4e9ab2b3052ebd1345118eaa64149381f28b3142447722d61a
size 151009
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ee5ecf468c941282295014187f8fc03929c122f343465113496e20a8cca738d6
size 101988
oid sha256:96596029a45f8bc48da6f8cbd77f09eb65236ac111534d9dec7d45e0e083cf32
size 99144
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:53268d051594a0dd4250a79b5b3093a4f57f4104250c990e6bb276c751093b94
size 101810
oid sha256:dd2bd5da5c119e827b8b195971a34b645d5e47f577bf622e5856412c91d616e2
size 98976
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:75e855ee7f0e97644797ed467953cd618fbc64a1ca185e6784cd24aa5cdef613
size 146330
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7749e68e119cf015e5110e889ef29f283af3b7f4f71840bba60b7abdfbea787b
size 147778
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8f53f2f4cc267e92bab7d8bf4a1fdfd307609312cf7e623ae43a6a254971c1f6
size 97028
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3e76ee2d1d8b3dee92997af404d846a889e9ccea0862b848c8d2386d4489220b
size 98291