diff --git a/src/App/App.csproj b/src/App/App.csproj
index 079224cbb..35458d047 100644
--- a/src/App/App.csproj
+++ b/src/App/App.csproj
@@ -155,6 +155,15 @@
+
+
+
+
+
+
+
+
+
@@ -235,4 +244,15 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/logo.png b/src/App/Platforms/iOS/Resources/logo.png
similarity index 100%
rename from src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/logo.png
rename to src/App/Platforms/iOS/Resources/logo.png
diff --git a/src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/logo@2x.png b/src/App/Platforms/iOS/Resources/logo@2x.png
similarity index 100%
rename from src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/logo@2x.png
rename to src/App/Platforms/iOS/Resources/logo@2x.png
diff --git a/src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/logo@3x.png b/src/App/Platforms/iOS/Resources/logo@3x.png
similarity index 100%
rename from src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/logo@3x.png
rename to src/App/Platforms/iOS/Resources/logo@3x.png
diff --git a/src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/logo_white.png b/src/App/Platforms/iOS/Resources/logo_white.png
similarity index 100%
rename from src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/logo_white.png
rename to src/App/Platforms/iOS/Resources/logo_white.png
diff --git a/src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/logo_white@2x.png b/src/App/Platforms/iOS/Resources/logo_white@2x.png
similarity index 100%
rename from src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/logo_white@2x.png
rename to src/App/Platforms/iOS/Resources/logo_white@2x.png
diff --git a/src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/logo_white@3x.png b/src/App/Platforms/iOS/Resources/logo_white@3x.png
similarity index 100%
rename from src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/logo_white@3x.png
rename to src/App/Platforms/iOS/Resources/logo_white@3x.png
diff --git a/src/iOS/Resources/more_vert.png b/src/App/Platforms/iOS/Resources/more_vert.png
similarity index 100%
rename from src/iOS/Resources/more_vert.png
rename to src/App/Platforms/iOS/Resources/more_vert.png
diff --git a/src/iOS/Resources/more_vert@2x.png b/src/App/Platforms/iOS/Resources/more_vert@2x.png
similarity index 100%
rename from src/iOS/Resources/more_vert@2x.png
rename to src/App/Platforms/iOS/Resources/more_vert@2x.png
diff --git a/src/iOS/Resources/more_vert@3x.png b/src/App/Platforms/iOS/Resources/more_vert@3x.png
similarity index 100%
rename from src/iOS/Resources/more_vert@3x.png
rename to src/App/Platforms/iOS/Resources/more_vert@3x.png
diff --git a/src/iOS.Autofill/iOS.Autofill.csproj b/src/iOS.Autofill/iOS.Autofill.csproj
index 458358fb6..3c5ab2431 100644
--- a/src/iOS.Autofill/iOS.Autofill.csproj
+++ b/src/iOS.Autofill/iOS.Autofill.csproj
@@ -121,13 +121,13 @@
-
+
Resources\more_vert.png
-
+
Resources\more_vert%402x.png
-
+
Resources\more_vert%403x.png
diff --git a/src/iOS.Extension/iOS.Extension.csproj b/src/iOS.Extension/iOS.Extension.csproj
index 0ee903fff..f374b47be 100644
--- a/src/iOS.Extension/iOS.Extension.csproj
+++ b/src/iOS.Extension/iOS.Extension.csproj
@@ -100,13 +100,13 @@
-
+
Resources\more_vert.png
-
+
Resources\more_vert%402x.png
-
+
Resources\more_vert%403x.png
diff --git a/src/iOS.ShareExtension/iOS.ShareExtension.csproj b/src/iOS.ShareExtension/iOS.ShareExtension.csproj
index fa5976b9f..b8718e428 100644
--- a/src/iOS.ShareExtension/iOS.ShareExtension.csproj
+++ b/src/iOS.ShareExtension/iOS.ShareExtension.csproj
@@ -70,37 +70,37 @@
-
+
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\more_vert.png
-
+
Resources\more_vert%402x.png
-
+
Resources\more_vert%403x.png
-
+
Resources\bwi-font.ttf
-
+
Resources\MaterialIcons_Regular.ttf
diff --git a/src/iOS/AppDelegate.cs b/src/iOS/AppDelegate.cs
deleted file mode 100644
index 7ce15f48b..000000000
--- a/src/iOS/AppDelegate.cs
+++ /dev/null
@@ -1,413 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using AuthenticationServices;
-using Bit.App.Abstractions;
-using Bit.App.Pages;
-using Bit.App.Services;
-using Bit.App.Utilities;
-using Bit.Core;
-using Bit.Core.Abstractions;
-using Bit.Core.Enums;
-using Bit.Core.Services;
-using Bit.Core.Utilities;
-using Bit.iOS.Core.Services;
-using Bit.iOS.Core.Utilities;
-using Bit.iOS.Services;
-using CoreNFC;
-using Foundation;
-using UIKit;
-using WatchConnectivity;
-using Xamarin.Forms;
-using Xamarin.Forms.Platform.iOS;
-
-namespace Bit.iOS
-{
- [Register("AppDelegate")]
- public partial class AppDelegate : FormsApplicationDelegate
- {
- const int SPLASH_VIEW_TAG = 4321;
-
- private NFCNdefReaderSession _nfcSession = null;
- private iOSPushNotificationHandler _pushHandler = null;
- private Core.NFCReaderDelegate _nfcDelegate = null;
- private NSTimer _clipboardTimer = null;
- private nint _clipboardBackgroundTaskId;
- private NSTimer _eventTimer = null;
- private nint _eventBackgroundTaskId;
-
- private IDeviceActionService _deviceActionService;
- private IMessagingService _messagingService;
- private IBroadcasterService _broadcasterService;
- private IStorageService _storageService;
- private IStateService _stateService;
- private IEventService _eventService;
-
- private LazyResolve _deepLinkContext = new LazyResolve();
-
- public override bool FinishedLaunching(UIApplication app, NSDictionary options)
- {
- Forms.Init();
- InitApp();
-
- _deviceActionService = ServiceContainer.Resolve("deviceActionService");
- _messagingService = ServiceContainer.Resolve("messagingService");
- _broadcasterService = ServiceContainer.Resolve("broadcasterService");
- _storageService = ServiceContainer.Resolve("storageService");
- _stateService = ServiceContainer.Resolve("stateService");
- _eventService = ServiceContainer.Resolve("eventService");
-
- LoadApplication(new App.App(null));
- iOSCoreHelpers.AppearanceAdjustments();
- ZXing.Net.Mobile.Forms.iOS.Platform.Init();
-
- ConnectToWatchIfNeededAsync().FireAndForget();
-
- _broadcasterService.Subscribe(nameof(AppDelegate), async (message) =>
- {
- try
- {
- if (message.Command == "startEventTimer")
- {
- StartEventTimer();
- }
- else if (message.Command == "stopEventTimer")
- {
- var task = StopEventTimerAsync();
- }
- else if (message.Command is ThemeManager.UPDATED_THEME_MESSAGE_KEY)
- {
- Device.BeginInvokeOnMainThread(() =>
- {
- iOSCoreHelpers.AppearanceAdjustments();
- });
- }
- else if (message.Command == "listenYubiKeyOTP")
- {
- iOSCoreHelpers.ListenYubiKey((bool)message.Data, _deviceActionService, _nfcSession, _nfcDelegate);
- }
- else if (message.Command == "unlocked")
- {
- var needsAutofillReplacement = await _storageService.GetAsync(
- Core.Constants.AutofillNeedsIdentityReplacementKey);
- if (needsAutofillReplacement.GetValueOrDefault())
- {
- await ASHelpers.ReplaceAllIdentities();
- }
- }
- else if (message.Command == "showAppExtension")
- {
- Device.BeginInvokeOnMainThread(() => ShowAppExtension((ExtensionPageViewModel)message.Data));
- }
- else if (message.Command == "syncCompleted")
- {
- if (message.Data is Dictionary data && data.ContainsKey("successfully"))
- {
- var success = data["successfully"] as bool?;
- if (success.GetValueOrDefault() && _deviceActionService.SystemMajorVersion() >= 12)
- {
- await ASHelpers.ReplaceAllIdentities();
- }
- }
- }
- else if (message.Command == "addedCipher" || message.Command == "editedCipher" ||
- message.Command == "restoredCipher")
- {
- if (_deviceActionService.SystemMajorVersion() >= 12)
- {
- if (await ASHelpers.IdentitiesCanIncremental())
- {
- var cipherId = message.Data as string;
- if (message.Command == "addedCipher" && !string.IsNullOrWhiteSpace(cipherId))
- {
- var identity = await ASHelpers.GetCipherIdentityAsync(cipherId);
- if (identity == null)
- {
- return;
- }
- await ASCredentialIdentityStore.SharedStore?.SaveCredentialIdentitiesAsync(
- new ASPasswordCredentialIdentity[] { identity });
- return;
- }
- }
- await ASHelpers.ReplaceAllIdentities();
- }
- }
- else if (message.Command == "deletedCipher" || message.Command == "softDeletedCipher")
- {
- if (_deviceActionService.SystemMajorVersion() >= 12)
- {
- if (await ASHelpers.IdentitiesCanIncremental())
- {
- var identity = ASHelpers.ToCredentialIdentity(
- message.Data as Bit.Core.Models.View.CipherView);
- if (identity == null)
- {
- return;
- }
- await ASCredentialIdentityStore.SharedStore?.RemoveCredentialIdentitiesAsync(
- new ASPasswordCredentialIdentity[] { identity });
- return;
- }
- await ASHelpers.ReplaceAllIdentities();
- }
- }
- else if (message.Command == "logout")
- {
- if (_deviceActionService.SystemMajorVersion() >= 12)
- {
- await ASCredentialIdentityStore.SharedStore?.RemoveAllCredentialIdentitiesAsync();
- }
- }
- else if ((message.Command == "softDeletedCipher" || message.Command == "restoredCipher")
- && _deviceActionService.SystemMajorVersion() >= 12)
- {
- await ASHelpers.ReplaceAllIdentities();
- }
- else if (message.Command == AppHelpers.VAULT_TIMEOUT_ACTION_CHANGED_MESSAGE_COMMAND)
- {
- var timeoutAction = await _stateService.GetVaultTimeoutActionAsync();
- if (timeoutAction == VaultTimeoutAction.Logout)
- {
- await ASCredentialIdentityStore.SharedStore?.RemoveAllCredentialIdentitiesAsync();
- }
- else
- {
- await ASHelpers.ReplaceAllIdentities();
- }
- }
- }
- catch (Exception ex)
- {
- LoggerHelper.LogEvenIfCantBeResolved(ex);
- }
- });
-
- return base.FinishedLaunching(app, options);
- }
-
- public override void OnResignActivation(UIApplication uiApplication)
- {
- var view = new UIView(UIApplication.SharedApplication.KeyWindow.Frame)
- {
- Tag = SPLASH_VIEW_TAG
- };
- var backgroundView = new UIView(UIApplication.SharedApplication.KeyWindow.Frame)
- {
- BackgroundColor = ThemeManager.GetResourceColor("SplashBackgroundColor").ToUIColor()
- };
- var logo = new UIImage(!ThemeManager.UsingLightTheme ? "logo_white.png" : "logo.png");
- var imageView = new UIImageView(logo)
- {
- Center = new CoreGraphics.CGPoint(view.Center.X, view.Center.Y - 30)
- };
- view.AddSubview(backgroundView);
- view.AddSubview(imageView);
- UIApplication.SharedApplication.KeyWindow.AddSubview(view);
- UIApplication.SharedApplication.KeyWindow.BringSubviewToFront(view);
- UIApplication.SharedApplication.KeyWindow.EndEditing(true);
- base.OnResignActivation(uiApplication);
- }
-
- public override void DidEnterBackground(UIApplication uiApplication)
- {
- _stateService?.SetLastActiveTimeAsync(_deviceActionService.GetActiveTime());
- _messagingService?.Send("slept");
- base.DidEnterBackground(uiApplication);
- }
-
- public override void OnActivated(UIApplication uiApplication)
- {
- base.OnActivated(uiApplication);
- UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0;
- UIApplication.SharedApplication.KeyWindow?
- .ViewWithTag(SPLASH_VIEW_TAG)?
- .RemoveFromSuperview();
-
- ThemeManager.UpdateThemeOnPagesAsync();
- }
-
- public override void WillEnterForeground(UIApplication uiApplication)
- {
- _messagingService?.Send(AppHelpers.RESUMED_MESSAGE_COMMAND);
- base.WillEnterForeground(uiApplication);
- }
-
- public override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication,
- NSObject annotation)
- {
- return true;
- }
-
- public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)
- {
- return _deepLinkContext.Value.OnNewUri(url) || Xamarin.Essentials.Platform.OpenUrl(app, url, options);
- }
-
- public override bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity,
- UIApplicationRestorationHandler completionHandler)
- {
- if (Xamarin.Essentials.Platform.ContinueUserActivity(application, userActivity, completionHandler))
- {
- return true;
- }
- return base.ContinueUserActivity(application, userActivity, completionHandler);
- }
-
- public override void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error)
- {
- _pushHandler?.OnErrorReceived(error);
- }
-
- public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
- {
- _pushHandler?.OnRegisteredSuccess(deviceToken);
- }
-
- public override void DidRegisterUserNotificationSettings(UIApplication application,
- UIUserNotificationSettings notificationSettings)
- {
- application.RegisterForRemoteNotifications();
- }
-
- public override void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo,
- Action completionHandler)
- {
- _pushHandler?.OnMessageReceived(userInfo);
- }
-
- public override void ReceivedRemoteNotification(UIApplication application, NSDictionary userInfo)
- {
- _pushHandler?.OnMessageReceived(userInfo);
- }
-
- public void InitApp()
- {
- if (ServiceContainer.RegisteredServices.Count > 0)
- {
- return;
- }
-
- // Migration services
- ServiceContainer.Register("nativeLogService", new ConsoleLogService());
-
- // Note: This might cause a race condition. Investigate more.
- Task.Run(() =>
- {
- FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
- FFImageLoading.ImageService.Instance.Initialize(new FFImageLoading.Config.Configuration
- {
- FadeAnimationEnabled = false,
- FadeAnimationForCachedImages = false
- });
- });
-
- iOSCoreHelpers.RegisterLocalServices();
- RegisterPush();
- var deviceActionService = ServiceContainer.Resolve("deviceActionService");
- ServiceContainer.Init(deviceActionService.DeviceUserAgent, Constants.ClearCiphersCacheKey,
- Constants.iOSAllClearCipherCacheKeys);
- iOSCoreHelpers.InitLogger();
- iOSCoreHelpers.RegisterFinallyBeforeBootstrap();
-
- _pushHandler = new iOSPushNotificationHandler(
- ServiceContainer.Resolve("pushNotificationListenerService"));
- _nfcDelegate = new Core.NFCReaderDelegate((success, message) =>
- _messagingService.Send("gotYubiKeyOTP", message));
-
- iOSCoreHelpers.Bootstrap(async () => await ApplyManagedSettingsAsync());
- }
-
- private void RegisterPush()
- {
- var notificationListenerService = new PushNotificationListenerService();
- ServiceContainer.Register(
- "pushNotificationListenerService", notificationListenerService);
- var iosPushNotificationService = new iOSPushNotificationService();
- ServiceContainer.Register(
- "pushNotificationService", iosPushNotificationService);
- }
-
- private void ShowAppExtension(ExtensionPageViewModel extensionPageViewModel)
- {
- var itemProvider = new NSItemProvider(new NSDictionary(), Core.Constants.UTTypeAppExtensionSetup);
- var extensionItem = new NSExtensionItem
- {
- Attachments = new NSItemProvider[] { itemProvider }
- };
- var activityViewController = new UIActivityViewController(new NSExtensionItem[] { extensionItem }, null)
- {
- CompletionHandler = (activityType, completed) =>
- {
- extensionPageViewModel.EnabledExtension(completed && activityType == iOSCoreHelpers.AppExtensionId);
- }
- };
- var modal = UIApplication.SharedApplication.KeyWindow.RootViewController.ModalViewController;
- if (activityViewController.PopoverPresentationController != null)
- {
- activityViewController.PopoverPresentationController.SourceView = modal.View;
- var frame = UIScreen.MainScreen.Bounds;
- frame.Height /= 2;
- activityViewController.PopoverPresentationController.SourceRect = frame;
- }
- modal.PresentViewController(activityViewController, true, null);
- }
-
- private void StartEventTimer()
- {
- _eventTimer?.Invalidate();
- _eventTimer?.Dispose();
- _eventTimer = null;
- Device.BeginInvokeOnMainThread(() =>
- {
- _eventTimer = NSTimer.CreateScheduledTimer(60, true, timer =>
- {
- var task = Task.Run(() => _eventService.UploadEventsAsync());
- });
- });
- }
-
- private async Task StopEventTimerAsync()
- {
- _eventTimer?.Invalidate();
- _eventTimer?.Dispose();
- _eventTimer = null;
- if (_eventBackgroundTaskId > 0)
- {
- UIApplication.SharedApplication.EndBackgroundTask(_eventBackgroundTaskId);
- _eventBackgroundTaskId = 0;
- }
- _eventBackgroundTaskId = UIApplication.SharedApplication.BeginBackgroundTask(() =>
- {
- UIApplication.SharedApplication.EndBackgroundTask(_eventBackgroundTaskId);
- _eventBackgroundTaskId = 0;
- });
- await _eventService.UploadEventsAsync();
- UIApplication.SharedApplication.EndBackgroundTask(_eventBackgroundTaskId);
- _eventBackgroundTaskId = 0;
- }
-
- private async Task ApplyManagedSettingsAsync()
- {
- var userDefaults = NSUserDefaults.StandardUserDefaults;
- var managedSettings = userDefaults.DictionaryForKey("com.apple.configuration.managed");
- if (managedSettings != null && managedSettings.Count > 0)
- {
- var dict = new Dictionary();
- foreach (var setting in managedSettings)
- {
- dict.Add(setting.Key.ToString(), setting.Value?.ToString());
- }
- await AppHelpers.SetPreconfiguredSettingsAsync(dict);
- }
- }
-
- private async Task ConnectToWatchIfNeededAsync()
- {
- if (_stateService != null && await _stateService.GetShouldConnectToWatchAsync())
- {
- WCSessionManager.SharedManager.StartSession();
- }
- }
- }
-}
diff --git a/src/iOS/Entitlements.plist b/src/iOS/Entitlements.plist
deleted file mode 100644
index fcf986d4b..000000000
--- a/src/iOS/Entitlements.plist
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- com.apple.developer.authentication-services.autofill-credential-provider
-
- com.apple.security.application-groups
-
- group.com.8bit.bitwarden
-
- keychain-access-groups
-
- $(AppIdentifierPrefix)com.8bit.bitwarden
-
- com.apple.developer.ubiquity-container-identifiers
-
- iCloud.$(CFBundleIdentifier)
-
- com.apple.developer.nfc.readersession.formats
-
- NDEF
- TAG
-
- com.apple.developer.associated-domains
-
- webcredentials:bitwarden.com
-
- aps-environment
- development
-
-
diff --git a/src/iOS/Info.plist b/src/iOS/Info.plist
deleted file mode 100644
index da8dfd7d0..000000000
--- a/src/iOS/Info.plist
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
- MinimumOSVersion
- 11.0
- CFBundleDisplayName
- Bitwarden
- CFBundleName
- Bitwarden
- CFBundleIdentifier
- com.8bit.bitwarden
- CFBundleShortVersionString
- 2024.1.1
- CFBundleVersion
- 1
- CFBundleIconName
- AppIcon
- CFBundleURLTypes
-
-
- CFBundleURLSchemes
-
- bitwarden
- org-appextension-feature-password-management
-
- CFBundleTypeRole
- Editor
- CFBundleURLName
- com.8bit.bitwarden.url
-
-
- CFBundleURLName
- com.8bit.bitwarden
- CFBundleURLSchemes
-
- otpauth
-
-
-
- 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
-
- CFBundleDevelopmentRegion
- en
- UIDeviceFamily
-
- 1
- 2
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
- UIInterfaceOrientationPortraitUpsideDown
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UILaunchStoryboardName
- LaunchScreen
- UIMainStoryboardFile
- LaunchScreen
- UIMainStoryboardFile~ipad
- LaunchScreen
- UIViewControllerBasedStatusBarAppearance
-
- UIBackgroundModes
-
- remote-notification
-
- UIStatusBarHidden
-
- UIAppFonts
-
- bwi-font.ttf
- MaterialIcons_Regular.ttf
-
- UIRequiredDeviceCapabilities
-
- arm64
-
-
- CADisableMinimumFrameDurationOnPhone
-
- XSAppIconAssets
- Resources/Assets.xcassets/AppIcons.appiconset
- ITSAppUsesNonExemptEncryption
-
- ITSEncryptionExportComplianceCode
- ecf076d3-4824-4d7b-b716-2a9a47d7d296
- NSPhotoLibraryUsageDescription
- This app does not require access to the photo library.
- NSCameraUsageDescription
- Scan QR codes
- NSFaceIDUsageDescription
- Use Face ID to unlock your vault.
- NFCReaderUsageDescription
- Use Yubikeys for two-facor authentication.
-
-
diff --git a/src/iOS/LaunchScreen.storyboard b/src/iOS/LaunchScreen.storyboard
deleted file mode 100644
index 6cec090bc..000000000
--- a/src/iOS/LaunchScreen.storyboard
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/iOS/Main.cs b/src/iOS/Main.cs
deleted file mode 100644
index 13f65ed2e..000000000
--- a/src/iOS/Main.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using UIKit;
-
-namespace Bit.iOS
-{
- public class Application
- {
- static void Main(string[] args)
- {
- ObjCRuntime.Dlfcn.dlopen(ObjCRuntime.Constants.libSystemLibrary, 0);
- UIApplication.Main(args, null, "AppDelegate");
- }
- }
-}
diff --git a/src/iOS/Properties/AssemblyInfo.cs b/src/iOS/Properties/AssemblyInfo.cs
deleted file mode 100644
index 55f4a249c..000000000
--- a/src/iOS/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("BitwardeniOS")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Bitwarden Inc.")]
-[assembly: AssemblyProduct("Bitwarden")]
-[assembly: AssemblyCopyright("Copyright © 2016")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Contents.json b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Contents.json
deleted file mode 100644
index 5b671eb96..000000000
--- a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Contents.json
+++ /dev/null
@@ -1,117 +0,0 @@
-{
- "images": [
- {
- "scale": "2x",
- "size": "20x20",
- "idiom": "iphone",
- "filename": "Icon-40.png"
- },
- {
- "scale": "3x",
- "size": "20x20",
- "idiom": "iphone",
- "filename": "Icon-60.png"
- },
- {
- "scale": "2x",
- "size": "29x29",
- "idiom": "iphone",
- "filename": "Icon-58.png"
- },
- {
- "scale": "3x",
- "size": "29x29",
- "idiom": "iphone",
- "filename": "Icon-87.png"
- },
- {
- "scale": "2x",
- "size": "40x40",
- "idiom": "iphone",
- "filename": "Icon-80.png"
- },
- {
- "scale": "3x",
- "size": "40x40",
- "idiom": "iphone",
- "filename": "Icon-120.png"
- },
- {
- "scale": "2x",
- "size": "60x60",
- "idiom": "iphone",
- "filename": "Icon-120.png"
- },
- {
- "scale": "3x",
- "size": "60x60",
- "idiom": "iphone",
- "filename": "Icon-180.png"
- },
- {
- "scale": "1x",
- "size": "20x20",
- "idiom": "ipad",
- "filename": "Icon-20.png"
- },
- {
- "scale": "2x",
- "size": "20x20",
- "idiom": "ipad",
- "filename": "Icon-40.png"
- },
- {
- "scale": "1x",
- "size": "29x29",
- "idiom": "ipad",
- "filename": "Icon-29.png"
- },
- {
- "scale": "2x",
- "size": "29x29",
- "idiom": "ipad",
- "filename": "Icon-58.png"
- },
- {
- "scale": "1x",
- "size": "40x40",
- "idiom": "ipad",
- "filename": "Icon-40.png"
- },
- {
- "scale": "2x",
- "size": "40x40",
- "idiom": "ipad",
- "filename": "Icon-80.png"
- },
- {
- "scale": "1x",
- "size": "76x76",
- "idiom": "ipad",
- "filename": "Icon-76.png"
- },
- {
- "scale": "2x",
- "size": "76x76",
- "idiom": "ipad",
- "filename": "Icon-152.png"
- },
- {
- "scale": "2x",
- "size": "83.5x83.5",
- "idiom": "ipad",
- "filename": "Icon-167.png"
- },
- {
- "scale": "1x",
- "size": "1024x1024",
- "idiom": "ios-marketing",
- "filename": "Icon-1024.png"
- }
- ],
- "properties": {},
- "info": {
- "version": 1,
- "author": "xcode"
- }
-}
\ No newline at end of file
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-1024.png b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-1024.png
deleted file mode 100644
index e96f62fce..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-1024.png and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-120.png b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-120.png
deleted file mode 100644
index 337b432b9..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-120.png and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-152.png b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-152.png
deleted file mode 100644
index 7897addad..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-152.png and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-167.png b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-167.png
deleted file mode 100644
index ec8b7b847..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-167.png and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-180.png b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-180.png
deleted file mode 100644
index d600969a7..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-180.png and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-20.png b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-20.png
deleted file mode 100644
index b6ad05447..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-20.png and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-29.png b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-29.png
deleted file mode 100644
index a99a4d604..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-29.png and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-40.png b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-40.png
deleted file mode 100644
index f7eff8ec7..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-40.png and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-58.png b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-58.png
deleted file mode 100644
index a2fe7df1a..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-58.png and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-60.png b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-60.png
deleted file mode 100644
index 94a506341..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-60.png and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-76.png b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-76.png
deleted file mode 100644
index d7b8f6775..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-76.png and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-80.png b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-80.png
deleted file mode 100644
index bc264ce75..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-80.png and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-87.png b/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-87.png
deleted file mode 100644
index 4ab4bfa00..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/AppIcons.appiconset/Icon-87.png and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/Contents.json b/src/iOS/Resources/Assets.xcassets/Contents.json
deleted file mode 100644
index 73c00596a..000000000
--- a/src/iOS/Resources/Assets.xcassets/Contents.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/Contents.json b/src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/Contents.json
deleted file mode 100644
index b38b8e9c2..000000000
--- a/src/iOS/Resources/Assets.xcassets/LaunchScreen.imageset/Contents.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "universal"
- },
- {
- "filename" : "logo.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "filename" : "logo_white.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "logo@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "filename" : "logo_white@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "logo@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "filename" : "logo_white@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/src/iOS/Resources/Assets.xcassets/empty_items_state.imageset/Contents.json b/src/iOS/Resources/Assets.xcassets/empty_items_state.imageset/Contents.json
deleted file mode 100644
index 2c8771189..000000000
--- a/src/iOS/Resources/Assets.xcassets/empty_items_state.imageset/Contents.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "images" : [
- {
- "filename" : "Empty-items-state.pdf",
- "idiom" : "universal"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "filename" : "Empty-items-state-dark.pdf",
- "idiom" : "universal"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- },
- "properties" : {
- "preserves-vector-representation" : true
- }
-}
diff --git a/src/iOS/Resources/Assets.xcassets/empty_items_state.imageset/Empty-items-state-dark.pdf b/src/iOS/Resources/Assets.xcassets/empty_items_state.imageset/Empty-items-state-dark.pdf
deleted file mode 100644
index f68a9a3b6..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/empty_items_state.imageset/Empty-items-state-dark.pdf and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/empty_items_state.imageset/Empty-items-state.pdf b/src/iOS/Resources/Assets.xcassets/empty_items_state.imageset/Empty-items-state.pdf
deleted file mode 100644
index 1aa4dc22f..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/empty_items_state.imageset/Empty-items-state.pdf and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/empty_login_requests.imageset/Contents.json b/src/iOS/Resources/Assets.xcassets/empty_login_requests.imageset/Contents.json
deleted file mode 100644
index 920c75d19..000000000
--- a/src/iOS/Resources/Assets.xcassets/empty_login_requests.imageset/Contents.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "images" : [
- {
- "filename" : "empty_login_requests.pdf",
- "idiom" : "universal"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "filename" : "empty_login_requests_dark.pdf",
- "idiom" : "universal"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- },
- "properties" : {
- "preserves-vector-representation" : true
- }
-}
diff --git a/src/iOS/Resources/Assets.xcassets/empty_login_requests.imageset/empty_login_requests.pdf b/src/iOS/Resources/Assets.xcassets/empty_login_requests.imageset/empty_login_requests.pdf
deleted file mode 100644
index 38f66ca78..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/empty_login_requests.imageset/empty_login_requests.pdf and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/empty_login_requests.imageset/empty_login_requests_dark.pdf b/src/iOS/Resources/Assets.xcassets/empty_login_requests.imageset/empty_login_requests_dark.pdf
deleted file mode 100644
index dd31f3373..000000000
Binary files a/src/iOS/Resources/Assets.xcassets/empty_login_requests.imageset/empty_login_requests_dark.pdf and /dev/null differ
diff --git a/src/iOS/Resources/Assets.xcassets/ic_warning.imageset/Contents.json b/src/iOS/Resources/Assets.xcassets/ic_warning.imageset/Contents.json
deleted file mode 100644
index 5a1234c62..000000000
--- a/src/iOS/Resources/Assets.xcassets/ic_warning.imageset/Contents.json
+++ /dev/null
@@ -1,608 +0,0 @@
-{
- "images" : [
- {
- "filename" : "ic_warning-1.pdf",
- "idiom" : "universal"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "universal"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "universal"
- },
- {
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "universal",
- "scale" : "3x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "universal",
- "scale" : "3x"
- },
- {
- "idiom" : "iphone"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "iphone"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "iphone"
- },
- {
- "idiom" : "iphone",
- "scale" : "1x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "iphone",
- "scale" : "1x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "iphone",
- "scale" : "1x"
- },
- {
- "idiom" : "iphone",
- "scale" : "2x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "iphone",
- "scale" : "2x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "iphone",
- "scale" : "2x"
- },
- {
- "idiom" : "iphone",
- "scale" : "3x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "iphone",
- "scale" : "3x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "iphone",
- "scale" : "3x"
- },
- {
- "idiom" : "iphone",
- "scale" : "1x",
- "subtype" : "retina4"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "iphone",
- "scale" : "1x",
- "subtype" : "retina4"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "iphone",
- "scale" : "1x",
- "subtype" : "retina4"
- },
- {
- "idiom" : "iphone",
- "scale" : "2x",
- "subtype" : "retina4"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "iphone",
- "scale" : "2x",
- "subtype" : "retina4"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "iphone",
- "scale" : "2x",
- "subtype" : "retina4"
- },
- {
- "idiom" : "iphone",
- "scale" : "3x",
- "subtype" : "retina4"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "iphone",
- "scale" : "3x",
- "subtype" : "retina4"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "iphone",
- "scale" : "3x",
- "subtype" : "retina4"
- },
- {
- "idiom" : "ipad"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "ipad"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "ipad"
- },
- {
- "idiom" : "ipad",
- "scale" : "1x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "ipad",
- "scale" : "1x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "ipad",
- "scale" : "1x"
- },
- {
- "idiom" : "ipad",
- "scale" : "2x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "ipad",
- "scale" : "2x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "ipad",
- "scale" : "2x"
- },
- {
- "idiom" : "car"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "car"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "car"
- },
- {
- "idiom" : "car",
- "scale" : "2x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "car",
- "scale" : "2x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "car",
- "scale" : "2x"
- },
- {
- "idiom" : "car",
- "scale" : "3x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "car",
- "scale" : "3x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "car",
- "scale" : "3x"
- },
- {
- "idiom" : "mac"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "mac"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "mac"
- },
- {
- "idiom" : "mac",
- "scale" : "1x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "mac",
- "scale" : "1x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "mac",
- "scale" : "1x"
- },
- {
- "idiom" : "mac",
- "scale" : "2x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "mac",
- "scale" : "2x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "mac",
- "scale" : "2x"
- },
- {
- "idiom" : "watch"
- },
- {
- "idiom" : "watch",
- "screen-width" : "<=145"
- },
- {
- "idiom" : "watch",
- "screen-width" : ">161"
- },
- {
- "idiom" : "watch",
- "screen-width" : ">145"
- },
- {
- "idiom" : "watch",
- "screen-width" : ">183"
- },
- {
- "idiom" : "watch",
- "scale" : "2x"
- },
- {
- "idiom" : "watch",
- "scale" : "2x",
- "screen-width" : "<=145"
- },
- {
- "idiom" : "watch",
- "scale" : "2x",
- "screen-width" : ">161"
- },
- {
- "idiom" : "watch",
- "scale" : "2x",
- "screen-width" : ">145"
- },
- {
- "idiom" : "watch",
- "scale" : "2x",
- "screen-width" : ">183"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "watch"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "watch"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "watch",
- "scale" : "2x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "watch",
- "scale" : "2x"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "watch",
- "scale" : "2x",
- "screen-width" : "<=145"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "watch",
- "scale" : "2x",
- "screen-width" : "<=145"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "light"
- }
- ],
- "idiom" : "watch",
- "scale" : "2x",
- "screen-width" : ">145"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "watch",
- "scale" : "2x",
- "screen-width" : ">145"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/src/iOS/Resources/Assets.xcassets/ic_warning.imageset/ic_warning-1.pdf b/src/iOS/Resources/Assets.xcassets/ic_warning.imageset/ic_warning-1.pdf
deleted file mode 100644
index a42df1f85..000000000
--- a/src/iOS/Resources/Assets.xcassets/ic_warning.imageset/ic_warning-1.pdf
+++ /dev/null
@@ -1,119 +0,0 @@
-%PDF-1.7
-
-1 0 obj
- << >>
-endobj
-
-2 0 obj
- << /Length 3 0 R >>
-stream
-/DeviceRGB CS
-/DeviceRGB cs
-q
-1.000000 0.000000 -0.000000 1.000000 0.000000 -0.004333 cm
-0.866667 0.294118 0.223529 scn
-24.979254 0.004448 m
-2.740886 0.004448 l
-2.256652 0.000004 1.780215 0.127985 1.360950 0.376835 c
-0.941685 0.625685 0.595185 0.983850 0.356966 1.415783 c
-0.120480 1.834383 -0.003394 2.309866 0.000071 2.793346 c
-0.003536 3.276825 0.132607 3.750528 0.374291 4.165575 c
-11.493476 23.511885 l
-11.737758 23.932262 12.084259 24.279764 12.499193 24.521503 c
-12.914126 24.763245 13.382767 24.890335 13.860070 24.890335 c
-14.337375 24.890335 14.806015 24.763245 15.220948 24.521503 c
-15.635882 24.279764 15.982384 23.932262 16.226665 23.511885 c
-27.345852 4.165575 l
-27.587534 3.750528 27.717470 3.276825 27.720068 2.793346 c
-27.722668 2.309866 27.599663 1.834383 27.363176 1.415783 c
-27.124958 0.983850 26.778458 0.624796 26.359192 0.376835 c
-25.939928 0.128874 25.463488 0.000004 24.979254 0.004448 c
-24.979254 0.004448 l
-h
-13.860070 23.111946 m
-13.684222 23.114613 13.510106 23.069286 13.356780 22.981300 c
-13.203454 22.893314 13.075248 22.764446 12.985158 22.608913 c
-1.867706 3.262606 l
-1.782813 3.116850 1.737768 2.949764 1.737768 2.780014 c
-1.737768 2.610262 1.782813 2.443178 1.867706 2.297422 c
-1.956063 2.138336 2.084268 2.006802 2.239327 1.916149 c
-2.394386 1.825497 2.570235 1.779282 2.747816 1.781948 c
-24.979254 1.781948 l
-25.157701 1.779282 25.333551 1.825497 25.487745 1.916149 c
-25.641937 2.006802 25.771009 2.138336 25.859367 2.297422 c
-25.944260 2.443178 25.989302 2.610262 25.989302 2.780014 c
-25.989302 2.949764 25.944260 3.116850 25.859367 3.262606 c
-14.734983 22.608913 l
-14.644894 22.764446 14.516687 22.892426 14.363361 22.981300 c
-14.210035 23.070175 14.035919 23.114613 13.860070 23.111946 c
-13.860070 23.111946 l
-h
-13.860070 7.887661 m
-13.630514 7.887661 13.409620 7.980980 13.247631 8.148064 c
-13.085643 8.315149 12.993821 8.540892 12.993821 8.776411 c
-12.993821 16.904917 l
-12.993821 17.140434 13.084776 17.367065 13.247631 17.533262 c
-13.410486 17.699459 13.630514 17.793667 13.860070 17.793667 c
-14.089627 17.793667 14.310521 17.700348 14.472510 17.533262 c
-14.634499 17.366177 14.726320 17.140434 14.726320 16.904917 c
-14.726320 8.776411 l
-14.726320 8.540892 14.635365 8.314260 14.472510 8.148064 c
-14.309655 7.981867 14.089627 7.887661 13.860070 7.887661 c
-h
-13.860070 3.493681 m
-14.427464 3.493681 14.887444 3.965607 14.887444 4.547737 c
-14.887444 5.129869 14.427464 5.601795 13.860070 5.601795 c
-13.292677 5.601795 12.832698 5.129869 12.832698 4.547737 c
-12.832698 3.965607 13.292677 3.493681 13.860070 3.493681 c
-h
-f
-n
-Q
-
-endstream
-endobj
-
-3 0 obj
- 2568
-endobj
-
-4 0 obj
- << /Annots []
- /Type /Page
- /MediaBox [ 0.000000 0.000000 27.720123 24.886002 ]
- /Resources 1 0 R
- /Contents 2 0 R
- /Parent 5 0 R
- >>
-endobj
-
-5 0 obj
- << /Kids [ 4 0 R ]
- /Count 1
- /Type /Pages
- >>
-endobj
-
-6 0 obj
- << /Pages 5 0 R
- /Type /Catalog
- >>
-endobj
-
-xref
-0 7
-0000000000 65535 f
-0000000010 00000 n
-0000000034 00000 n
-0000002658 00000 n
-0000002681 00000 n
-0000002854 00000 n
-0000002928 00000 n
-trailer
-<< /ID [ (some) (id) ]
- /Root 6 0 R
- /Size 7
->>
-startxref
-2987
-%%EOF
\ No newline at end of file
diff --git a/src/iOS/Resources/MaterialIcons_Regular.ttf b/src/iOS/Resources/MaterialIcons_Regular.ttf
deleted file mode 100644
index 7015564ad..000000000
Binary files a/src/iOS/Resources/MaterialIcons_Regular.ttf and /dev/null differ
diff --git a/src/iOS/Resources/autofill-kb.png b/src/iOS/Resources/autofill-kb.png
deleted file mode 100644
index fa12a0873..000000000
Binary files a/src/iOS/Resources/autofill-kb.png and /dev/null differ
diff --git a/src/iOS/Resources/autofill-kb@2x.png b/src/iOS/Resources/autofill-kb@2x.png
deleted file mode 100644
index 6539330b0..000000000
Binary files a/src/iOS/Resources/autofill-kb@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/autofill-kb@3x.png b/src/iOS/Resources/autofill-kb@3x.png
deleted file mode 100644
index 07d8f3ce5..000000000
Binary files a/src/iOS/Resources/autofill-kb@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/bwi-font.ttf b/src/iOS/Resources/bwi-font.ttf
deleted file mode 100644
index f9b63283e..000000000
Binary files a/src/iOS/Resources/bwi-font.ttf and /dev/null differ
diff --git a/src/iOS/Resources/cog_environment.png b/src/iOS/Resources/cog_environment.png
deleted file mode 100644
index 95d6271b8..000000000
Binary files a/src/iOS/Resources/cog_environment.png and /dev/null differ
diff --git a/src/iOS/Resources/cog_environment@2x.png b/src/iOS/Resources/cog_environment@2x.png
deleted file mode 100644
index 8d884844f..000000000
Binary files a/src/iOS/Resources/cog_environment@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/cog_environment@3x.png b/src/iOS/Resources/cog_environment@3x.png
deleted file mode 100644
index a46070614..000000000
Binary files a/src/iOS/Resources/cog_environment@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/cog_settings.png b/src/iOS/Resources/cog_settings.png
deleted file mode 100644
index 95d6271b8..000000000
Binary files a/src/iOS/Resources/cog_settings.png and /dev/null differ
diff --git a/src/iOS/Resources/cog_settings@2x.png b/src/iOS/Resources/cog_settings@2x.png
deleted file mode 100644
index 8d884844f..000000000
Binary files a/src/iOS/Resources/cog_settings@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/cog_settings@3x.png b/src/iOS/Resources/cog_settings@3x.png
deleted file mode 100644
index a46070614..000000000
Binary files a/src/iOS/Resources/cog_settings@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/ext-act.png b/src/iOS/Resources/ext-act.png
deleted file mode 100644
index be97e5b28..000000000
Binary files a/src/iOS/Resources/ext-act.png and /dev/null differ
diff --git a/src/iOS/Resources/ext-act@2x.png b/src/iOS/Resources/ext-act@2x.png
deleted file mode 100644
index d8f294e54..000000000
Binary files a/src/iOS/Resources/ext-act@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/ext-act@3x.png b/src/iOS/Resources/ext-act@3x.png
deleted file mode 100644
index bd9a411a1..000000000
Binary files a/src/iOS/Resources/ext-act@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/ext-more.png b/src/iOS/Resources/ext-more.png
deleted file mode 100644
index 64763ea3d..000000000
Binary files a/src/iOS/Resources/ext-more.png and /dev/null differ
diff --git a/src/iOS/Resources/ext-more@2x.png b/src/iOS/Resources/ext-more@2x.png
deleted file mode 100644
index 67c326055..000000000
Binary files a/src/iOS/Resources/ext-more@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/ext-more@3x.png b/src/iOS/Resources/ext-more@3x.png
deleted file mode 100644
index 2982b9cd0..000000000
Binary files a/src/iOS/Resources/ext-more@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/ext-use.png b/src/iOS/Resources/ext-use.png
deleted file mode 100644
index 4b0a90f72..000000000
Binary files a/src/iOS/Resources/ext-use.png and /dev/null differ
diff --git a/src/iOS/Resources/ext-use@2x.png b/src/iOS/Resources/ext-use@2x.png
deleted file mode 100644
index 93ee7f492..000000000
Binary files a/src/iOS/Resources/ext-use@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/ext-use@3x.png b/src/iOS/Resources/ext-use@3x.png
deleted file mode 100644
index 35869465e..000000000
Binary files a/src/iOS/Resources/ext-use@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/generate.png b/src/iOS/Resources/generate.png
deleted file mode 100644
index 332f01a69..000000000
Binary files a/src/iOS/Resources/generate.png and /dev/null differ
diff --git a/src/iOS/Resources/generate@2x.png b/src/iOS/Resources/generate@2x.png
deleted file mode 100644
index 6cda8a1ba..000000000
Binary files a/src/iOS/Resources/generate@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/generate@3x.png b/src/iOS/Resources/generate@3x.png
deleted file mode 100644
index 6461e66aa..000000000
Binary files a/src/iOS/Resources/generate@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/info.png b/src/iOS/Resources/info.png
deleted file mode 100644
index a29247af1..000000000
Binary files a/src/iOS/Resources/info.png and /dev/null differ
diff --git a/src/iOS/Resources/info@2x.png b/src/iOS/Resources/info@2x.png
deleted file mode 100644
index c844ebbc2..000000000
Binary files a/src/iOS/Resources/info@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/info@3x.png b/src/iOS/Resources/info@3x.png
deleted file mode 100644
index 3adc029dc..000000000
Binary files a/src/iOS/Resources/info@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/lock.png b/src/iOS/Resources/lock.png
deleted file mode 100644
index fc6e60dff..000000000
Binary files a/src/iOS/Resources/lock.png and /dev/null differ
diff --git a/src/iOS/Resources/lock@2x.png b/src/iOS/Resources/lock@2x.png
deleted file mode 100644
index c14ad933a..000000000
Binary files a/src/iOS/Resources/lock@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/lock@3x.png b/src/iOS/Resources/lock@3x.png
deleted file mode 100644
index 335a6254b..000000000
Binary files a/src/iOS/Resources/lock@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/login.png b/src/iOS/Resources/login.png
deleted file mode 100644
index bd28d760d..000000000
Binary files a/src/iOS/Resources/login.png and /dev/null differ
diff --git a/src/iOS/Resources/login@2x.png b/src/iOS/Resources/login@2x.png
deleted file mode 100644
index 9229cc3a5..000000000
Binary files a/src/iOS/Resources/login@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/login@3x.png b/src/iOS/Resources/login@3x.png
deleted file mode 100644
index aa85485e4..000000000
Binary files a/src/iOS/Resources/login@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/logo.png b/src/iOS/Resources/logo.png
deleted file mode 100644
index 33ced5b12..000000000
Binary files a/src/iOS/Resources/logo.png and /dev/null differ
diff --git a/src/iOS/Resources/logo@2x.png b/src/iOS/Resources/logo@2x.png
deleted file mode 100644
index 2a0ba60b9..000000000
Binary files a/src/iOS/Resources/logo@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/logo@3x.png b/src/iOS/Resources/logo@3x.png
deleted file mode 100644
index 904731676..000000000
Binary files a/src/iOS/Resources/logo@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/logo_white.png b/src/iOS/Resources/logo_white.png
deleted file mode 100644
index b5856a638..000000000
Binary files a/src/iOS/Resources/logo_white.png and /dev/null differ
diff --git a/src/iOS/Resources/logo_white@2x.png b/src/iOS/Resources/logo_white@2x.png
deleted file mode 100644
index 7424b6f77..000000000
Binary files a/src/iOS/Resources/logo_white@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/logo_white@3x.png b/src/iOS/Resources/logo_white@3x.png
deleted file mode 100644
index 7d76d07d2..000000000
Binary files a/src/iOS/Resources/logo_white@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/more.png b/src/iOS/Resources/more.png
deleted file mode 100644
index c54bb2da0..000000000
Binary files a/src/iOS/Resources/more.png and /dev/null differ
diff --git a/src/iOS/Resources/more@2x.png b/src/iOS/Resources/more@2x.png
deleted file mode 100644
index 0b5b03261..000000000
Binary files a/src/iOS/Resources/more@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/more@3x.png b/src/iOS/Resources/more@3x.png
deleted file mode 100644
index d587310ba..000000000
Binary files a/src/iOS/Resources/more@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/plus.png b/src/iOS/Resources/plus.png
deleted file mode 100644
index 11393f70c..000000000
Binary files a/src/iOS/Resources/plus.png and /dev/null differ
diff --git a/src/iOS/Resources/plus@2x.png b/src/iOS/Resources/plus@2x.png
deleted file mode 100644
index 0878e0596..000000000
Binary files a/src/iOS/Resources/plus@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/plus@3x.png b/src/iOS/Resources/plus@3x.png
deleted file mode 100644
index e767f90ce..000000000
Binary files a/src/iOS/Resources/plus@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/search.png b/src/iOS/Resources/search.png
deleted file mode 100644
index 88f7f757c..000000000
Binary files a/src/iOS/Resources/search.png and /dev/null differ
diff --git a/src/iOS/Resources/search@2x.png b/src/iOS/Resources/search@2x.png
deleted file mode 100644
index 1c4ea4e6d..000000000
Binary files a/src/iOS/Resources/search@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/search@3x.png b/src/iOS/Resources/search@3x.png
deleted file mode 100644
index 819beb4f9..000000000
Binary files a/src/iOS/Resources/search@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/send.png b/src/iOS/Resources/send.png
deleted file mode 100644
index 37d7bae67..000000000
Binary files a/src/iOS/Resources/send.png and /dev/null differ
diff --git a/src/iOS/Resources/send@2x.png b/src/iOS/Resources/send@2x.png
deleted file mode 100644
index d5cb621a3..000000000
Binary files a/src/iOS/Resources/send@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/send@3x.png b/src/iOS/Resources/send@3x.png
deleted file mode 100644
index 030e9684e..000000000
Binary files a/src/iOS/Resources/send@3x.png and /dev/null differ
diff --git a/src/iOS/Resources/yubikey.png b/src/iOS/Resources/yubikey.png
deleted file mode 100644
index 437f35825..000000000
Binary files a/src/iOS/Resources/yubikey.png and /dev/null differ
diff --git a/src/iOS/Resources/yubikey@2x.png b/src/iOS/Resources/yubikey@2x.png
deleted file mode 100644
index 3350d588e..000000000
Binary files a/src/iOS/Resources/yubikey@2x.png and /dev/null differ
diff --git a/src/iOS/Resources/yubikey@3x.png b/src/iOS/Resources/yubikey@3x.png
deleted file mode 100644
index 7a748b996..000000000
Binary files a/src/iOS/Resources/yubikey@3x.png and /dev/null differ
diff --git a/src/iOS/Services/iOSPushNotificationHandler.cs b/src/iOS/Services/iOSPushNotificationHandler.cs
deleted file mode 100644
index b19fe17e0..000000000
--- a/src/iOS/Services/iOSPushNotificationHandler.cs
+++ /dev/null
@@ -1,132 +0,0 @@
-using System;
-using System.Diagnostics;
-using Bit.App.Abstractions;
-using Bit.App.Models;
-using Bit.Core;
-using Bit.Core.Enums;
-using Bit.Core.Services;
-using CoreData;
-using Foundation;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using UserNotifications;
-using Xamarin.Forms;
-
-namespace Bit.iOS.Services
-{
- public class iOSPushNotificationHandler : NSObject, IUNUserNotificationCenterDelegate
- {
- private const string TokenSetting = "token";
- const string TAG = "##PUSH NOTIFICATIONS";
-
- private readonly IPushNotificationListenerService _pushNotificationListenerService;
-
- public iOSPushNotificationHandler(
- IPushNotificationListenerService pushNotificationListenerService)
- {
- _pushNotificationListenerService = pushNotificationListenerService;
- }
-
- public void OnMessageReceived(NSDictionary userInfo)
- {
- try
- {
- Debug.WriteLine($"{TAG} - OnMessageReceived.");
-
- var json = DictionaryToJson(userInfo);
- var values = JObject.Parse(json);
- var keyAps = new NSString("aps");
- if (userInfo.ContainsKey(keyAps) && userInfo.ValueForKey(keyAps) is NSDictionary aps)
- {
- foreach (var apsKey in aps)
- {
- if (!values.TryGetValue(apsKey.Key.ToString(), out JToken temp))
- {
- values.Add(apsKey.Key.ToString(), apsKey.Value.ToString());
- }
- }
- }
- _pushNotificationListenerService.OnMessageAsync(values, Device.iOS);
- }
- catch (Exception ex)
- {
- Logger.Instance.Exception(ex);
- }
- }
-
- public void OnErrorReceived(NSError error)
- {
- Debug.WriteLine($"{TAG} - Registration Failed.");
- _pushNotificationListenerService.OnError(error.LocalizedDescription, Device.iOS);
- }
-
- public void OnRegisteredSuccess(NSData token)
- {
- Debug.WriteLine($"{TAG} - Successfully Registered.");
-
- var hexDeviceToken = BitConverter.ToString(token.ToArray())
- .Replace("-", string.Empty)
- .ToLowerInvariant();
-
- Debug.WriteLine($"{TAG} - Token: {hexDeviceToken}");
-
- UNUserNotificationCenter.Current.Delegate = this;
-
- _pushNotificationListenerService.OnRegisteredAsync(hexDeviceToken, Device.iOS);
- NSUserDefaults.StandardUserDefaults.SetString(hexDeviceToken, TokenSetting);
- NSUserDefaults.StandardUserDefaults.Synchronize();
- }
-
- private static string DictionaryToJson(NSDictionary dictionary)
- {
- var json = NSJsonSerialization.Serialize(dictionary, NSJsonWritingOptions.PrettyPrinted, out NSError error);
- return json.ToString(NSStringEncoding.UTF8);
- }
-
- // To receive notifications in foreground on iOS 10 devices.
- [Export("userNotificationCenter:willPresentNotification:withCompletionHandler:")]
- public void WillPresentNotification(UNUserNotificationCenter center, UNNotification notification, Action completionHandler)
- {
- Debug.WriteLine($"{TAG} WillPresentNotification {notification?.Request?.Content?.UserInfo}");
- OnMessageReceived(notification?.Request?.Content?.UserInfo);
- completionHandler(UNNotificationPresentationOptions.Alert);
- }
-
- [Export("userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:")]
- public void DidReceiveNotificationResponse(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler)
- {
- Debug.WriteLine($"{TAG} DidReceiveNotificationResponse {response?.Notification?.Request?.Content?.UserInfo}");
- if ((response?.Notification?.Request?.Content?.UserInfo) == null)
- {
- completionHandler();
- return;
- }
-
- var userInfo = response?.Notification?.Request?.Content?.UserInfo;
- OnMessageReceived(userInfo);
-
- if (userInfo.TryGetValue(NSString.FromObject(Constants.NotificationData), out NSObject nsObject))
- {
- var token = JToken.Parse(NSString.FromObject(nsObject).ToString());
- var typeToken = token.SelectToken(Constants.NotificationDataType);
- if (response.IsDefaultAction)
- {
- if (typeToken.ToString() == PasswordlessNotificationData.TYPE)
- {
- _pushNotificationListenerService.OnNotificationTapped(token.ToObject());
- }
- }
- else if (response.IsDismissAction)
- {
- if (typeToken.ToString() == PasswordlessNotificationData.TYPE)
- {
- _pushNotificationListenerService.OnNotificationDismissed(token.ToObject());
- }
- }
- }
-
- // Inform caller it has been handled
- completionHandler();
- }
- }
-}
diff --git a/src/iOS/Services/iOSPushNotificationService.cs b/src/iOS/Services/iOSPushNotificationService.cs
deleted file mode 100644
index aec24657b..000000000
--- a/src/iOS/Services/iOSPushNotificationService.cs
+++ /dev/null
@@ -1,122 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Threading.Tasks;
-using Bit.App.Abstractions;
-using Bit.App.Models;
-using Bit.App.Resources;
-using Bit.App.Services;
-using Bit.Core;
-using Bit.Core.Services;
-using Foundation;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using UIKit;
-using UserNotifications;
-
-namespace Bit.iOS.Services
-{
- public class iOSPushNotificationService : NSObject, IPushNotificationService, IUNUserNotificationCenterDelegate
- {
- private const string TokenSetting = "token";
- const string TAG = "##PUSH NOTIFICATIONS";
-
- public Task GetTokenAsync()
- {
- return Task.FromResult(NSUserDefaults.StandardUserDefaults.StringForKey(TokenSetting));
- }
-
- public bool IsRegisteredForPush => UIApplication.SharedApplication.IsRegisteredForRemoteNotifications;
-
- public async Task AreNotificationsSettingsEnabledAsync()
- {
- var settings = await UNUserNotificationCenter.Current.GetNotificationSettingsAsync();
- return settings.AlertSetting == UNNotificationSetting.Enabled;
- }
-
- public async Task RegisterAsync()
- {
- Debug.WriteLine($"{TAG} RegisterAsync");
-
- var tcs = new TaskCompletionSource();
-
- var authOptions = UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound;
- UNUserNotificationCenter.Current.RequestAuthorization(authOptions, (granted, error) =>
- {
- if (error != null)
- {
- Debug.WriteLine($"{TAG} {error}");
- }
- else
- {
- Debug.WriteLine($"{TAG} {granted}");
- }
-
- tcs.SetResult(granted);
- });
-
- if (await tcs.Task)
- {
- Debug.WriteLine($"{TAG} RegisterForRemoteNotifications");
- UIApplication.SharedApplication.RegisterForRemoteNotifications();
- }
- }
-
- public Task UnregisterAsync()
- {
- Debug.WriteLine($"{TAG} UnregisterAsync");
-
- UIApplication.SharedApplication.UnregisterForRemoteNotifications();
- // TODO: unregister call
- // _pushNotificationListener.OnUnregistered(Device.iOS);
- NSUserDefaults.StandardUserDefaults.SetString(string.Empty, TokenSetting);
- NSUserDefaults.StandardUserDefaults.Synchronize();
- return Task.FromResult(0);
- }
-
- public void SendLocalNotification(string title, string message, BaseNotificationData data)
- {
- if (string.IsNullOrEmpty(data.Id))
- {
- throw new ArgumentNullException("notificationId cannot be null or empty.");
- }
-
- var content = new UNMutableNotificationContent()
- {
- Title = title,
- Body = message,
- CategoryIdentifier = Constants.iOSNotificationCategoryId
- };
-
- if (data != null)
- {
- content.UserInfo = NSDictionary.FromObjectAndKey(NSData.FromString(JsonConvert.SerializeObject(data), NSStringEncoding.UTF8), new NSString(Constants.NotificationData));
- }
-
- var actions = new UNNotificationAction[] { UNNotificationAction.FromIdentifier(Constants.iOSNotificationClearActionId, AppResources.Clear, UNNotificationActionOptions.Foreground) };
- var category = UNNotificationCategory.FromIdentifier(Constants.iOSNotificationCategoryId, actions, new string[] { }, UNNotificationCategoryOptions.CustomDismissAction);
- UNUserNotificationCenter.Current.SetNotificationCategories(new NSSet(category));
-
- var request = UNNotificationRequest.FromIdentifier(data.Id, content, null);
- UNUserNotificationCenter.Current.AddNotificationRequest(request, (err) =>
- {
- if (err != null)
- {
- Logger.Instance.Exception(new Exception($"Failed to schedule notification: {err}"));
- }
- });
- }
-
- public void DismissLocalNotification(string notificationId)
- {
- if (string.IsNullOrEmpty(notificationId))
- {
- return;
- }
-
- UNUserNotificationCenter.Current.RemovePendingNotificationRequests(new string[] { notificationId });
- UNUserNotificationCenter.Current.RemoveDeliveredNotifications(new string[] { notificationId });
- }
- }
-}
\ No newline at end of file
diff --git a/src/iOS/iOS.csproj b/src/iOS/iOS.csproj
deleted file mode 100644
index 4a21e24df..000000000
--- a/src/iOS/iOS.csproj
+++ /dev/null
@@ -1,437 +0,0 @@
-
-
-
- Debug
- iPhoneSimulator
- 8.0.30703
- 2.0
- {599E0201-420A-4C3E-A7BA-5349F72E0B15}
- {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- {6143fdea-f3c2-4a09-aafa-6e230626515e}
- Exe
- Bit.iOS
- Resources
- BitwardeniOS
- NSUrlSessionHandler
-
-
-
-
- true
- full
- false
- bin\iPhoneSimulator\Debug
- DEBUG;__UNIFIED__;__MOBILE__;__IOS__
- prompt
- 4
- false
- x86_64
- None
- true
- true
- --nodevcodeshare --http-message-handler=NSUrlSessionHandler -gcc_flags "-L${ProjectDir}/../../lib/ios -largon2 -force_load ${ProjectDir}/../../lib/ios/libargon2.a"
- Entitlements.plist
-
-
- none
- true
- bin\iPhoneSimulator\Release
- prompt
- 4
- 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 --linkskip=BitwardeniOSShareExtension -gcc_flags "-L${ProjectDir}/../../lib/ios -largon2 -force_load ${ProjectDir}/../../lib/ios/libargon2.a"
- true
- Entitlements.plist
-
-
- true
- full
- false
- bin\iPhone\Debug
- DEBUG
- prompt
- 4
- false
- ARM64
- iPhone Developer
- true
- Entitlements.plist
- None
- false
- --nodevcodeshare --http-message-handler=NSUrlSessionHandler -gcc_flags "-L${ProjectDir}/../../lib/ios -largon2 -force_load ${ProjectDir}/../../lib/ios/libargon2.a"
- true
-
-
- none
- true
- bin\iPhone\Release
- prompt
- 4
- ARM64
- false
- 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 --linkskip=BitwardeniOSShareExtension -gcc_flags "-L${ProjectDir}/../../lib/ios -largon2 -force_load ${ProjectDir}/../../lib/ios/libargon2.a"
- true
-
-
- none
- True
- bin\iPhone\Ad-Hoc
- prompt
- 4
- False
- ARM64
- True
- 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 --linkskip=BitwardeniOSShareExtension -gcc_flags "-L${ProjectDir}/../../lib/ios -largon2 -force_load ${ProjectDir}/../../lib/ios/libargon2.a"
- Automatic:AdHoc
-
-
- none
- True
- bin\iPhone\AppStore
- prompt
- 4
- False
- ARM64
- 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 --linkskip=BitwardeniOSShareExtension -gcc_flags "-L${ProjectDir}/../../lib/ios -largon2 -force_load ${ProjectDir}/../../lib/ios/libargon2.a"
- true
- Full
-
-
- bin\iPhoneSimulator\FDroid\
- __IOS__;__MOBILE__;__UNIFIED__;
- true
- AnyCPU
- false
- prompt
- MinimumRecommendedRules.ruleset
- --nodevcodeshare --http-message-handler=NSUrlSessionHandler --linkskip=BitwardeniOS --linkskip=BitwardeniOSCore --linkskip=BitwardeniOSAutofill --linkskip=BitwardeniOSExtension --linkskip=BitwardenApp --linkskip=BitwardenCore --linkskip=LiteDB --linkskip=CsvHelper -gcc_flags "-L${ProjectDir}/../../lib/ios -largon2 -force_load ${ProjectDir}/../../lib/ios/libargon2.a"
- true
- SdkOnly
-
-
- bin\iPhone\FDroid\
- __IOS__;__MOBILE__;__UNIFIED__;
- true
- AnyCPU
- false
- prompt
- MinimumRecommendedRules.ruleset
- SdkOnly
- ARMv7
-
-
-
-
-
- $(Home)/Library/Developer/Xcode/DerivedData/bitwarden-cbtqsueryycvflfzbsoteofskiyr/Build/Products
- $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\..'))/watchOS/bitwarden.xcarchive/Products/Applications/bitwarden.app/Watch
- Bitwarden.app
- watchsimulator
- watchos
- $(WatchAppBuildPath)/$(Configuration)-$(WatchAppConfiguration)/$(WatchAppBundle)
- $(WatchAppBuildPath)/$(WatchAppBundle)
-
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1.8.0
-
-
-
-
-
- {EE44C6A1-2A85-45FE-8D9B-BF1D5F88809C}
- App
-
-
- {4b8a8c41-9820-4341-974c-41e65b7f4366}
- Core
-
-
- {8a3ecd75-3ec8-4cb3-b3a2-a73a724c279a}
- iOS.Autofill
- true
- false
-
-
- {e71f3053-056c-4381-9638-048ed73bdff6}
- iOS.Core
- false
- false
-
-
- {324be76c-38fa-4f11-8bb1-95c7b3b1b545}
- iOS.Extension
- true
- false
-
-
- true
- {F8C3F648-EA5A-4719-8005-85D1690B1655}
- iOS.ShareExtension
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
-
- false
-
-
-
-
- false
-
-
-
-
- false
-
-
-
-
- false
-
-
-
-
- false
-
-
-
-
- false
-
-
-
-
- false
-
-
-
-
- false
-
-
-
-
- false
-
-
-
-
- false
-
-
-
-
- false
-
-
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_ResolvedWatchAppReferences Include="$(WatchAppBundleFullPath)" />
-
-
- <_ResolvedWatchAppReferences Include="$(WatchAppBundleFullPath)" />
-
-
- --deep
-
-
-
-
-
-
\ No newline at end of file