Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add compatibility with Ventura and Xcode 14 #182

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import AppKit
import Foundation
import SwiftUI

final class ActivityIndicator: NSViewRepresentable {
struct ActivityIndicator: NSViewRepresentable {

init(size: NSControl.ControlSize) {
self.size = size
Expand Down
16 changes: 16 additions & 0 deletions OpenHaystack/OpenHaystackMail/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,21 @@
<string>224E7F96-2099-499C-A501-63FB68C79CD2</string>
<string>A4B49485-0377-4FAB-8D8E-E3B8018CFC21</string>
</array>
<key>Supported13.1PluginCompatibilityUUIDs</key>
<array>
<string>25288CEF-7D9B-49A8-BE6B-E41DA6277CF3</string>
<string>6FF8B077-81FA-45A4-BD57-17CDE79F13A5</string>
<string>224E7F96-2099-499C-A501-63FB68C79CD2</string>
<string>A4B49485-0377-4FAB-8D8E-E3B8018CFC21</string>
<string>890E3F5B-9490-4828-8F3F-B6561E513FCC</string>
</array>
<key>Supported13.2PluginCompatibilityUUIDs</key>
<array>
<string>25288CEF-7D9B-49A8-BE6B-E41DA6277CF3</string>
<string>6FF8B077-81FA-45A4-BD57-17CDE79F13A5</string>
<string>224E7F96-2099-499C-A501-63FB68C79CD2</string>
<string>A4B49485-0377-4FAB-8D8E-E3B8018CFC21</string>
<string>890E3F5B-9490-4828-8F3F-B6561E513FCC</string>
</array>
</dict>
</plist>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Therefore, the installation procedure is slightly different and requires you to
Our plugin does not access any other private data such as emails (see [source code](OpenHaystack/OpenHaystackMail)).

1. Download a precompiled binary release from our <a href="https://github.com/seemoo-lab/openhaystack/releases">GitHub page</a>.
_Alternative:_ build the application from source via Xcode.
_Alternative:_ build the application from source via Xcode, see [here](build.md).
2. Open OpenHaystack. This will ask you to install the Mail plugin in `~/Library/Mail/Bundle`.
3. Open a terminal and run `sudo spctl --master-disable`, which will disable Gatekeeper and allow our Apple Mail plugin to run.
4. Open Apple Mail. Go to _Preferences_ → _General_ → _Manage Plug-Ins..._ and activate the checkbox next to _OpenHaystackMail.mailbundle_.
Expand Down
Binary file added Resources/build-build.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/build-reset-caches.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/build-show-output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# How to build manually

Whenever there is a new MacOS update we need to update the proper Mail and MacOS version in this [plist](OpenHaystack/OpenHaystackMail/Info.plist)

## Prerequesites

1. You need to have Xcode installed. Latest build as of the time of writing is Xcode 14.2 on Ventura 13.2.
2. In Apple Mail you need to have you iCloud account to be enabled (without that it will not work ⚠️)
3. Apple Mail preferences dialog should show you the `Manage plug-ins` button. If not you will need to run `sudo defaults write "/Library/Preferences/com.apple.mail" EnableBundles 1` and restart Mail

## Steps

1. Locate `OpenHaystack/OpenHaystack.xcodeproj` in Finder and open it in Xcode
2. Xcode should load some dependencies, if this does not happen in Xcode go to `File / Packages / Reset Package Caches`

![Reset Caches](Resources/build-reset-caches.png)
3. Now build the project (`Prodcut / Build`)

![Build project](Resources/build-build.png)
4. After building navigate to the output folder by clicking `Product / Show Build Folder in Finder`

![Show output folder](Resources/build-show-output.png)
5. In Finder navigate to the sub-folder `Build / Products / Debug` and start `OpenHayStack` from here
6. Acknowledge all upcoming popups but ignore the info, that there is a newer version available. When prompted install the Mail plugin with the default parameters
7. Apple Mail should now show you the new plug-in under `Manage plug-ins`
8. Now _close_ Mail, in the Terminal (or other shell) disable Gatekeeper `sudo spctl --master-disable`
9. Start Mail again and now enable the OpenHaystack plugin. You should be required to restart Mail. Afterwards the plugin is enabled. Close Mail again!
10. Re-enable Gatekeeper `sudo spctl --master-enable`
11. Verify in OpenHaystack that you have a proper connection (upper right corner should be a green light)