Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Show manual instructions if opening preferences fails (#680)
Leendert de Borst1b4389c7d76b
diff --git a/browser-extension/safari-xcode/AliasVault/AliasVault.xcodeproj/project.pbxproj b/browser-extension/safari-xcode/AliasVault/AliasVault.xcodeproj/project.pbxprojindex f074297c4..72d85a0f5 100644--- a/browser-extension/safari-xcode/AliasVault/AliasVault.xcodeproj/project.pbxproj+++ b/browser-extension/safari-xcode/AliasVault/AliasVault.xcodeproj/project.pbxproj@@ -445,6 +445,7 @@buildSettings = {CODE_SIGN_ENTITLEMENTS = "AliasVault Extension/AliasVault_Extension.entitlements";CODE_SIGN_IDENTITY = "Apple Development";+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";CODE_SIGN_STYLE = Automatic;CURRENT_PROJECT_VERSION = 1;DEVELOPMENT_TEAM = 8PHW4HN3F7;@@ -514,7 +515,7 @@CODE_SIGN_IDENTITY = "Apple Development";CODE_SIGN_STYLE = Automatic;COMBINE_HIDPI_IMAGES = YES;- CURRENT_PROJECT_VERSION = 2;+ CURRENT_PROJECT_VERSION = 5;DEVELOPMENT_TEAM = 8PHW4HN3F7;ENABLE_HARDENED_RUNTIME = YES;GENERATE_INFOPLIST_FILE = YES;@@ -553,7 +554,7 @@CODE_SIGN_ENTITLEMENTS = AliasVault/AliasVault.entitlements;CODE_SIGN_STYLE = Automatic;COMBINE_HIDPI_IMAGES = YES;- CURRENT_PROJECT_VERSION = 2;+ CURRENT_PROJECT_VERSION = 5;DEVELOPMENT_TEAM = 8PHW4HN3F7;ENABLE_HARDENED_RUNTIME = YES;GENERATE_INFOPLIST_FILE = YES;diff --git a/browser-extension/safari-xcode/AliasVault/AliasVault/ViewController.swift b/browser-extension/safari-xcode/AliasVault/AliasVault/ViewController.swiftindex 7ea44fa3f..16b703b21 100644--- a/browser-extension/safari-xcode/AliasVault/AliasVault/ViewController.swift+++ b/browser-extension/safari-xcode/AliasVault/AliasVault/ViewController.swift@@ -46,12 +46,27 @@ class ViewController: NSViewController, WKNavigationDelegate, WKScriptMessageHanif (message.body as! String != "open-preferences") {return;}--SFSafariApplication.showPreferencesForExtension(withIdentifier: extensionBundleIdentifier) { error inDispatchQueue.main.async {- NSApplication.shared.terminate(nil)+ if let error = error {+ // Show manual instructions in case opening the preferences fails due to restricted permissions.+ let alert = NSAlert()+ alert.messageText = "Safari Extensions Settings"+ alert.informativeText = """+ Please follow these steps to enable the extension:+ 1. Open Safari+ 2. Click Safari > Settings in the menu bar+ 3. Go to Extensions+ 4. Find and enable "AliasVault"+ """+ alert.addButton(withTitle: "OK")+ alert.runModal()+ }+ else {+ // Close app+ NSApplication.shared.terminate(nil)+ }}}}