[PR #1647] [MERGED] Add Share app Extension on iOS for Send #3025

Closed
opened 2025-11-26 23:27:17 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1647
Author: @fedemkr
Created: 11/16/2021
Status: Merged
Merged: 11/19/2021
Merged by: @fedemkr

Base: masterHead: share_target_send_ios


📝 Commits (10+)

  • 64b0890 WIP Add Share app extension on iOS for Send
  • 5fbc5dc Added Share app extension on iOS for Send and some code fixes as well
  • c008934 Updated iOS csprojs configs to linkskip the new extension project and also added AdHoc and AppStore configurations to iOS.ShareExtension.csproj
  • 6c4c3f6 Code clean up and transformed bundle resources into links to the already used pngs of the main iOS project on ShareExtension
  • 41897fd Updated build.yml to include provisioning profile for iOS Share extension
  • 7bfbd4e Adding in the missing provisioning profile
  • 5964242 Removed .DS_Store from the iOS.ShareExtension csproj Resources
  • 4b7eeb3 switching out the share extension profile
  • 4d5e271 Merge branch 'share_target_send_ios' of github.com:bitwarden/mobile into share_target_send_ios
  • fe73dd8 Added Share extension provisioning profile configuration on export options app store for github and also removed custom info.plist config for localhost which is not necessary

📊 Changes

30 files changed (+1357 additions, -132 deletions)

View changed files

📝 .github/resources/export-options-app-store.plist (+2 -0)
.github/secrets/dist_share_extension.mobileprovision.gpg (+0 -0)
📝 .github/workflows/build.yml (+7 -0)
📝 bitwarden-mobile.sln (+65 -32)
📝 src/App/Models/AppOptions.cs (+2 -0)
📝 src/App/Pages/Send/SendAddEditPage.xaml (+3 -2)
📝 src/App/Pages/Send/SendAddEditPage.xaml.cs (+68 -33)
📝 src/App/Pages/Send/SendAddEditPageViewModel.cs (+63 -17)
📝 src/App/Resources/AppResources.Designer.cs (+6 -0)
📝 src/App/Resources/AppResources.resx (+6 -0)
📝 src/Core/Services/FileUploadService.cs (+1 -0)
📝 src/Core/Services/SendService.cs (+2 -2)
src/Core/Utilities/LazyResolve.cs (+12 -0)
src/Core/Utilities/TaskExtensions.cs (+27 -0)
📝 src/iOS.Autofill/iOS.Autofill.csproj (+8 -6)
📝 src/iOS.Core/Constants.cs (+1 -0)
📝 src/iOS.Core/Utilities/iOSCoreHelpers.cs (+1 -1)
📝 src/iOS.Extension/MainInterface.storyboard (+31 -28)
📝 src/iOS.Extension/iOS.Extension.csproj (+6 -6)
src/iOS.ShareExtension/Entitlements.plist (+14 -0)

...and 10 more files

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

This PR introduces Share app extension on iOS, i.e. the ability to make a Send from other apps to Bitwarden, e.g. from photos select a picture and share it to Send.

Code changes

Mainly a new project was added: "iOS.ShareExtension" .
Also there were some code improvements and try catches added on places where the app may crash.

  • AppOptions, SendAddEditPage.xaml, SendAddEditPageViewModel.cs:
    The "Share this Send upon save" becomes "Copy Send Link on save" on the iOS share extension due to some OS limitations to display the native share dialog on the extension after saving.
  • iOSCoreHelpers: Fixed bug where if we send details.ConfirmText null then the behavior was not the intended one leading the app to crash on some places.

Screenshots

You can see the Bitwarden icon to share on other apps now working as expected.
image

Testing requirements

The main focus for this is to share text and files from other apps to Bitwarden.
So we should test sharing from the Photos app, from Files app (other than photos, like a movie or a PDF), text selection from any app like Safari.
Also, just in case test that only on the iOS sharing app extension the "Share this Send upon save" toggle changes to "Copy Send Link on save" and that the behavior works as expected.

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/1647 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 11/16/2021 **Status:** ✅ Merged **Merged:** 11/19/2021 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `master` ← **Head:** `share_target_send_ios` --- ### 📝 Commits (10+) - [`64b0890`](https://github.com/bitwarden/android/commit/64b0890ccee76f3c2d3ab205318d33b8f5e51562) WIP Add Share app extension on iOS for Send - [`5fbc5dc`](https://github.com/bitwarden/android/commit/5fbc5dcf49cba7b2ed723256435c53ceb3601ec1) Added Share app extension on iOS for Send and some code fixes as well - [`c008934`](https://github.com/bitwarden/android/commit/c0089344d4b5d8c63602ef95835112666d5ef8cc) Updated iOS csprojs configs to linkskip the new extension project and also added AdHoc and AppStore configurations to iOS.ShareExtension.csproj - [`6c4c3f6`](https://github.com/bitwarden/android/commit/6c4c3f69af026b1d1885bad619f864e684914189) Code clean up and transformed bundle resources into links to the already used pngs of the main iOS project on ShareExtension - [`41897fd`](https://github.com/bitwarden/android/commit/41897fd40233e110541b5ed4a49a557c40fd4084) Updated build.yml to include provisioning profile for iOS Share extension - [`7bfbd4e`](https://github.com/bitwarden/android/commit/7bfbd4e986878a15a2906c8e39e758608be01c7f) Adding in the missing provisioning profile - [`5964242`](https://github.com/bitwarden/android/commit/5964242b0e3d4f0f90f5249e23563b5d40c33aed) Removed .DS_Store from the iOS.ShareExtension csproj Resources - [`4b7eeb3`](https://github.com/bitwarden/android/commit/4b7eeb3d21bebbb81fefbf9380fc13b2ea0e5526) switching out the share extension profile - [`4d5e271`](https://github.com/bitwarden/android/commit/4d5e271c401c843f16561ee0953e3b8856bd7e59) Merge branch 'share_target_send_ios' of github.com:bitwarden/mobile into share_target_send_ios - [`fe73dd8`](https://github.com/bitwarden/android/commit/fe73dd81390c9b5566d66626b30d99c02cf1a5ca) Added Share extension provisioning profile configuration on export options app store for github and also removed custom info.plist config for localhost which is not necessary ### 📊 Changes **30 files changed** (+1357 additions, -132 deletions) <details> <summary>View changed files</summary> 📝 `.github/resources/export-options-app-store.plist` (+2 -0) ➕ `.github/secrets/dist_share_extension.mobileprovision.gpg` (+0 -0) 📝 `.github/workflows/build.yml` (+7 -0) 📝 `bitwarden-mobile.sln` (+65 -32) 📝 `src/App/Models/AppOptions.cs` (+2 -0) 📝 `src/App/Pages/Send/SendAddEditPage.xaml` (+3 -2) 📝 `src/App/Pages/Send/SendAddEditPage.xaml.cs` (+68 -33) 📝 `src/App/Pages/Send/SendAddEditPageViewModel.cs` (+63 -17) 📝 `src/App/Resources/AppResources.Designer.cs` (+6 -0) 📝 `src/App/Resources/AppResources.resx` (+6 -0) 📝 `src/Core/Services/FileUploadService.cs` (+1 -0) 📝 `src/Core/Services/SendService.cs` (+2 -2) ➕ `src/Core/Utilities/LazyResolve.cs` (+12 -0) ➕ `src/Core/Utilities/TaskExtensions.cs` (+27 -0) 📝 `src/iOS.Autofill/iOS.Autofill.csproj` (+8 -6) 📝 `src/iOS.Core/Constants.cs` (+1 -0) 📝 `src/iOS.Core/Utilities/iOSCoreHelpers.cs` (+1 -1) 📝 `src/iOS.Extension/MainInterface.storyboard` (+31 -28) 📝 `src/iOS.Extension/iOS.Extension.csproj` (+6 -6) ➕ `src/iOS.ShareExtension/Entitlements.plist` (+14 -0) _...and 10 more files_ </details> ### 📄 Description ## Type of change - [ ] Bug fix - [X] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> This PR introduces Share app extension on iOS, i.e. the ability to make a Send from other apps to Bitwarden, e.g. from photos select a picture and share it to Send. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> Mainly a new project was added: **"iOS.ShareExtension"** . Also there were some code improvements and try catches added on places where the app may crash. * **AppOptions**, **SendAddEditPage.xaml**, **SendAddEditPageViewModel.cs**: The "Share this Send upon save" becomes "Copy Send Link on save" on the iOS share extension due to some OS limitations to display the native share dialog on the extension after saving. * **iOSCoreHelpers:** Fixed bug where if we send `details.ConfirmText` `null` then the behavior was not the intended one leading the app to crash on some places. ## Screenshots <!--Required for any UI changes. Delete if not applicable--> You can see the Bitwarden icon to share on other apps now working as expected. ![image](https://user-images.githubusercontent.com/15682323/142047847-7f37fb7f-6cfb-4e8b-b7e1-df693ee1a52e.png) ## Testing requirements <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> The main focus for this is to share text and files from other apps to Bitwarden. So we should test sharing from the Photos app, from Files app (other than photos, like a movie or a PDF), text selection from any app like Safari. Also, just in case test that only on the iOS sharing app extension the "Share this Send upon save" toggle changes to "Copy Send Link on save" and that the behavior works as expected. ## Before you submit - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [X] This change requires a **documentation update** (notify the documentation team) - [ ] This change has particular **deployment requirements** (notify the DevOps team) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:27:17 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3025