├── Bitwarden ├── app │ └── .gitkeep ├── Assets.xcassets │ ├── Contents.json │ ├── AppIcon.appiconset │ │ ├── icon@128.png │ │ ├── icon@256.png │ │ ├── icon@32.png │ │ ├── icon@512.png │ │ ├── icon@64.png │ │ ├── icon@1024.png │ │ └── Contents.json │ ├── StatusBarItem.imageset │ │ ├── ToolbarItemIcon.pdf │ │ ├── ToolbarItemIcon_white.pdf │ │ └── Contents.json │ └── AccentColor.colorset │ │ └── Contents.json ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── Bitwarden.entitlements ├── build.sh ├── Info.plist ├── AppDelegate.swift └── ContentView.swift ├── artwork └── screenshot.png ├── .gitmodules ├── Bitwarden.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── xcuserdata │ └── jonas.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj ├── .gitignore ├── README.md └── LICENSE /Bitwarden/app/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /artwork/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3j14/bitwarden-menubar/HEAD/artwork/screenshot.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Bitwarden/browser"] 2 | path = Bitwarden/browser 3 | url = git@github.com:bitwarden/browser.git 4 | -------------------------------------------------------------------------------- /Bitwarden/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Bitwarden/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Bitwarden/Assets.xcassets/AppIcon.appiconset/icon@128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3j14/bitwarden-menubar/HEAD/Bitwarden/Assets.xcassets/AppIcon.appiconset/icon@128.png -------------------------------------------------------------------------------- /Bitwarden/Assets.xcassets/AppIcon.appiconset/icon@256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3j14/bitwarden-menubar/HEAD/Bitwarden/Assets.xcassets/AppIcon.appiconset/icon@256.png -------------------------------------------------------------------------------- /Bitwarden/Assets.xcassets/AppIcon.appiconset/icon@32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3j14/bitwarden-menubar/HEAD/Bitwarden/Assets.xcassets/AppIcon.appiconset/icon@32.png -------------------------------------------------------------------------------- /Bitwarden/Assets.xcassets/AppIcon.appiconset/icon@512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3j14/bitwarden-menubar/HEAD/Bitwarden/Assets.xcassets/AppIcon.appiconset/icon@512.png -------------------------------------------------------------------------------- /Bitwarden/Assets.xcassets/AppIcon.appiconset/icon@64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3j14/bitwarden-menubar/HEAD/Bitwarden/Assets.xcassets/AppIcon.appiconset/icon@64.png -------------------------------------------------------------------------------- /Bitwarden/Assets.xcassets/AppIcon.appiconset/icon@1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3j14/bitwarden-menubar/HEAD/Bitwarden/Assets.xcassets/AppIcon.appiconset/icon@1024.png -------------------------------------------------------------------------------- /Bitwarden/Assets.xcassets/StatusBarItem.imageset/ToolbarItemIcon.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3j14/bitwarden-menubar/HEAD/Bitwarden/Assets.xcassets/StatusBarItem.imageset/ToolbarItemIcon.pdf -------------------------------------------------------------------------------- /Bitwarden/Assets.xcassets/StatusBarItem.imageset/ToolbarItemIcon_white.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3j14/bitwarden-menubar/HEAD/Bitwarden/Assets.xcassets/StatusBarItem.imageset/ToolbarItemIcon_white.pdf -------------------------------------------------------------------------------- /Bitwarden.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Bitwarden/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Bitwarden.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Bitwarden.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | ## Obj-C/Swift specific 8 | *.hmap 9 | 10 | ## App packaging 11 | *.ipa 12 | *.dSYM.zip 13 | *.dSYM 14 | 15 | ## Playgrounds 16 | timeline.xctimeline 17 | playground.xcworkspace 18 | 19 | .build/ 20 | 21 | Bitwarden/app/** 22 | !Bitwarden/app/.gitkeep 23 | -------------------------------------------------------------------------------- /Bitwarden/Bitwarden.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Bitwarden.xcodeproj/xcuserdata/jonas.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Bitwarden.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Bitwarden/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -Eeo pipefail 3 | 4 | # Note: This works with the BSD version of sed (i.e. the one macOS ships with) 5 | # To use the GNU verion, remove the '' after -i 6 | sed -i '' 's/!this.popupUtilsService.inPopout(window)/false/' browser/src/popup/tabs.component.ts 7 | 8 | pushd browser && npm run build 9 | 10 | popd 11 | 12 | rm -rf app/ 13 | cp -r browser/build/ app 14 | cp browser/src/safari/safari/app/popup/index.html app/popup/index.html 15 | touch app/.gitkeep 16 | -------------------------------------------------------------------------------- /Bitwarden/Assets.xcassets/StatusBarItem.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ToolbarItemIcon.pdf", 5 | "idiom" : "mac" 6 | }, 7 | { 8 | "appearances" : [ 9 | { 10 | "appearance" : "luminosity", 11 | "value" : "dark" 12 | } 13 | ], 14 | "filename" : "ToolbarItemIcon_white.pdf", 15 | "idiom" : "mac" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | }, 22 | "properties" : { 23 | "preserves-vector-representation" : true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Bitwarden/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | Bitwarden Menu 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Bitwarden Menu 17 | CFBundlePackageType 18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | LSApplicationCategoryType 24 | public.app-category.productivity 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | LSUIElement 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Bitwarden/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "scale" : "1x", 6 | "size" : "16x16" 7 | }, 8 | { 9 | "filename" : "icon@32.png", 10 | "idiom" : "mac", 11 | "scale" : "2x", 12 | "size" : "16x16" 13 | }, 14 | { 15 | "filename" : "icon@32.png", 16 | "idiom" : "mac", 17 | "scale" : "1x", 18 | "size" : "32x32" 19 | }, 20 | { 21 | "filename" : "icon@64.png", 22 | "idiom" : "mac", 23 | "scale" : "2x", 24 | "size" : "32x32" 25 | }, 26 | { 27 | "filename" : "icon@128.png", 28 | "idiom" : "mac", 29 | "scale" : "1x", 30 | "size" : "128x128" 31 | }, 32 | { 33 | "filename" : "icon@256.png", 34 | "idiom" : "mac", 35 | "scale" : "2x", 36 | "size" : "128x128" 37 | }, 38 | { 39 | "filename" : "icon@256.png", 40 | "idiom" : "mac", 41 | "scale" : "1x", 42 | "size" : "256x256" 43 | }, 44 | { 45 | "filename" : "icon@512.png", 46 | "idiom" : "mac", 47 | "scale" : "2x", 48 | "size" : "256x256" 49 | }, 50 | { 51 | "filename" : "icon@512.png", 52 | "idiom" : "mac", 53 | "scale" : "1x", 54 | "size" : "512x512" 55 | }, 56 | { 57 | "filename" : "icon@1024.png", 58 | "idiom" : "mac", 59 | "scale" : "2x", 60 | "size" : "512x512" 61 | } 62 | ], 63 | "info" : { 64 | "author" : "xcode", 65 | "version" : 1 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Bitwarden/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Bitwarden 4 | // 5 | // Created by Jonas Drotleff on 17.10.20. 6 | // 7 | 8 | import Cocoa 9 | import SwiftUI 10 | 11 | 12 | @main 13 | struct BitwardenMenu: App { 14 | @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate 15 | 16 | var body: some Scene { 17 | Settings { 18 | EmptyView() 19 | } 20 | } 21 | } 22 | 23 | 24 | class AppDelegate: NSObject, NSApplicationDelegate { 25 | 26 | var popover: NSPopover! 27 | var statusBarItem: NSStatusItem! 28 | 29 | func applicationDidFinishLaunching(_ aNotification: Notification) { 30 | // Create the SwiftUI view that provides the window contents. 31 | let contentView = ContentView() 32 | 33 | let _popover = NSPopover() 34 | 35 | _popover.contentSize = NSSize(width: 375, height: 600) 36 | _popover.behavior = .transient 37 | _popover.contentViewController = NSHostingController(rootView: contentView) 38 | 39 | self.popover = _popover 40 | 41 | self.statusBarItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength) 42 | 43 | if (self.statusBarItem.button != nil) { 44 | self.statusBarItem.button!.image = NSImage(named: "StatusBarItem") 45 | self.statusBarItem.button!.action = #selector(togglePopover(_:)) 46 | } 47 | } 48 | 49 | @objc func togglePopover(_ sender: AnyObject?) { 50 | if self.popover.isShown { 51 | self.popover.performClose(sender) 52 | } else if self.statusBarItem.button != nil { 53 | self.popover.show( 54 | relativeTo: self.statusBarItem.button!.bounds, 55 | of: self.statusBarItem.button!, 56 | preferredEdge: .minY 57 | ) 58 | } 59 | } 60 | 61 | func applicationWillTerminate(_ aNotification: Notification) { 62 | // Insert code here to tear down your application 63 | } 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | Bitwarden Menu 4 |

5 | 6 | **This project is not associated with the Bitwarden project nor 8bit Solutions LLC.** 7 | 8 | **Note**: This application **no longer recieves updates** to the 9 | latest version of the Bitwarden Browser Extension as it 10 | uses the Safari Web Extension API starting from version 1.49.0. 11 | For more information see 12 | [`jnsdrtlf/bitwarden-menubar#2`](https://github.com/jnsdrtlf/bitwarden-menubar/issues/2) 13 | and [my post on community.bitwarden.com](https://community.bitwarden.com/t/full-fledged-menu-bar-mode/2587/18). 14 | **The app currently uses a very old version (v1.48.1) of the extension. This will 15 | probably not change in the foreseeable future. Use at your own risk!** 16 | 17 | **Bitwarden Menu** is a simple application for macOS that puts the 18 | [Bitwarden Browser Extension](https://github.com/bitwarden/browser) 19 | right into your menu bar. 20 | 21 |

22 | 23 | ![](artwork/screenshot.png) 24 | 25 |

26 | 27 | ## Installation 28 | As I am not enrolled in the Apple Developer Program, I cannot sign this 29 | Application. However, you may still download the `Bitwarden Menu.app` 30 | from the [Releases](https://github.com/jnsdrtlf/bitwarden-menubar/releases). 31 | 32 | Alternatively, you can build it yourself by cloning this project 33 | using `git clone --recurse-submodules` and opening it in XCode. 34 | One part of the build process is to copy (a slightly modified version of) 35 | the Bitwarden Browser Extension into the app. This is done using the 36 | `Bitwarden/build.sh` script. You therefore have to make sure the 37 | submodule (in `Bitwarden/browser`) is initialized and updated. 38 | 39 | ## License 40 | 41 | The Bitwarden Browser Extension is licensed under the 42 | **GNU General Public License v3.0** and so is this project. 43 | 44 | The App Icon is based on [this template](https://www.figma.com/community/file/857303226040719059/macOS-Big-Sur-Icon-Template) 45 | by [**Vaclav Vancura**](http://vancura.design/) which is licensed under 46 | **CC BY 4.0**. 47 | 48 | ## Trademark Notice 49 | 50 | "Bitwarden" is a registered trademark of Bitwarden Inc. 51 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. -------------------------------------------------------------------------------- /Bitwarden/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Bitwarden 4 | // 5 | // Created by Jonas Drotleff on 17.10.20. 6 | // 7 | 8 | import SwiftUI 9 | import WebKit 10 | 11 | struct WebKitView: NSViewRepresentable { 12 | 13 | public typealias NSViewType = WKWebView 14 | private let webView: WKWebView = WKWebView() 15 | 16 | public func makeNSView(context: NSViewRepresentableContext) -> WKWebView { 17 | let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String 18 | let bundleURL = Bundle.main.resourceURL!.absoluteURL 19 | let html = bundleURL.appendingPathComponent("app/popup/index.html") 20 | let url = URL(string: "\(html.absoluteString)?appVersion=\(version!)") 21 | 22 | webView.frame = CGRect(x: 0, y: 0, width: 375, height: 600) 23 | webView.navigationDelegate = context.coordinator 24 | webView.uiDelegate = context.coordinator 25 | webView.configuration.userContentController.add(context.coordinator, name: "bitwardenApp") 26 | webView.configuration.preferences.setValue(true, forKey: "allowFileAccessFromFileURLs") 27 | webView.configuration.preferences.setValue(true, forKey: "allowFileAccessFromFileURLs") 28 | webView.configuration.preferences.setValue(true, forKey: "developerExtrasEnabled") 29 | webView.loadFileURL(url!, allowingReadAccessTo: bundleURL) 30 | return webView 31 | } 32 | 33 | public func updateNSView(_ nsView: WKWebView, context: NSViewRepresentableContext) { 34 | // nsView.loadHTMLString("test", baseURL: nil) 35 | } 36 | 37 | public func makeCoordinator() -> Coordinator { 38 | Coordinator(parent: self) 39 | } 40 | 41 | public class Coordinator: NSObject, WKScriptMessageHandler, WKNavigationDelegate, WKUIDelegate { 42 | var popoverOpenCount: Int = 0 43 | 44 | public func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { 45 | if message.name != "bitwardenApp" { 46 | return 47 | } 48 | guard let messageBody = message.body as? String else { 49 | return 50 | } 51 | guard let m: AppMessage = jsonDeserialize(json: messageBody) else { 52 | return 53 | } 54 | let command = m.command 55 | NSLog("Command: \(command)") 56 | if command == "storage_get" { 57 | if let data = m.data { 58 | let obj = UserDefaults.standard.string(forKey: data) 59 | m.responseData = obj 60 | replyMessage(message: m) 61 | } 62 | } else if command == "storage_save" { 63 | guard let data: StorageData = jsonDeserialize(json: m.data) else { 64 | return 65 | } 66 | if let obj = data.obj { 67 | UserDefaults.standard.set(obj, forKey: data.key) 68 | } else { 69 | UserDefaults.standard.removeObject(forKey: data.key) 70 | } 71 | replyMessage(message: m) 72 | } else if command == "storage_remove" { 73 | if let data = m.data { 74 | UserDefaults.standard.removeObject(forKey: data) 75 | replyMessage(message: m) 76 | } 77 | } else if command == "getLocaleStrings" { 78 | let language = m.data ?? "en" 79 | guard let bundleUrl = Bundle.main.resourceURL?.absoluteURL else { 80 | return 81 | } 82 | let messagesUrl = bundleUrl.appendingPathComponent("app/_locales/\(language)/messages.json") 83 | do { 84 | let json = try String(contentsOf: messagesUrl, encoding: .utf8) 85 | webView.evaluateJavaScript("window.bitwardenLocaleStrings = \(json);", completionHandler: {(result, error) in 86 | guard let err = error else { 87 | return; 88 | } 89 | NSLog("evaluateJavaScript error : %@", err.localizedDescription); 90 | }) 91 | } catch { 92 | NSLog("ERROR on getLocaleStrings, \(error)") 93 | } 94 | replyMessage(message: m) 95 | } else if command == "tabs_query" { 96 | m.responseData = nil 97 | self.replyMessage(message: m) 98 | } else if command == "tabs_message" { 99 | m.responseData = nil 100 | self.replyMessage(message: m) 101 | } else if command == "hidePopover" { 102 | // dismissPopover() 103 | replyMessage(message: m) 104 | } else if command == "reloadExtension" { 105 | webView.reload() 106 | replyMessage(message: m) 107 | } else if command == "copyToClipboard" { 108 | let pasteboard = NSPasteboard.general 109 | pasteboard.declareTypes([NSPasteboard.PasteboardType.string], owner: nil) 110 | pasteboard.setString(m.data ?? "", forType: NSPasteboard.PasteboardType.string) 111 | replyMessage(message: m) 112 | } else if command == "readFromClipboard" { 113 | let pasteboard = NSPasteboard.general 114 | m.responseData = pasteboard.pasteboardItems?.first?.string(forType: .string) 115 | replyMessage(message: m) 116 | } else if command == "downloadFile" { 117 | guard let jsonData = m.data else { 118 | return 119 | } 120 | guard let dlMsg: DownloadFileMessage = jsonDeserialize(json: jsonData) else { 121 | return 122 | } 123 | var blobData: Data? 124 | if dlMsg.blobOptions?.type == "text/plain" { 125 | blobData = dlMsg.blobData?.data(using: .utf8) 126 | } else if let blob = dlMsg.blobData { 127 | blobData = Data(base64Encoded: blob) 128 | } 129 | guard let data = blobData else { 130 | return 131 | } 132 | let panel = NSSavePanel() 133 | panel.canCreateDirectories = true 134 | panel.nameFieldStringValue = dlMsg.fileName 135 | panel.begin { response in 136 | if response == NSApplication.ModalResponse.OK { 137 | if let url = panel.url { 138 | do { 139 | let fileManager = FileManager.default 140 | if !fileManager.fileExists(atPath: url.absoluteString) { 141 | fileManager.createFile(atPath: url.absoluteString, contents: Data(), 142 | attributes: nil) 143 | } 144 | try data.write(to: url) 145 | } catch { 146 | print(error) 147 | NSLog("ERROR in downloadFile, \(error)") 148 | } 149 | } 150 | } 151 | } 152 | } 153 | } 154 | 155 | func replyMessage(message: AppMessage) { 156 | let json = (jsonSerialize(obj: message) ?? "null") 157 | webView.evaluateJavaScript("window.bitwardenSafariAppMessageReceiver(\(json));", completionHandler: {(result, error) in 158 | guard let err = error else { 159 | return; 160 | } 161 | NSLog("evaluateJavaScript error : %@", err.localizedDescription); 162 | }) 163 | } 164 | 165 | var parent: WebKitView 166 | var webView: WKWebView 167 | 168 | init(parent: WebKitView) { 169 | self.parent = parent 170 | self.webView = parent.webView 171 | } 172 | } 173 | } 174 | 175 | func jsonSerialize(obj: T?) -> String? { 176 | let encoder = JSONEncoder() 177 | do { 178 | let data = try encoder.encode(obj) 179 | return String(data: data, encoding: .utf8) ?? "null" 180 | } catch _ { 181 | return "null" 182 | } 183 | } 184 | 185 | func jsonDeserialize(json: String?) -> T? { 186 | if json == nil { 187 | return nil 188 | } 189 | let decoder = JSONDecoder() 190 | do { 191 | let obj = try decoder.decode(T.self, from: json!.data(using: .utf8)!) 192 | return obj 193 | } catch _ { 194 | return nil 195 | } 196 | } 197 | 198 | class AppMessage: Decodable, Encodable { 199 | init() { 200 | id = "" 201 | command = "" 202 | data = nil 203 | responseData = nil 204 | responseError = nil 205 | } 206 | 207 | var id: String 208 | var command: String 209 | var data: String? 210 | var responseData: String? 211 | var responseError: Bool? 212 | var senderTab: Tab? 213 | } 214 | 215 | class StorageData: Decodable, Encodable { 216 | var key: String 217 | var obj: String? 218 | } 219 | 220 | class TabQueryOptions: Decodable, Encodable { 221 | var currentWindow: Bool? 222 | var active: Bool? 223 | } 224 | 225 | class Tab: Decodable, Encodable { 226 | init() { 227 | id = "" 228 | index = -1 229 | windowId = -100 230 | title = "" 231 | active = false 232 | url = "" 233 | } 234 | 235 | var id: String 236 | var index: Int 237 | var windowId: Int 238 | var title: String? 239 | var active: Bool 240 | var url: String? 241 | } 242 | 243 | class TabMessage: Decodable, Encodable { 244 | var tab: Tab 245 | var obj: String 246 | var options: TabMessageOptions? 247 | } 248 | 249 | class TabMessageOptions: Decodable, Encodable { 250 | var frameId: Int? 251 | } 252 | 253 | class DownloadFileMessage: Decodable, Encodable { 254 | var fileName: String 255 | var blobData: String? 256 | var blobOptions: DownloadFileMessageBlobOptions? 257 | } 258 | 259 | class DownloadFileMessageBlobOptions: Decodable, Encodable { 260 | var type: String? 261 | } 262 | 263 | 264 | struct ContentView: View { 265 | var body: some View { 266 | WebKitView().frame(width: 375, height: 600) 267 | } 268 | } 269 | 270 | 271 | struct ContentView_Previews: PreviewProvider { 272 | static var previews: some View { 273 | ContentView() 274 | } 275 | } 276 | 277 | -------------------------------------------------------------------------------- /Bitwarden.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | DD387510253B176A0021B81B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD38750F253B176A0021B81B /* AppDelegate.swift */; }; 11 | DD387512253B176A0021B81B /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD387511253B176A0021B81B /* ContentView.swift */; }; 12 | DD387514253B176C0021B81B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DD387513253B176C0021B81B /* Assets.xcassets */; }; 13 | DD387517253B176C0021B81B /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DD387516253B176C0021B81B /* Preview Assets.xcassets */; }; 14 | DD792BBD2579310500C436EF /* app in Resources */ = {isa = PBXBuildFile; fileRef = DD387532253B3EF40021B81B /* app */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXFileReference section */ 18 | DD38750F253B176A0021B81B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 19 | DD387511253B176A0021B81B /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 20 | DD387513253B176C0021B81B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | DD387516253B176C0021B81B /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 22 | DD38751B253B176C0021B81B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 23 | DD38751C253B176C0021B81B /* Bitwarden.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Bitwarden.entitlements; sourceTree = ""; }; 24 | DD387532253B3EF40021B81B /* app */ = {isa = PBXFileReference; lastKnownFileType = folder; name = app; path = Bitwarden/app; sourceTree = ""; }; 25 | DD78FD55253C56B000A6184C /* build.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = build.sh; path = Bitwarden/build.sh; sourceTree = ""; }; 26 | DDF717FF25C2E2AC0007592B /* Bitwarden Menu.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Bitwarden Menu.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | DD387509253B176A0021B81B /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | ); 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXFrameworksBuildPhase section */ 38 | 39 | /* Begin PBXGroup section */ 40 | DD387503253B176A0021B81B = { 41 | isa = PBXGroup; 42 | children = ( 43 | DD78FD55253C56B000A6184C /* build.sh */, 44 | DD387532253B3EF40021B81B /* app */, 45 | DD38750E253B176A0021B81B /* Bitwarden */, 46 | DDF717FF25C2E2AC0007592B /* Bitwarden Menu.app */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | DD38750E253B176A0021B81B /* Bitwarden */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | DD38750F253B176A0021B81B /* AppDelegate.swift */, 54 | DD387511253B176A0021B81B /* ContentView.swift */, 55 | DD387513253B176C0021B81B /* Assets.xcassets */, 56 | DD38751B253B176C0021B81B /* Info.plist */, 57 | DD38751C253B176C0021B81B /* Bitwarden.entitlements */, 58 | DD387515253B176C0021B81B /* Preview Content */, 59 | ); 60 | path = Bitwarden; 61 | sourceTree = ""; 62 | }; 63 | DD387515253B176C0021B81B /* Preview Content */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | DD387516253B176C0021B81B /* Preview Assets.xcassets */, 67 | ); 68 | path = "Preview Content"; 69 | sourceTree = ""; 70 | }; 71 | /* End PBXGroup section */ 72 | 73 | /* Begin PBXNativeTarget section */ 74 | DD38750B253B176A0021B81B /* Bitwarden */ = { 75 | isa = PBXNativeTarget; 76 | buildConfigurationList = DD38751F253B176C0021B81B /* Build configuration list for PBXNativeTarget "Bitwarden" */; 77 | buildPhases = ( 78 | DD387508253B176A0021B81B /* Sources */, 79 | DD387509253B176A0021B81B /* Frameworks */, 80 | DD78FD54253C565F00A6184C /* Run Script */, 81 | DD38750A253B176A0021B81B /* Resources */, 82 | ); 83 | buildRules = ( 84 | ); 85 | dependencies = ( 86 | ); 87 | name = Bitwarden; 88 | productName = Bitwarden; 89 | productReference = DDF717FF25C2E2AC0007592B /* Bitwarden Menu.app */; 90 | productType = "com.apple.product-type.application"; 91 | }; 92 | /* End PBXNativeTarget section */ 93 | 94 | /* Begin PBXProject section */ 95 | DD387504253B176A0021B81B /* Project object */ = { 96 | isa = PBXProject; 97 | attributes = { 98 | KnownAssetTags = ( 99 | New, 100 | ); 101 | LastSwiftUpdateCheck = 1200; 102 | LastUpgradeCheck = 1200; 103 | TargetAttributes = { 104 | DD38750B253B176A0021B81B = { 105 | CreatedOnToolsVersion = 12.0.1; 106 | }; 107 | }; 108 | }; 109 | buildConfigurationList = DD387507253B176A0021B81B /* Build configuration list for PBXProject "Bitwarden" */; 110 | compatibilityVersion = "Xcode 9.3"; 111 | developmentRegion = en; 112 | hasScannedForEncodings = 0; 113 | knownRegions = ( 114 | en, 115 | Base, 116 | ); 117 | mainGroup = DD387503253B176A0021B81B; 118 | productRefGroup = DD387503253B176A0021B81B; 119 | projectDirPath = ""; 120 | projectRoot = ""; 121 | targets = ( 122 | DD38750B253B176A0021B81B /* Bitwarden */, 123 | ); 124 | }; 125 | /* End PBXProject section */ 126 | 127 | /* Begin PBXResourcesBuildPhase section */ 128 | DD38750A253B176A0021B81B /* Resources */ = { 129 | isa = PBXResourcesBuildPhase; 130 | buildActionMask = 2147483647; 131 | files = ( 132 | DD792BBD2579310500C436EF /* app in Resources */, 133 | DD387517253B176C0021B81B /* Preview Assets.xcassets in Resources */, 134 | DD387514253B176C0021B81B /* Assets.xcassets in Resources */, 135 | ); 136 | runOnlyForDeploymentPostprocessing = 0; 137 | }; 138 | /* End PBXResourcesBuildPhase section */ 139 | 140 | /* Begin PBXShellScriptBuildPhase section */ 141 | DD78FD54253C565F00A6184C /* Run Script */ = { 142 | isa = PBXShellScriptBuildPhase; 143 | buildActionMask = 2147483647; 144 | files = ( 145 | ); 146 | inputFileListPaths = ( 147 | ); 148 | inputPaths = ( 149 | ); 150 | name = "Run Script"; 151 | outputFileListPaths = ( 152 | ); 153 | outputPaths = ( 154 | ); 155 | runOnlyForDeploymentPostprocessing = 0; 156 | shellPath = /bin/sh; 157 | shellScript = "pushd Bitwarden\n/Users/jonas/Documents/Code/Bitwarden/Bitwarden/build.sh\npopd\n"; 158 | }; 159 | /* End PBXShellScriptBuildPhase section */ 160 | 161 | /* Begin PBXSourcesBuildPhase section */ 162 | DD387508253B176A0021B81B /* Sources */ = { 163 | isa = PBXSourcesBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | DD387512253B176A0021B81B /* ContentView.swift in Sources */, 167 | DD387510253B176A0021B81B /* AppDelegate.swift in Sources */, 168 | ); 169 | runOnlyForDeploymentPostprocessing = 0; 170 | }; 171 | /* End PBXSourcesBuildPhase section */ 172 | 173 | /* Begin XCBuildConfiguration section */ 174 | DD38751D253B176C0021B81B /* Debug */ = { 175 | isa = XCBuildConfiguration; 176 | buildSettings = { 177 | ALWAYS_SEARCH_USER_PATHS = NO; 178 | CLANG_ANALYZER_NONNULL = YES; 179 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 180 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 181 | CLANG_CXX_LIBRARY = "libc++"; 182 | CLANG_ENABLE_MODULES = YES; 183 | CLANG_ENABLE_OBJC_ARC = YES; 184 | CLANG_ENABLE_OBJC_WEAK = YES; 185 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 186 | CLANG_WARN_BOOL_CONVERSION = YES; 187 | CLANG_WARN_COMMA = YES; 188 | CLANG_WARN_CONSTANT_CONVERSION = YES; 189 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 190 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 191 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 192 | CLANG_WARN_EMPTY_BODY = YES; 193 | CLANG_WARN_ENUM_CONVERSION = YES; 194 | CLANG_WARN_INFINITE_RECURSION = YES; 195 | CLANG_WARN_INT_CONVERSION = YES; 196 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 197 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 198 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 199 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 200 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 201 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 202 | CLANG_WARN_STRICT_PROTOTYPES = YES; 203 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 204 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 205 | CLANG_WARN_UNREACHABLE_CODE = YES; 206 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 207 | COPY_PHASE_STRIP = NO; 208 | DEBUG_INFORMATION_FORMAT = dwarf; 209 | ENABLE_STRICT_OBJC_MSGSEND = YES; 210 | ENABLE_TESTABILITY = YES; 211 | GCC_C_LANGUAGE_STANDARD = gnu11; 212 | GCC_DYNAMIC_NO_PIC = NO; 213 | GCC_NO_COMMON_BLOCKS = YES; 214 | GCC_OPTIMIZATION_LEVEL = 0; 215 | GCC_PREPROCESSOR_DEFINITIONS = ( 216 | "DEBUG=1", 217 | "$(inherited)", 218 | ); 219 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 220 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 221 | GCC_WARN_UNDECLARED_SELECTOR = YES; 222 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 223 | GCC_WARN_UNUSED_FUNCTION = YES; 224 | GCC_WARN_UNUSED_VARIABLE = YES; 225 | MACOSX_DEPLOYMENT_TARGET = 11.0; 226 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 227 | MTL_FAST_MATH = YES; 228 | ONLY_ACTIVE_ARCH = YES; 229 | SDKROOT = macosx; 230 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 231 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 232 | }; 233 | name = Debug; 234 | }; 235 | DD38751E253B176C0021B81B /* Release */ = { 236 | isa = XCBuildConfiguration; 237 | buildSettings = { 238 | ALWAYS_SEARCH_USER_PATHS = NO; 239 | CLANG_ANALYZER_NONNULL = YES; 240 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 241 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 242 | CLANG_CXX_LIBRARY = "libc++"; 243 | CLANG_ENABLE_MODULES = YES; 244 | CLANG_ENABLE_OBJC_ARC = YES; 245 | CLANG_ENABLE_OBJC_WEAK = YES; 246 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 247 | CLANG_WARN_BOOL_CONVERSION = YES; 248 | CLANG_WARN_COMMA = YES; 249 | CLANG_WARN_CONSTANT_CONVERSION = YES; 250 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 251 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 252 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 253 | CLANG_WARN_EMPTY_BODY = YES; 254 | CLANG_WARN_ENUM_CONVERSION = YES; 255 | CLANG_WARN_INFINITE_RECURSION = YES; 256 | CLANG_WARN_INT_CONVERSION = YES; 257 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 258 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 259 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 260 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 261 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 262 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 263 | CLANG_WARN_STRICT_PROTOTYPES = YES; 264 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 265 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 266 | CLANG_WARN_UNREACHABLE_CODE = YES; 267 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 268 | COPY_PHASE_STRIP = NO; 269 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 270 | ENABLE_NS_ASSERTIONS = NO; 271 | ENABLE_STRICT_OBJC_MSGSEND = YES; 272 | GCC_C_LANGUAGE_STANDARD = gnu11; 273 | GCC_NO_COMMON_BLOCKS = YES; 274 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 275 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 276 | GCC_WARN_UNDECLARED_SELECTOR = YES; 277 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 278 | GCC_WARN_UNUSED_FUNCTION = YES; 279 | GCC_WARN_UNUSED_VARIABLE = YES; 280 | MACOSX_DEPLOYMENT_TARGET = 11.0; 281 | MTL_ENABLE_DEBUG_INFO = NO; 282 | MTL_FAST_MATH = YES; 283 | SDKROOT = macosx; 284 | SWIFT_COMPILATION_MODE = wholemodule; 285 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 286 | }; 287 | name = Release; 288 | }; 289 | DD387520253B176C0021B81B /* Debug */ = { 290 | isa = XCBuildConfiguration; 291 | buildSettings = { 292 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 293 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 294 | CODE_SIGN_ENTITLEMENTS = Bitwarden/Bitwarden.entitlements; 295 | CODE_SIGN_IDENTITY = "Apple Development"; 296 | CODE_SIGN_STYLE = Automatic; 297 | COMBINE_HIDPI_IMAGES = YES; 298 | CURRENT_PROJECT_VERSION = 4; 299 | DEVELOPMENT_ASSET_PATHS = "\"Bitwarden/Preview Content\""; 300 | DEVELOPMENT_TEAM = T973CT77D5; 301 | ENABLE_HARDENED_RUNTIME = YES; 302 | ENABLE_PREVIEWS = YES; 303 | INFOPLIST_FILE = Bitwarden/Info.plist; 304 | LD_RUNPATH_SEARCH_PATHS = ( 305 | "$(inherited)", 306 | "@executable_path/../Frameworks", 307 | ); 308 | MACOSX_DEPLOYMENT_TARGET = 11.0; 309 | MARKETING_VERSION = 0.0.3; 310 | PRODUCT_BUNDLE_IDENTIFIER = de.jonas.Bitwarden; 311 | PRODUCT_NAME = "$(TARGET_NAME) Menu"; 312 | SWIFT_VERSION = 5.0; 313 | }; 314 | name = Debug; 315 | }; 316 | DD387521253B176C0021B81B /* Release */ = { 317 | isa = XCBuildConfiguration; 318 | buildSettings = { 319 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 320 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 321 | CODE_SIGN_ENTITLEMENTS = Bitwarden/Bitwarden.entitlements; 322 | CODE_SIGN_IDENTITY = "Apple Development"; 323 | CODE_SIGN_STYLE = Automatic; 324 | COMBINE_HIDPI_IMAGES = YES; 325 | CURRENT_PROJECT_VERSION = 4; 326 | DEVELOPMENT_ASSET_PATHS = "\"Bitwarden/Preview Content\""; 327 | DEVELOPMENT_TEAM = T973CT77D5; 328 | ENABLE_HARDENED_RUNTIME = YES; 329 | ENABLE_PREVIEWS = YES; 330 | INFOPLIST_FILE = Bitwarden/Info.plist; 331 | LD_RUNPATH_SEARCH_PATHS = ( 332 | "$(inherited)", 333 | "@executable_path/../Frameworks", 334 | ); 335 | MACOSX_DEPLOYMENT_TARGET = 11.0; 336 | MARKETING_VERSION = 0.0.3; 337 | PRODUCT_BUNDLE_IDENTIFIER = de.jonas.Bitwarden; 338 | PRODUCT_NAME = "$(TARGET_NAME) Menu"; 339 | SWIFT_VERSION = 5.0; 340 | }; 341 | name = Release; 342 | }; 343 | /* End XCBuildConfiguration section */ 344 | 345 | /* Begin XCConfigurationList section */ 346 | DD387507253B176A0021B81B /* Build configuration list for PBXProject "Bitwarden" */ = { 347 | isa = XCConfigurationList; 348 | buildConfigurations = ( 349 | DD38751D253B176C0021B81B /* Debug */, 350 | DD38751E253B176C0021B81B /* Release */, 351 | ); 352 | defaultConfigurationIsVisible = 0; 353 | defaultConfigurationName = Release; 354 | }; 355 | DD38751F253B176C0021B81B /* Build configuration list for PBXNativeTarget "Bitwarden" */ = { 356 | isa = XCConfigurationList; 357 | buildConfigurations = ( 358 | DD387520253B176C0021B81B /* Debug */, 359 | DD387521253B176C0021B81B /* Release */, 360 | ); 361 | defaultConfigurationIsVisible = 0; 362 | defaultConfigurationName = Release; 363 | }; 364 | /* End XCConfigurationList section */ 365 | }; 366 | rootObject = DD387504253B176A0021B81B /* Project object */; 367 | } 368 | --------------------------------------------------------------------------------