diff --git a/src/iOS.Core/Services/NoopDeviceActionService.cs b/src/iOS.Core/Services/NoopDeviceActionService.cs new file mode 100644 index 0000000000..df31cdd280 --- /dev/null +++ b/src/iOS.Core/Services/NoopDeviceActionService.cs @@ -0,0 +1,75 @@ +using System; +using Bit.App.Abstractions; +using System.Threading.Tasks; +using Bit.App.Models.Page; + +namespace Bit.iOS.Core.Services +{ + public class NoopDeviceActionService : IDeviceActionService + { + public void Autofill(VaultListPageModel.Cipher cipher) + { + // do nothing + } + + public void Background() + { + // do nothing + } + + public bool CanOpenFile(string fileName) + { + return false; + } + + public void ClearCache() + { + // do nothing + } + + public void CloseAutofill() + { + // do nothing + } + + public void CopyToClipboard(string text) + { + // do nothing + } + + public void DismissKeyboard() + { + // do nothing + } + + public void LaunchApp(string appName) + { + // do nothing + } + + public void OpenAccessibilitySettings() + { + // do nothing + } + + public void OpenAutofillSettings() + { + // do nothing + } + + public bool OpenFile(byte[] fileData, string id, string fileName) + { + return false; + } + + public void RateApp() + { + // do nothing + } + + public Task SelectFileAsync() + { + return Task.FromResult(0); + } + } +} diff --git a/src/iOS.Core/iOS.Core.csproj b/src/iOS.Core/iOS.Core.csproj index a2cc686636..cf24a88da5 100644 --- a/src/iOS.Core/iOS.Core.csproj +++ b/src/iOS.Core/iOS.Core.csproj @@ -86,6 +86,7 @@ + diff --git a/src/iOS.Extension/LoadingViewController.cs b/src/iOS.Extension/LoadingViewController.cs index 535ed986a4..c2501157bf 100644 --- a/src/iOS.Extension/LoadingViewController.cs +++ b/src/iOS.Extension/LoadingViewController.cs @@ -290,6 +290,7 @@ namespace Bit.iOS.Extension container.RegisterSingleton(); container.RegisterSingleton(); container.RegisterSingleton(); + container.RegisterSingleton(); container.RegisterSingleton(); // Repositories