diff --git a/.github/resources/export-options-app-store.plist b/.github/resources/export-options-app-store.plist
index 92b07238b..df3ed635b 100644
--- a/.github/resources/export-options-app-store.plist
+++ b/.github/resources/export-options-app-store.plist
@@ -12,6 +12,8 @@
Dist: Autofill 2021
com.8bit.bitwarden.find-login-action-extension
Dist: Extension 2021
+ com.8bit.bitwarden.share-extension
+ Dist: Share Extension 2021
diff --git a/.github/secrets/dist_share_extension.mobileprovision.gpg b/.github/secrets/dist_share_extension.mobileprovision.gpg
new file mode 100644
index 000000000..0fad3826d
Binary files /dev/null and b/.github/secrets/dist_share_extension.mobileprovision.gpg differ
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 20128af67..7578e3849 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -382,6 +382,8 @@ jobs:
--output $HOME/secrets/dist_bitwarden.mobileprovision ./.github/secrets/dist_bitwarden.mobileprovision.gpg
gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
--output $HOME/secrets/dist_extension.mobileprovision ./.github/secrets/dist_extension.mobileprovision.gpg
+ gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
+ --output $HOME/secrets/dist_share_extension.mobileprovision ./.github/secrets/dist_share_extension.mobileprovision.gpg
shell: bash
- name: Increment version
@@ -395,6 +397,7 @@ jobs:
perl -0777 -pi.bak -e 's/CFBundleVersion<\/key>\s*1<\/string>/CFBundleVersion<\/key>\n\t'"$BUILD_NUMBER"'<\/string>/' ./src/iOS/Info.plist
perl -0777 -pi.bak -e 's/CFBundleVersion<\/key>\s*1<\/string>/CFBundleVersion<\/key>\n\t'"$BUILD_NUMBER"'<\/string>/' ./src/iOS.Extension/Info.plist
perl -0777 -pi.bak -e 's/CFBundleVersion<\/key>\s*1<\/string>/CFBundleVersion<\/key>\n\t'"$BUILD_NUMBER"'<\/string>/' ./src/iOS.Autofill/Info.plist
+ perl -0777 -pi.bak -e 's/CFBundleVersion<\/key>\s*1<\/string>/CFBundleVersion<\/key>\n\t'"$BUILD_NUMBER"'<\/string>/' ./src/iOS.ShareExtension/Info.plist
shell: bash
- name: Update Entitlements
@@ -428,6 +431,7 @@ jobs:
AUTOFILL_PROFILE_PATH=$HOME/secrets/dist_autofill.mobileprovision
BITWARDEN_PROFILE_PATH=$HOME/secrets/dist_bitwarden.mobileprovision
EXTENSION_PROFILE_PATH=$HOME/secrets/dist_extension.mobileprovision
+ SHARE_EXTENSION_PROFILE_PATH=$HOME/secrets/dist_share_extension.mobileprovision
PROFILES_DIR_PATH=$HOME/Library/MobileDevice/Provisioning\ Profiles
mkdir -p "$PROFILES_DIR_PATH"
@@ -440,6 +444,9 @@ jobs:
EXTENSION_UUID=$(grep UUID -A1 -a $EXTENSION_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}")
cp $EXTENSION_PROFILE_PATH "$PROFILES_DIR_PATH/$EXTENSION_UUID.mobileprovision"
+
+ SHARE_EXTENSION_UUID=$(grep UUID -A1 -a $SHARE_EXTENSION_PROFILE_PATH | grep -io "[-A-F0-9]\{36\}")
+ cp $SHARE_EXTENSION_PROFILE_PATH "$PROFILES_DIR_PATH/$SHARE_EXTENSION_UUID.mobileprovision"
shell: bash
- name: Restore packages
diff --git a/bitwarden-mobile.sln b/bitwarden-mobile.sln
index 3d74bd7c6..07434b50a 100644
--- a/bitwarden-mobile.sln
+++ b/bitwarden-mobile.sln
@@ -38,12 +38,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iOS", "src\iOS\iOS.csproj",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iOS.Extension", "src\iOS.Extension\iOS.Extension.csproj", "{324BE76C-38FA-4F11-8BB1-95C7B3B1B545}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iOS.Autofill", "src\iOS.Autofill\iOS.Autofill.csproj", "{8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "test\Common\Common.csproj", "{4085B0A5-12A9-4993-B8B8-4ACE72E62E39}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Test", "test\Core.Test\Core.Test.csproj", "{8AE548D9-A567-4E97-995E-93EC7DB0FDE0}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iOS.ShareExtension", "src\iOS.ShareExtension\iOS.ShareExtension.csproj", "{F8C3F648-EA5A-4719-8005-85D1690B1655}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iOS.Autofill", "src\iOS.Autofill\iOS.Autofill.csproj", "{8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
@@ -325,35 +327,6 @@ Global
{324BE76C-38FA-4F11-8BB1-95C7B3B1B545}.Release|iPhone.Build.0 = Release|iPhone
{324BE76C-38FA-4F11-8BB1-95C7B3B1B545}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{324BE76C-38FA-4F11-8BB1-95C7B3B1B545}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Ad-Hoc|Any CPU.Build.0 = Ad-Hoc|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.AppStore|Any CPU.Build.0 = AppStore|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.AppStore|iPhone.Build.0 = AppStore|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|Any CPU.ActiveCfg = Debug|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|iPhone.ActiveCfg = Debug|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|iPhone.Build.0 = Debug|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|iPhone.Deploy.0 = Debug|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.FDroid|Any CPU.ActiveCfg = Release|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.FDroid|Any CPU.Build.0 = Release|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.FDroid|iPhone.ActiveCfg = Release|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.FDroid|iPhone.Build.0 = Release|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.FDroid|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.FDroid|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Release|Any CPU.ActiveCfg = Release|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Release|iPhone.ActiveCfg = Release|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Release|iPhone.Build.0 = Release|iPhone
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{4085B0A5-12A9-4993-B8B8-4ACE72E62E39}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{4085B0A5-12A9-4993-B8B8-4ACE72E62E39}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
{4085B0A5-12A9-4993-B8B8-4ACE72E62E39}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
@@ -414,6 +387,65 @@ Global
{8AE548D9-A567-4E97-995E-93EC7DB0FDE0}.Release|iPhone.Build.0 = Release|Any CPU
{8AE548D9-A567-4E97-995E-93EC7DB0FDE0}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{8AE548D9-A567-4E97-995E-93EC7DB0FDE0}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Ad-Hoc|Any CPU.ActiveCfg = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Ad-Hoc|Any CPU.Build.0 = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Ad-Hoc|iPhone.ActiveCfg = Release|iPhone
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Ad-Hoc|iPhone.Build.0 = Release|iPhone
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.AppStore|Any CPU.ActiveCfg = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.AppStore|Any CPU.Build.0 = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.AppStore|iPhone.ActiveCfg = Release|iPhone
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.AppStore|iPhone.Build.0 = Release|iPhone
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.AppStore|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.AppStore|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Debug|iPhone.Build.0 = Debug|iPhone
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.FDroid|Any CPU.ActiveCfg = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.FDroid|Any CPU.Build.0 = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.FDroid|iPhone.ActiveCfg = Release|iPhone
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.FDroid|iPhone.Build.0 = Release|iPhone
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.FDroid|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.FDroid|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Release|Any CPU.ActiveCfg = Release|iPhone
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Release|Any CPU.Build.0 = Release|iPhone
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Release|iPhone.ActiveCfg = Release|iPhone
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Release|iPhone.Build.0 = Release|iPhone
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Ad-Hoc|Any CPU.Build.0 = Ad-Hoc|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.AppStore|Any CPU.Build.0 = AppStore|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.AppStore|iPhone.Build.0 = AppStore|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|Any CPU.ActiveCfg = Debug|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|iPhone.Build.0 = Debug|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|iPhone.Deploy.0 = Debug|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.FDroid|Any CPU.ActiveCfg = Release|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.FDroid|Any CPU.Build.0 = Release|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.FDroid|iPhone.ActiveCfg = Release|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.FDroid|iPhone.Build.0 = Release|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.FDroid|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.FDroid|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Release|Any CPU.ActiveCfg = Release|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Release|iPhone.ActiveCfg = Release|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Release|iPhone.Build.0 = Release|iPhone
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -428,9 +460,10 @@ Global
{E71F3053-056C-4381-9638-048ED73BDFF6} = {D10CA4A9-F866-40E1-B658-F69051236C71}
{599E0201-420A-4C3E-A7BA-5349F72E0B15} = {D10CA4A9-F866-40E1-B658-F69051236C71}
{324BE76C-38FA-4F11-8BB1-95C7B3B1B545} = {D10CA4A9-F866-40E1-B658-F69051236C71}
- {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A} = {D10CA4A9-F866-40E1-B658-F69051236C71}
{4085B0A5-12A9-4993-B8B8-4ACE72E62E39} = {8904C536-C67D-420F-9971-51B26574C3AA}
{8AE548D9-A567-4E97-995E-93EC7DB0FDE0} = {8904C536-C67D-420F-9971-51B26574C3AA}
+ {F8C3F648-EA5A-4719-8005-85D1690B1655} = {D10CA4A9-F866-40E1-B658-F69051236C71}
+ {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A} = {D10CA4A9-F866-40E1-B658-F69051236C71}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7D436EA3-8B7E-45D2-8D14-0730BD2E0410}
diff --git a/src/App/Models/AppOptions.cs b/src/App/Models/AppOptions.cs
index a28a76855..7d7e2b22c 100644
--- a/src/App/Models/AppOptions.cs
+++ b/src/App/Models/AppOptions.cs
@@ -21,6 +21,7 @@ namespace Bit.App.Models
public string SaveCardCode { get; set; }
public bool IosExtension { get; set; }
public Tuple CreateSend { get; set; }
+ public bool CopyInsteadOfShareAfterSaving { get; set; }
public void SetAllFrom(AppOptions o)
{
@@ -44,6 +45,7 @@ namespace Bit.App.Models
SaveCardCode = o.SaveCardCode;
IosExtension = o.IosExtension;
CreateSend = o.CreateSend;
+ CopyInsteadOfShareAfterSaving = o.CopyInsteadOfShareAfterSaving;
}
}
}
diff --git a/src/App/Pages/Send/SendAddEditPage.xaml b/src/App/Pages/Send/SendAddEditPage.xaml
index eac5429c7..b72250979 100644
--- a/src/App/Pages/Send/SendAddEditPage.xaml
+++ b/src/App/Pages/Send/SendAddEditPage.xaml
@@ -235,9 +235,10 @@
Margin="10,0,0,0" />
-
+
diff --git a/src/App/Pages/Send/SendAddEditPage.xaml.cs b/src/App/Pages/Send/SendAddEditPage.xaml.cs
index c58a04cae..97f755429 100644
--- a/src/App/Pages/Send/SendAddEditPage.xaml.cs
+++ b/src/App/Pages/Send/SendAddEditPage.xaml.cs
@@ -7,6 +7,9 @@ using Bit.App.Utilities;
using Bit.Core.Abstractions;
using Bit.Core.Enums;
using Bit.Core.Utilities;
+#if !FDROID
+using Microsoft.AppCenter.Crashes;
+#endif
using Xamarin.Forms;
using Xamarin.Forms.PlatformConfiguration;
using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
@@ -22,6 +25,9 @@ namespace Bit.App.Pages
private AppOptions _appOptions;
private SendAddEditPageViewModel _vm;
+ public Action OnClose { get; set; }
+ public Action AfterSubmit { get; set; }
+
public SendAddEditPage(
AppOptions appOptions = null,
string sendId = null,
@@ -82,42 +88,66 @@ namespace Bit.App.Pages
protected override async void OnAppearing()
{
base.OnAppearing();
- if (!await AppHelpers.IsVaultTimeoutImmediateAsync())
+
+ try
{
- await _vaultTimeoutService.CheckVaultTimeoutAsync();
- }
- if (await _vaultTimeoutService.IsLockedAsync())
- {
- return;
- }
- await _vm.InitAsync();
- _broadcasterService.Subscribe(nameof(SendAddEditPage), message =>
- {
- if (message.Command == "selectFileResult")
+ if (!await AppHelpers.IsVaultTimeoutImmediateAsync())
{
- Device.BeginInvokeOnMainThread(() =>
- {
- var data = message.Data as Tuple;
- _vm.FileData = data.Item1;
- _vm.FileName = data.Item2;
- });
+ await _vaultTimeoutService.CheckVaultTimeoutAsync();
}
- });
- await LoadOnAppearedAsync(_scrollView, true, async () =>
- {
- var success = await _vm.LoadAsync();
- if (!success)
+ if (await _vaultTimeoutService.IsLockedAsync())
{
- await Navigation.PopModalAsync();
return;
}
- await HandleCreateRequest();
- if (!_vm.EditMode && string.IsNullOrWhiteSpace(_vm.Send?.Name))
+ await _vm.InitAsync();
+ _broadcasterService.Subscribe(nameof(SendAddEditPage), message =>
{
- RequestFocus(_nameEntry);
- }
- AdjustToolbar();
- });
+ if (message.Command == "selectFileResult")
+ {
+ Device.BeginInvokeOnMainThread(() =>
+ {
+ var data = message.Data as Tuple;
+ _vm.FileData = data.Item1;
+ _vm.FileName = data.Item2;
+ });
+ }
+ });
+
+ await LoadOnAppearedAsync(_scrollView, true, async () =>
+ {
+ var success = await _vm.LoadAsync();
+ if (!success)
+ {
+ await CloseAsync();
+ return;
+ }
+ await HandleCreateRequest();
+ if (!_vm.EditMode && string.IsNullOrWhiteSpace(_vm.Send?.Name))
+ {
+ RequestFocus(_nameEntry);
+ }
+ AdjustToolbar();
+ });
+ }
+ catch (Exception ex)
+ {
+#if !FDROID
+ Crashes.TrackError(ex);
+#endif
+ await CloseAsync();
+ }
+ }
+
+ private async Task CloseAsync()
+ {
+ if (OnClose is null)
+ {
+ await Navigation.PopModalAsync();
+ }
+ else
+ {
+ OnClose();
+ }
}
protected override bool OnBackButtonPressed()
@@ -200,7 +230,11 @@ namespace Bit.App.Pages
{
if (DoOnce())
{
- await _vm.SubmitAsync();
+ var submitted = await _vm.SubmitAsync();
+ if (submitted)
+ {
+ AfterSubmit?.Invoke();
+ }
}
}
@@ -234,7 +268,7 @@ namespace Bit.App.Pages
{
if (await _vm.DeleteAsync())
{
- await Navigation.PopModalAsync();
+ await CloseAsync();
}
}
}
@@ -274,7 +308,7 @@ namespace Bit.App.Pages
{
if (await _vm.DeleteAsync())
{
- await Navigation.PopModalAsync();
+ await CloseAsync();
}
}
}
@@ -283,7 +317,7 @@ namespace Bit.App.Pages
{
if (DoOnce())
{
- await Navigation.PopModalAsync();
+ await CloseAsync();
}
}
@@ -306,6 +340,7 @@ namespace Bit.App.Pages
}
_vm.IsAddFromShare = true;
+ _vm.CopyInsteadOfShareAfterSaving = _appOptions.CopyInsteadOfShareAfterSaving;
var name = _appOptions.CreateSend.Item2;
_vm.Send.Name = name;
diff --git a/src/App/Pages/Send/SendAddEditPageViewModel.cs b/src/App/Pages/Send/SendAddEditPageViewModel.cs
index 6524a967e..e0dac3c35 100644
--- a/src/App/Pages/Send/SendAddEditPageViewModel.cs
+++ b/src/App/Pages/Send/SendAddEditPageViewModel.cs
@@ -10,6 +10,9 @@ using Bit.Core.Enums;
using Bit.Core.Exceptions;
using Bit.Core.Models.View;
using Bit.Core.Utilities;
+#if !FDROID
+using Microsoft.AppCenter.Crashes;
+#endif
using Xamarin.Essentials;
using Xamarin.Forms;
@@ -46,6 +49,7 @@ namespace Bit.App.Pages
};
private bool _disableHideEmail;
private bool _sendOptionsPolicyInEffect;
+ private bool _copyInsteadOfShareAfterSaving;
public SendAddEditPageViewModel()
{
@@ -97,6 +101,7 @@ namespace Bit.App.Pages
public bool ShareOnSave { get; set; }
public bool DisableHideEmailControl { get; set; }
public bool IsAddFromShare { get; set; }
+ public string ShareOnSaveText => CopyInsteadOfShareAfterSaving ? AppResources.CopySendLinkOnSave : AppResources.ShareOnSave;
public List> TypeOptions { get; }
public List> DeletionTypeOptions { get; }
public List> ExpirationTypeOptions { get; }
@@ -175,6 +180,15 @@ namespace Bit.App.Pages
}
}
}
+ public bool CopyInsteadOfShareAfterSaving
+ {
+ get => _copyInsteadOfShareAfterSaving;
+ set
+ {
+ SetProperty(ref _copyInsteadOfShareAfterSaving, value);
+ TriggerPropertyChanged(nameof(ShareOnSaveText));
+ }
+ }
public SendView Send
{
get => _send;
@@ -397,25 +411,36 @@ namespace Bit.App.Pages
EditMode ? AppResources.SendUpdated : AppResources.NewSendCreated);
}
- if (IsAddFromShare && Device.RuntimePlatform == Device.Android)
+ if (!CopyInsteadOfShareAfterSaving)
{
- _deviceActionService.CloseMainApp();
+ await CloseAsync();
}
- else
- {
- await Page.Navigation.PopModalAsync();
- }
-
+
if (ShareOnSave)
{
var savedSend = await _sendService.GetAsync(sendId);
if (savedSend != null)
{
var savedSendView = await savedSend.DecryptAsync();
- await AppHelpers.ShareSendUrlAsync(savedSendView);
+ if (CopyInsteadOfShareAfterSaving)
+ {
+ await AppHelpers.CopySendUrlAsync(savedSendView);
+
+ // wait so that the user sees the message before the view gets dismissed
+ await Task.Delay(1300);
+ }
+ else
+ {
+ await AppHelpers.ShareSendUrlAsync(savedSendView);
+ }
}
}
-
+
+ if (CopyInsteadOfShareAfterSaving)
+ {
+ await CloseAsync();
+ }
+
return true;
}
catch (ApiException e)
@@ -427,9 +452,37 @@ namespace Bit.App.Pages
AppResources.AnErrorHasOccurred);
}
}
+ catch (Exception ex)
+ {
+ await _deviceActionService.HideLoadingAsync();
+#if !FDROID
+ Crashes.TrackError(ex);
+#endif
+ await _platformUtilsService.ShowDialogAsync(AppResources.AnErrorHasOccurred);
+ }
return false;
}
+ private async Task CloseAsync()
+ {
+ if (IsAddFromShare)
+ {
+ if (Device.RuntimePlatform == Device.Android)
+ {
+ _deviceActionService.CloseMainApp();
+ return;
+ }
+
+ if (Page is SendAddEditPage sendPage && sendPage.OnClose != null)
+ {
+ sendPage.OnClose();
+ return;
+ }
+ }
+
+ await Page.Navigation.PopModalAsync();
+ }
+
public async Task RemovePasswordAsync()
{
return await AppHelpers.RemoveSendPasswordAsync(SendId);
@@ -455,14 +508,7 @@ namespace Bit.App.Pages
if (!SendEnabled)
{
await _platformUtilsService.ShowDialogAsync(AppResources.SendDisabledWarning);
- if (IsAddFromShare && Device.RuntimePlatform == Device.Android)
- {
- _deviceActionService.CloseMainApp();
- }
- else
- {
- await Page.Navigation.PopModalAsync();
- }
+ await CloseAsync();
return;
}
if (Send != null)
diff --git a/src/App/Resources/AppResources.Designer.cs b/src/App/Resources/AppResources.Designer.cs
index 616eee7a8..c790f6f40 100644
--- a/src/App/Resources/AppResources.Designer.cs
+++ b/src/App/Resources/AppResources.Designer.cs
@@ -3767,6 +3767,12 @@ namespace Bit.App.Resources {
}
}
+ public static string CopySendLinkOnSave {
+ get {
+ return ResourceManager.GetString("CopySendLinkOnSave", resourceCulture);
+ }
+ }
+
public static string SendingCode {
get {
return ResourceManager.GetString("SendingCode", resourceCulture);
diff --git a/src/App/Resources/AppResources.resx b/src/App/Resources/AppResources.resx
index 4e0349390..746658a19 100644
--- a/src/App/Resources/AppResources.resx
+++ b/src/App/Resources/AppResources.resx
@@ -2111,12 +2111,18 @@
Invalid Verification Code.
+
+ Request one-time password
+
Send Code
Sending
+
+ Copy Send link on save
+
Sending code
diff --git a/src/Core/Core.csproj b/src/Core/Core.csproj
index 5b7d9d959..09129dec5 100644
--- a/src/Core/Core.csproj
+++ b/src/Core/Core.csproj
@@ -28,6 +28,7 @@
+
diff --git a/src/Core/Services/FileUploadService.cs b/src/Core/Services/FileUploadService.cs
index 75dab9cf3..28856ed96 100644
--- a/src/Core/Services/FileUploadService.cs
+++ b/src/Core/Services/FileUploadService.cs
@@ -64,6 +64,7 @@ namespace Bit.Core.Services {
var response = await _apiService.RenewFileUploadUrlAsync(uploadData.SendResponse.Id, uploadData.SendResponse.File.Id);
return response.Url;
};
+
await _azureFileUploadService.Upload(uploadData.Url, encryptedFileData, renewalCallback);
break;
default:
diff --git a/src/Core/Services/SendService.cs b/src/Core/Services/SendService.cs
index 7eeacba55..d0b535df8 100644
--- a/src/Core/Services/SendService.cs
+++ b/src/Core/Services/SendService.cs
@@ -219,7 +219,7 @@ namespace Bit.Core.Services
{
response = await LegacyServerSendFileUpload(request, send, encryptedFileData);
}
- catch
+ catch
{
if (response != default){
await _apiService.DeleteSendAsync(response.Id);
diff --git a/src/Core/Utilities/LazyResolve.cs b/src/Core/Utilities/LazyResolve.cs
new file mode 100644
index 000000000..3fedfecd0
--- /dev/null
+++ b/src/Core/Utilities/LazyResolve.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace Bit.Core.Utilities
+{
+ public class LazyResolve : Lazy
+ {
+ public LazyResolve(string containerKey)
+ : base(() => ServiceContainer.Resolve(containerKey))
+ {
+ }
+ }
+}
diff --git a/src/Core/Utilities/TaskExtensions.cs b/src/Core/Utilities/TaskExtensions.cs
new file mode 100644
index 000000000..8e3eb8a6f
--- /dev/null
+++ b/src/Core/Utilities/TaskExtensions.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Threading.Tasks;
+#if !FDROID
+using Microsoft.AppCenter.Crashes;
+#endif
+
+namespace Bit.Core.Utilities
+{
+ public static class TaskExtensions
+ {
+ ///
+ /// Fires a task and ignores any exception.
+ /// See http://stackoverflow.com/a/22864616/344182
+ ///
+ /// The task to be forgotten.
+ /// Action to be called on exception.
+ public static async void FireAndForget(this Task task, Action onException = null)
+ {
+ try
+ {
+ await task.ConfigureAwait(false);
+ }
+ catch (Exception ex)
+ {
+#if !FDROID
+ Crashes.TrackError(ex);
+#endif
+ onException?.Invoke(ex);
+ }
+ }
+ }
+}
diff --git a/src/iOS.Autofill/iOS.Autofill.csproj b/src/iOS.Autofill/iOS.Autofill.csproj
index 535a46ebc..451361ac6 100644
--- a/src/iOS.Autofill/iOS.Autofill.csproj
+++ b/src/iOS.Autofill/iOS.Autofill.csproj
@@ -41,7 +41,7 @@
false
Entitlements.plist
NSUrlSessionHandler
- --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
true
iPhone Distribution
Dist: Autofill
@@ -79,7 +79,7 @@
Full
NSUrlSessionHandler
true
- --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
Dist: Autofill
@@ -93,7 +93,7 @@
false
prompt
MinimumRecommendedRules.ruleset
- --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
true
NSUrlSessionHandler
Full
@@ -101,6 +101,7 @@
iPhone Distribution
Entitlements.plist
Dist: Autofill
+ x86_64
bin\iPhone\AppStore\
@@ -111,7 +112,7 @@
prompt
MinimumRecommendedRules.ruleset
Full
- --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
true
ARM64
10.2
@@ -127,7 +128,7 @@
false
prompt
MinimumRecommendedRules.ruleset
- --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
true
Full
NSUrlSessionHandler
@@ -135,6 +136,7 @@
iPhone Distribution
Adhoc: Autofill
Entitlements.plist
+ x86_64
bin\iPhone\Ad-Hoc\
@@ -147,7 +149,7 @@
ARM64
NSUrlSessionHandler
Full
- --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
true
iPhone Distribution
Entitlements.plist
diff --git a/src/iOS.Core/Constants.cs b/src/iOS.Core/Constants.cs
index 54d769d87..402988dd7 100644
--- a/src/iOS.Core/Constants.cs
+++ b/src/iOS.Core/Constants.cs
@@ -29,6 +29,7 @@
public const string UTTypeAppExtensionFillBrowserAction = "org.appextension.fill-browser-action";
public const string UTTypeAppExtensionSetup = "com.8bit.bitwarden.extension-setup";
public const string UTTypeAppExtensionUrl = "public.url";
+ public const string UTTypeAppExtensionImage = "public.image";
public const string AutofillNeedsIdentityReplacementKey = "autofillNeedsIdentityReplacement";
}
diff --git a/src/iOS.Core/Utilities/iOSCoreHelpers.cs b/src/iOS.Core/Utilities/iOSCoreHelpers.cs
index e66683f72..633803c81 100644
--- a/src/iOS.Core/Utilities/iOSCoreHelpers.cs
+++ b/src/iOS.Core/Utilities/iOSCoreHelpers.cs
@@ -111,7 +111,7 @@ namespace Bit.iOS.Core.Utilities
NSRunLoop.Main.BeginInvokeOnMainThread(async () =>
{
var result = await deviceActionService.DisplayAlertAsync(details.Title, details.Text,
- details.CancelText, details.ConfirmText);
+ details.CancelText, confirmText);
var confirmed = result == details.ConfirmText;
messagingService.Send("showDialogResolve", new Tuple(details.DialogId, confirmed));
});
diff --git a/src/iOS.Extension/MainInterface.storyboard b/src/iOS.Extension/MainInterface.storyboard
index ce0102833..6db5c12b2 100644
--- a/src/iOS.Extension/MainInterface.storyboard
+++ b/src/iOS.Extension/MainInterface.storyboard
@@ -1,7 +1,8 @@
-
-
+
+
+
-
+
@@ -14,11 +15,11 @@
-
+
-
+
@@ -27,11 +28,11 @@
+
-
@@ -43,7 +44,7 @@
-
+
@@ -60,7 +61,7 @@
-
+
@@ -77,7 +78,7 @@
-
+
@@ -93,8 +94,9 @@
-
+
+
@@ -129,14 +131,14 @@
-
+
-
+
-
+
+
+
+
-
\ No newline at end of file
+
diff --git a/src/iOS.Extension/iOS.Extension.csproj b/src/iOS.Extension/iOS.Extension.csproj
index 952c0c8f2..8907ca640 100644
--- a/src/iOS.Extension/iOS.Extension.csproj
+++ b/src/iOS.Extension/iOS.Extension.csproj
@@ -41,7 +41,7 @@
false
Entitlements.plist
NSUrlSessionHandler
- --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
true
9.3
iPhone Distribution
@@ -76,7 +76,7 @@
ARM64
false
iPhone Distribution
- --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
true
NSUrlSessionHandler
Full
@@ -95,7 +95,7 @@
MinimumRecommendedRules.ruleset
Full
NSUrlSessionHandler
- --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
true
9.3
iPhone Distribution
@@ -110,7 +110,7 @@
false
prompt
MinimumRecommendedRules.ruleset
- --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
true
NSUrlSessionHandler
ARM64
@@ -128,7 +128,7 @@
false
prompt
MinimumRecommendedRules.ruleset
- --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
true
NSUrlSessionHandler
Full
@@ -148,7 +148,7 @@
ARM64
Full
NSUrlSessionHandler
- --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
true
iPhone Distribution
Automatic:AdHoc
diff --git a/src/iOS.ShareExtension/Entitlements.plist b/src/iOS.ShareExtension/Entitlements.plist
new file mode 100644
index 000000000..b20900dcc
--- /dev/null
+++ b/src/iOS.ShareExtension/Entitlements.plist
@@ -0,0 +1,14 @@
+
+
+
+
+ com.apple.security.application-groups
+
+ group.com.8bit.bitwarden
+
+ keychain-access-groups
+
+ $(AppIdentifierPrefix)com.8bit.bitwarden
+
+
+
diff --git a/src/iOS.ShareExtension/Info.plist b/src/iOS.ShareExtension/Info.plist
new file mode 100644
index 000000000..bceb02f61
--- /dev/null
+++ b/src/iOS.ShareExtension/Info.plist
@@ -0,0 +1,104 @@
+
+
+
+
+ CFBundleDisplayName
+ Bitwarden Share
+ CFBundleName
+ Bitwarden Share Extension
+ CFBundleIdentifier
+ com.8bit.bitwarden.share-extension
+ CFBundleDevelopmentRegion
+ en
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ XPC!
+ CFBundleShortVersionString
+ 2.14.2
+ CFBundleVersion
+ 1
+ MinimumOSVersion
+ 10.0
+ NSExtension
+
+ NSExtensionMainStoryboard
+ MainInterface
+ NSExtensionPointIdentifier
+ com.apple.share-services
+ NSExtensionAttributes
+
+ NSExtensionActivationRule
+
+ NSExtensionActivationSupportsFileWithMaxCount
+ 1
+ NSExtensionActivationSupportsText
+
+ NSExtensionActivationSupportsImageWithMaxCount
+ 1
+
+
+
+ CFBundleLocalizations
+
+ en
+ es
+ zh-Hans
+ zh-Hant
+ pt-PT
+ pt-BR
+ sv
+ sk
+ it
+ fi
+ fr
+ ro
+ id
+ hr
+ hu
+ nl
+ tr
+ uk
+ de
+ dk
+ cz
+ nb
+ ja
+ et
+ vi
+ pl
+ ko
+ fa
+ ru
+ be
+ bg
+ ca
+ cs
+ el
+ th
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UISupportedInterfaceOrientations
+
+ UIAppFonts
+
+ bwi-font.ttf
+ MaterialIcons_Regular.ttf
+
+ CADisableMinimumFrameDurationOnPhone
+
+ UIRequiredDeviceCapabilities
+
+ arm64
+
+
+ ITSAppUsesNonExemptEncryption
+
+ ITSEncryptionExportComplianceCode
+ ecf076d3-4824-4d7b-b716-2a9a47d7d296
+
+
diff --git a/src/iOS.ShareExtension/LoadingViewController.cs b/src/iOS.ShareExtension/LoadingViewController.cs
new file mode 100644
index 000000000..651fe21ec
--- /dev/null
+++ b/src/iOS.ShareExtension/LoadingViewController.cs
@@ -0,0 +1,428 @@
+using System;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using AuthenticationServices;
+using Bit.App.Abstractions;
+using Bit.App.Models;
+using Bit.App.Pages;
+using Bit.App.Utilities;
+using Bit.Core.Abstractions;
+using Bit.Core.Enums;
+using Bit.Core.Utilities;
+using Bit.iOS.Core;
+using Bit.iOS.Core.Controllers;
+using Bit.iOS.Core.Utilities;
+using Bit.iOS.Core.Views;
+using Bit.iOS.ShareExtension.Models;
+using CoreNFC;
+using Foundation;
+using Microsoft.AppCenter.Crashes;
+using MobileCoreServices;
+using UIKit;
+using Xamarin.Forms;
+
+namespace Bit.iOS.ShareExtension
+{
+ public partial class LoadingViewController : ExtendedUIViewController
+ {
+ private Context _context = new Context();
+ private bool _initedAppCenter;
+ private NFCNdefReaderSession _nfcSession = null;
+ private Core.NFCReaderDelegate _nfcDelegate = null;
+
+ readonly LazyResolve _userService = new LazyResolve("userService");
+ readonly LazyResolve _vaultTimeoutService = new LazyResolve("vaultTimeoutService");
+ readonly LazyResolve _deviceActionService = new LazyResolve("deviceActionService");
+ readonly LazyResolve _eventService = new LazyResolve("eventService");
+
+ public LoadingViewController(IntPtr handle)
+ : base(handle)
+ { }
+
+ public override void ViewDidLoad()
+ {
+ InitApp();
+
+ base.ViewDidLoad();
+
+ Logo.Image = new UIImage(ThemeHelpers.LightTheme ? "logo.png" : "logo_white.png");
+ View.BackgroundColor = ThemeHelpers.SplashBackgroundColor;
+ _context.ExtensionContext = ExtensionContext;
+
+ foreach (var item in ExtensionContext.InputItems)
+ {
+ var processed = false;
+ foreach (var itemProvider in item.Attachments)
+ {
+ if (itemProvider.HasItemConformingTo(UTType.PlainText))
+ {
+ _context.ProviderType = UTType.PlainText;
+
+ processed = true;
+ break;
+ }
+ else if (itemProvider.HasItemConformingTo(UTType.Data))
+ {
+ _context.ProviderType = UTType.Data;
+
+ processed = true;
+ break;
+ }
+ }
+ if (processed)
+ {
+ break;
+ }
+ }
+ }
+
+ public override async void ViewDidAppear(bool animated)
+ {
+ base.ViewDidAppear(animated);
+
+ try
+ {
+ if (!await IsAuthed())
+ {
+ LaunchHomePage();
+ return;
+ }
+ else if (await IsLocked())
+ {
+ PerformSegue("lockPasswordSegue", this);
+ }
+ else
+ {
+ ContinueOnAsync().FireAndForget();
+ }
+ }
+ catch (Exception ex)
+ {
+ Crashes.TrackError(ex);
+ }
+ }
+
+ public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender)
+ {
+ if (segue.DestinationViewController is UINavigationController navController
+ &&
+ navController.TopViewController is LockPasswordViewController passwordViewController)
+ {
+ passwordViewController.LoadingController = this;
+ segue.DestinationViewController.PresentationController.Delegate =
+ new CustomPresentationControllerDelegate(passwordViewController.DismissModalAction);
+ }
+ }
+
+ public void DismissLockAndContinue()
+ {
+ Debug.WriteLine("BW Log, Dismissing lock controller.");
+ DismissViewController(false, () => ContinueOnAsync().FireAndForget());
+ }
+
+ private async Task ContinueOnAsync()
+ {
+ Tuple createSend = null;
+
+ if (_context.ProviderType == UTType.Data)
+ {
+ var (filename, fileBytes) = await LoadDataBytesAsync();
+ createSend = new Tuple(SendType.File, filename, fileBytes, null);
+ }
+ else if (_context.ProviderType == UTType.PlainText)
+ {
+ createSend = new Tuple(SendType.Text, null, null, LoadText());
+ }
+
+ var appOptions = new AppOptions
+ {
+ IosExtension = true,
+ CreateSend = createSend,
+ CopyInsteadOfShareAfterSaving = true
+ };
+ var sendAddEditPage = new SendAddEditPage(appOptions)
+ {
+ OnClose = () => CompleteRequest(),
+ AfterSubmit = () => CompleteRequest()
+ };
+
+ var app = new App.App(appOptions);
+ ThemeManager.SetTheme(false, app.Resources);
+ ThemeManager.ApplyResourcesToPage(sendAddEditPage);
+
+ var navigationPage = new NavigationPage(sendAddEditPage);
+ var sendAddEditController = navigationPage.CreateViewController();
+ sendAddEditController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
+ PresentViewController(sendAddEditController, true, null);
+ }
+
+ private async Task<(string, byte[])> LoadDataBytesAsync()
+ {
+ var itemProvider = ExtensionContext?.InputItems.FirstOrDefault()?.Attachments?.FirstOrDefault();
+ if (itemProvider is null || !itemProvider.HasItemConformingTo(UTType.Data))
+ return default;
+
+ var item = await itemProvider.LoadItemAsync(UTType.Data, null);
+ if (item is NSUrl urlItem)
+ {
+ var filename = urlItem?.AbsoluteUrl?.LastPathComponent;
+
+ var data = NSData.FromUrl(urlItem);
+ var stream = NSInputStream.FromData(data);
+ var bytes = new byte[data.Length];
+ try
+ {
+ stream.Open();
+ stream.Read(bytes, data.Length);
+ }
+ finally
+ {
+ stream?.Close();
+ }
+
+ return (filename, bytes);
+ }
+
+ return default;
+ }
+
+ private string LoadText()
+ {
+ return ExtensionContext?.InputItems
+ .FirstOrDefault()
+ ?.AttributedContentText?.Value;
+ }
+
+ public void CompleteRequest()
+ {
+ NSRunLoop.Main.BeginInvokeOnMainThread(() =>
+ {
+ ServiceContainer.Reset();
+ ExtensionContext?.CompleteRequest(new NSExtensionItem[0], null);
+ });
+ }
+
+ private void InitApp()
+ {
+ // Init Xamarin Forms
+ Forms.Init();
+
+ if (ServiceContainer.RegisteredServices.Count > 0)
+ {
+ ServiceContainer.Reset();
+ }
+ iOSCoreHelpers.RegisterLocalServices();
+ var messagingService = ServiceContainer.Resolve("messagingService");
+ ServiceContainer.Init(_deviceActionService.Value.DeviceUserAgent,
+ Bit.Core.Constants.iOSExtensionClearCiphersCacheKey, Bit.Core.Constants.iOSAllClearCipherCacheKeys);
+ if (!_initedAppCenter)
+ {
+ iOSCoreHelpers.RegisterAppCenter();
+ _initedAppCenter = true;
+ }
+ iOSCoreHelpers.Bootstrap();
+
+ var app = new App.App(new AppOptions { IosExtension = true });
+ ThemeManager.SetTheme(false, app.Resources);
+
+ iOSCoreHelpers.AppearanceAdjustments();
+ _nfcDelegate = new NFCReaderDelegate((success, message) =>
+ messagingService.Send("gotYubiKeyOTP", message));
+ iOSCoreHelpers.SubscribeBroadcastReceiver(this, _nfcSession, _nfcDelegate);
+ }
+
+ private Task IsLocked()
+ {
+ return _vaultTimeoutService.Value.IsLockedAsync();
+ }
+
+ private Task IsAuthed()
+ {
+ return _userService.Value.IsAuthenticatedAsync();
+ }
+
+ private void LogoutIfAuthed()
+ {
+ NSRunLoop.Main.BeginInvokeOnMainThread(async () =>
+ {
+ if (await IsAuthed())
+ {
+ await AppHelpers.LogOutAsync();
+ if (_deviceActionService.Value.SystemMajorVersion() >= 12)
+ {
+ await ASCredentialIdentityStore.SharedStore?.RemoveAllCredentialIdentitiesAsync();
+ }
+ }
+ });
+ }
+
+ private void LaunchHomePage()
+ {
+ var homePage = new HomePage();
+ var app = new App.App(new AppOptions { IosExtension = true });
+ ThemeManager.SetTheme(false, app.Resources);
+ ThemeManager.ApplyResourcesToPage(homePage);
+ if (homePage.BindingContext is HomeViewModel vm)
+ {
+ vm.StartLoginAction = () => DismissViewController(false, () => LaunchLoginFlow());
+ vm.StartRegisterAction = () => DismissViewController(false, () => LaunchRegisterFlow());
+ vm.StartSsoLoginAction = () => DismissViewController(false, () => LaunchLoginSsoFlow());
+ vm.StartEnvironmentAction = () => DismissViewController(false, () => LaunchEnvironmentFlow());
+ vm.CloseAction = () => CompleteRequest();
+ }
+
+ var navigationPage = new NavigationPage(homePage);
+ var loginController = navigationPage.CreateViewController();
+ loginController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
+ PresentViewController(loginController, true, null);
+
+ LogoutIfAuthed();
+ }
+
+ private void LaunchEnvironmentFlow()
+ {
+ var environmentPage = new EnvironmentPage();
+ var app = new App.App(new AppOptions { IosExtension = true });
+ ThemeManager.SetTheme(false, app.Resources);
+ ThemeManager.ApplyResourcesToPage(environmentPage);
+ if (environmentPage.BindingContext is EnvironmentPageViewModel vm)
+ {
+ vm.SubmitSuccessAction = () => DismissViewController(false, () => LaunchHomePage());
+ vm.CloseAction = () => DismissViewController(false, () => LaunchHomePage());
+ }
+
+ var navigationPage = new NavigationPage(environmentPage);
+ var loginController = navigationPage.CreateViewController();
+ loginController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
+ PresentViewController(loginController, true, null);
+ }
+
+ private void LaunchRegisterFlow()
+ {
+ var registerPage = new RegisterPage(null);
+ var app = new App.App(new AppOptions { IosExtension = true });
+ ThemeManager.SetTheme(false, app.Resources);
+ ThemeManager.ApplyResourcesToPage(registerPage);
+ if (registerPage.BindingContext is RegisterPageViewModel vm)
+ {
+ vm.RegistrationSuccess = () => DismissViewController(false, () => LaunchLoginFlow(vm.Email));
+ vm.CloseAction = () => DismissViewController(false, () => LaunchHomePage());
+ }
+
+ var navigationPage = new NavigationPage(registerPage);
+ var loginController = navigationPage.CreateViewController();
+ loginController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
+ PresentViewController(loginController, true, null);
+ }
+
+ private void LaunchLoginFlow(string email = null)
+ {
+ var loginPage = new LoginPage(email);
+ var app = new App.App(new AppOptions { IosExtension = true });
+ ThemeManager.SetTheme(false, app.Resources);
+ ThemeManager.ApplyResourcesToPage(loginPage);
+ if (loginPage.BindingContext is LoginPageViewModel vm)
+ {
+ vm.StartTwoFactorAction = () => DismissViewController(false, () => LaunchTwoFactorFlow(false));
+ vm.UpdateTempPasswordAction = () => DismissViewController(false, () => LaunchUpdateTempPasswordFlow());
+ vm.LogInSuccessAction = () => DismissLockAndContinue();
+ vm.CloseAction = () => CompleteRequest();
+ }
+
+ var navigationPage = new NavigationPage(loginPage);
+ var loginController = navigationPage.CreateViewController();
+ loginController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
+ PresentViewController(loginController, true, null);
+
+ LogoutIfAuthed();
+ }
+
+ private void LaunchLoginSsoFlow()
+ {
+ var loginPage = new LoginSsoPage();
+ var app = new App.App(new AppOptions { IosExtension = true });
+ ThemeManager.SetTheme(false, app.Resources);
+ ThemeManager.ApplyResourcesToPage(loginPage);
+ if (loginPage.BindingContext is LoginSsoPageViewModel vm)
+ {
+ vm.StartTwoFactorAction = () => DismissViewController(false, () => LaunchTwoFactorFlow(true));
+ vm.StartSetPasswordAction = () => DismissViewController(false, () => LaunchSetPasswordFlow());
+ vm.UpdateTempPasswordAction = () => DismissViewController(false, () => LaunchUpdateTempPasswordFlow());
+ vm.SsoAuthSuccessAction = () => DismissLockAndContinue();
+ vm.CloseAction = () => DismissViewController(false, () => LaunchHomePage());
+ }
+
+ var navigationPage = new NavigationPage(loginPage);
+ var loginController = navigationPage.CreateViewController();
+ loginController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
+ PresentViewController(loginController, true, null);
+
+ LogoutIfAuthed();
+ }
+
+ private void LaunchTwoFactorFlow(bool authingWithSso)
+ {
+ var twoFactorPage = new TwoFactorPage();
+ var app = new App.App(new AppOptions { IosExtension = true });
+ ThemeManager.SetTheme(false, app.Resources);
+ ThemeManager.ApplyResourcesToPage(twoFactorPage);
+ if (twoFactorPage.BindingContext is TwoFactorPageViewModel vm)
+ {
+ vm.TwoFactorAuthSuccessAction = () => DismissLockAndContinue();
+ vm.StartSetPasswordAction = () => DismissViewController(false, () => LaunchSetPasswordFlow());
+ if (authingWithSso)
+ {
+ vm.CloseAction = () => DismissViewController(false, () => LaunchLoginSsoFlow());
+ }
+ else
+ {
+ vm.CloseAction = () => DismissViewController(false, () => LaunchLoginFlow());
+ }
+ vm.UpdateTempPasswordAction = () => DismissViewController(false, () => LaunchUpdateTempPasswordFlow());
+ }
+
+ var navigationPage = new NavigationPage(twoFactorPage);
+ var twoFactorController = navigationPage.CreateViewController();
+ twoFactorController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
+ PresentViewController(twoFactorController, true, null);
+ }
+
+ private void LaunchSetPasswordFlow()
+ {
+ var setPasswordPage = new SetPasswordPage();
+ var app = new App.App(new AppOptions { IosExtension = true });
+ ThemeManager.SetTheme(false, app.Resources);
+ ThemeManager.ApplyResourcesToPage(setPasswordPage);
+ if (setPasswordPage.BindingContext is SetPasswordPageViewModel vm)
+ {
+ vm.UpdateTempPasswordAction = () => DismissViewController(false, () => LaunchUpdateTempPasswordFlow());
+ vm.SetPasswordSuccessAction = () => DismissLockAndContinue();
+ vm.CloseAction = () => DismissViewController(false, () => LaunchHomePage());
+ }
+
+ var navigationPage = new NavigationPage(setPasswordPage);
+ var setPasswordController = navigationPage.CreateViewController();
+ setPasswordController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
+ PresentViewController(setPasswordController, true, null);
+ }
+
+ private void LaunchUpdateTempPasswordFlow()
+ {
+ var updateTempPasswordPage = new UpdateTempPasswordPage();
+ var app = new App.App(new AppOptions { IosExtension = true });
+ ThemeManager.SetTheme(false, app.Resources);
+ ThemeManager.ApplyResourcesToPage(updateTempPasswordPage);
+ if (updateTempPasswordPage.BindingContext is UpdateTempPasswordPageViewModel vm)
+ {
+ vm.UpdateTempPasswordSuccessAction = () => DismissViewController(false, () => LaunchHomePage());
+ vm.LogOutAction = () => DismissViewController(false, () => LaunchHomePage());
+ }
+
+ var navigationPage = new NavigationPage(updateTempPasswordPage);
+ var updateTempPasswordController = navigationPage.CreateViewController();
+ updateTempPasswordController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
+ PresentViewController(updateTempPasswordController, true, null);
+ }
+ }
+}
diff --git a/src/iOS.ShareExtension/LoadingViewController.designer.cs b/src/iOS.ShareExtension/LoadingViewController.designer.cs
new file mode 100644
index 000000000..ddfc2c077
--- /dev/null
+++ b/src/iOS.ShareExtension/LoadingViewController.designer.cs
@@ -0,0 +1,26 @@
+// WARNING
+//
+// This file has been generated automatically by Visual Studio to store outlets and
+// actions made in the UI designer. If it is removed, they will be lost.
+// Manual changes to this file may not be handled correctly.
+//
+using Foundation;
+using System.CodeDom.Compiler;
+
+namespace Bit.iOS.ShareExtension
+{
+ [Register ("LoadingViewController")]
+ partial class LoadingViewController
+ {
+ [Outlet]
+ UIKit.UIImageView Logo { get; set; }
+
+ void ReleaseDesignerOutlets ()
+ {
+ if (Logo != null) {
+ Logo.Dispose ();
+ Logo = null;
+ }
+ }
+ }
+}
diff --git a/src/iOS.ShareExtension/LockPasswordViewController.cs b/src/iOS.ShareExtension/LockPasswordViewController.cs
new file mode 100644
index 000000000..9ac9cfc36
--- /dev/null
+++ b/src/iOS.ShareExtension/LockPasswordViewController.cs
@@ -0,0 +1,40 @@
+using Bit.iOS.Core.Utilities;
+using System;
+using UIKit;
+
+namespace Bit.iOS.ShareExtension
+{
+ public partial class LockPasswordViewController : Core.Controllers.LockPasswordViewController
+ {
+ public LockPasswordViewController(IntPtr handle)
+ : base(handle)
+ {
+ BiometricIntegrityKey = Bit.Core.Constants.iOSExtensionBiometricIntegrityKey;
+ DismissModalAction = Cancel;
+ }
+
+ public LoadingViewController LoadingController { get; set; }
+ public override UINavigationItem BaseNavItem => _navItem;
+ public override UIBarButtonItem BaseCancelButton => _cancelButton;
+ public override UIBarButtonItem BaseSubmitButton => _submitButton;
+ public override Action Success => () => LoadingController.DismissLockAndContinue();
+ public override Action Cancel => () => LoadingController.CompleteRequest();
+
+ public override void ViewDidLoad()
+ {
+ base.ViewDidLoad();
+ _cancelButton.TintColor = ThemeHelpers.NavBarTextColor;
+ _submitButton.TintColor = ThemeHelpers.NavBarTextColor;
+ }
+
+ partial void SubmitButton_Activated(UIBarButtonItem sender)
+ {
+ var task = CheckPasswordAsync();
+ }
+
+ partial void CancelButton_Activated(UIBarButtonItem sender)
+ {
+ Cancel();
+ }
+ }
+}
diff --git a/src/iOS.ShareExtension/LockPasswordViewController.designer.cs b/src/iOS.ShareExtension/LockPasswordViewController.designer.cs
new file mode 100644
index 000000000..b92a198b0
--- /dev/null
+++ b/src/iOS.ShareExtension/LockPasswordViewController.designer.cs
@@ -0,0 +1,56 @@
+// WARNING
+//
+// This file has been generated automatically by Visual Studio to store outlets and
+// actions made in the UI designer. If it is removed, they will be lost.
+// Manual changes to this file may not be handled correctly.
+//
+using Foundation;
+using System.CodeDom.Compiler;
+
+namespace Bit.iOS.ShareExtension
+{
+ [Register ("LockPasswordViewController")]
+ partial class LockPasswordViewController
+ {
+ [Outlet]
+ UIKit.UIBarButtonItem _cancelButton { get; set; }
+
+ [Outlet]
+ UIKit.UITableView _mainTableView { get; set; }
+
+ [Outlet]
+ UIKit.UINavigationItem _navItem { get; set; }
+
+ [Outlet]
+ UIKit.UIBarButtonItem _submitButton { get; set; }
+
+ [Action ("CancelButton_Activated:")]
+ partial void CancelButton_Activated (UIKit.UIBarButtonItem sender);
+
+ [Action ("SubmitButton_Activated:")]
+ partial void SubmitButton_Activated (UIKit.UIBarButtonItem sender);
+
+ void ReleaseDesignerOutlets ()
+ {
+ if (_cancelButton != null) {
+ _cancelButton.Dispose ();
+ _cancelButton = null;
+ }
+
+ if (_mainTableView != null) {
+ _mainTableView.Dispose ();
+ _mainTableView = null;
+ }
+
+ if (_navItem != null) {
+ _navItem.Dispose ();
+ _navItem = null;
+ }
+
+ if (_submitButton != null) {
+ _submitButton.Dispose ();
+ _submitButton = null;
+ }
+ }
+ }
+}
diff --git a/src/iOS.ShareExtension/MainInterface.storyboard b/src/iOS.ShareExtension/MainInterface.storyboard
new file mode 100644
index 000000000..98a8e1346
--- /dev/null
+++ b/src/iOS.ShareExtension/MainInterface.storyboard
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/iOS.ShareExtension/Models/Context.cs b/src/iOS.ShareExtension/Models/Context.cs
new file mode 100644
index 000000000..22bd9e257
--- /dev/null
+++ b/src/iOS.ShareExtension/Models/Context.cs
@@ -0,0 +1,17 @@
+using Foundation;
+using Bit.iOS.Core.Models;
+
+namespace Bit.iOS.ShareExtension.Models
+{
+ public class Context : AppExtensionContext
+ {
+ public NSExtensionContext ExtensionContext { get; set; }
+ public string ProviderType { get; set; }
+ public string LoginTitle { get; set; }
+ public string Username { get; set; }
+ public string Password { get; set; }
+ public string OldPassword { get; set; }
+ public string Notes { get; set; }
+ public PageDetails Details { get; set; }
+ }
+}
diff --git a/src/iOS.ShareExtension/iOS.ShareExtension.csproj b/src/iOS.ShareExtension/iOS.ShareExtension.csproj
new file mode 100644
index 000000000..9b294eadd
--- /dev/null
+++ b/src/iOS.ShareExtension/iOS.ShareExtension.csproj
@@ -0,0 +1,235 @@
+
+
+
+ Debug
+ iPhoneSimulator
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}
+ {EE2C853D-36AF-4FDB-B1AD-8E90477E2198};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Library
+ Bit.iOS.ShareExtension
+ iOS.ShareExtension
+ Resources
+
+
+ true
+ full
+ false
+ bin\iPhoneSimulator\Debug
+ DEBUG;
+ prompt
+ 4
+ iPhone Developer
+ true
+ true
+ true
+ 52107
+ None
+ x86_64
+ NSUrlSessionHandler
+ false
+
+ Entitlements.plist
+ BitwardeniOSShareExtension
+ --nodevcodeshare --http-message-handler=NSUrlSessionHandler
+
+
+ pdbonly
+ true
+ bin\iPhone\Release
+
+ prompt
+ 4
+ iPhone Developer
+ true
+ true
+ Entitlements.plist
+ Full
+ ARM64
+ NSUrlSessionHandler
+
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
+
+
+ pdbonly
+ true
+ bin\iPhoneSimulator\Release
+
+ prompt
+ 4
+ iPhone Developer
+ true
+ None
+ x86_64
+ NSUrlSessionHandler
+
+ BitwardeniOSShareExtension
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
+
+
+ true
+ full
+ false
+ bin\iPhone\Debug
+ DEBUG;
+ prompt
+ 4
+ iPhone Developer
+ true
+ true
+ true
+ true
+ true
+ Entitlements.plist
+ 22866
+ None
+ ARM64
+ NSUrlSessionHandler
+
+ --nodevcodeshare --http-message-handler=NSUrlSessionHandler
+
+
+ bin\iPhoneSimulator\AppStore\
+ __IOS__;__MOBILE__;__UNIFIED__;
+ true
+ AnyCPU
+ false
+ prompt
+ MinimumRecommendedRules.ruleset
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
+ true
+ NSUrlSessionHandler
+ Full
+ 9.3
+ iPhone Distribution
+ Entitlements.plist
+ Dist: Autofill
+ BitwardeniOSShareExtension
+ i386
+
+
+ bin\iPhone\AppStore\
+ __IOS__;__MOBILE__;__UNIFIED__;
+ true
+ AnyCPU
+ false
+ prompt
+ MinimumRecommendedRules.ruleset
+ Full
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
+ true
+ ARM64
+ 10.2
+ iPhone Distribution
+ Automatic:AppStore
+ Entitlements.plist
+
+
+ bin\iPhoneSimulator\Ad-Hoc\
+ __IOS__;__MOBILE__;__UNIFIED__;
+ true
+ AnyCPU
+ false
+ prompt
+ MinimumRecommendedRules.ruleset
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
+ true
+ Full
+ NSUrlSessionHandler
+ 9.3
+ iPhone Distribution
+ Adhoc: Autofill
+ Entitlements.plist
+ BitwardeniOSShareExtension
+ i386
+
+
+ bin\iPhone\Ad-Hoc\
+ __IOS__;__MOBILE__;__UNIFIED__;
+ true
+ AnyCPU
+ false
+ prompt
+ MinimumRecommendedRules.ruleset
+ ARM64
+ NSUrlSessionHandler
+ Full
+ --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=BitwardeniOSShareExtension
+ true
+ iPhone Distribution
+ Entitlements.plist
+ Automatic:AdHoc
+
+
+
+
+
+
+
+
+
+
+
+ 4.4.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LoadingViewController.cs
+
+
+
+
+ LockPasswordViewController.cs
+
+
+
+
+ App
+
+
+ iOS.Core
+
+
+ Core
+
+
+
+
+ Resources\logo_white%403x.png
+
+
+ Resources\logo_white%402x.png
+
+
+ Resources\logo_white.png
+
+
+ Resources\logo%403x.png
+
+
+ Resources\logo%402x.png
+
+
+ Resources\logo.png
+
+
+ Resources\bwi-font.ttf
+
+
+ Resources\MaterialIcons_Regular.ttf
+
+
+
+
\ No newline at end of file
diff --git a/src/iOS/iOS.csproj b/src/iOS/iOS.csproj
index 97606aa95..d2caf681a 100644
--- a/src/iOS/iOS.csproj
+++ b/src/iOS/iOS.csproj
@@ -41,7 +41,7 @@
Full
x86_64
false
- --nodevcodeshare --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=CsvHelper
+ --nodevcodeshare --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=CsvHelper --linkskip=BitwardeniOSShareExtension
true
Entitlements.plist
@@ -74,7 +74,7 @@
iPhone Developer
Entitlements.plist
Full
- --nodevcodeshare --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=CsvHelper
+ --nodevcodeshare --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=CsvHelper --linkskip=BitwardeniOSShareExtension
true
@@ -89,7 +89,7 @@
iPhone Distribution
Entitlements.plist
Full
- --nodevcodeshare --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=CsvHelper
+ --nodevcodeshare --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=CsvHelper --linkskip=BitwardeniOSShareExtension
true
Automatic:AdHoc
@@ -104,7 +104,7 @@
Automatic:AppStore
iPhone Distribution
Entitlements.plist
- --nodevcodeshare --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=CsvHelper
+ --nodevcodeshare --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=CsvHelper --linkskip=BitwardeniOSShareExtension
true
Full
@@ -118,6 +118,7 @@
MinimumRecommendedRules.ruleset
--nodevcodeshare --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=CsvHelper
true
+ SdkOnly
bin\iPhone\FDroid\
@@ -127,6 +128,8 @@
false
prompt
MinimumRecommendedRules.ruleset
+ SdkOnly
+ ARMv7
@@ -208,6 +211,11 @@
true
false
+
+ true
+ {F8C3F648-EA5A-4719-8005-85D1690B1655}
+ iOS.ShareExtension
+