gasmask icon indicating copy to clipboard operation
gasmask copied to clipboard

updated for Apple Silicon

Open sweetppro opened this issue 2 years ago • 7 comments

  • Updated for macOS Ventura and Xcode 14.2
  • Apple Silicon compatible
  • updated project to macOS 11+
  • fixed most warnings and deprecations
  • replaced ShortcutRecorder Framework with MASShortcut package
  • general refactoring
  • updated Preferences window layout
  • replaced most static images with SF Symbols
  • moved remaining images to Assets catalogue
  • updated icon to user submitted icon https://github.com/2ndalpha/gasmask/issues/203
  • refreshed status menu icon
  • refreshed .hst icon
  • added support for restarting mDNSResponder via NSUserAppleScriptTask
  • updated .gitignore to ignore .DS_Store files
  • updated README to indicate support for macOS Big Sur and above

sweetppro avatar Jan 08 '23 20:01 sweetppro

Here's all the assets I used/created: Gas Mask Icons.zip

sweetppro avatar Jan 08 '23 20:01 sweetppro

Wow, it is a big PR. Has anyone tested it / is using it successfully daily?

2ndalpha avatar Mar 07 '23 10:03 2ndalpha

Has anyone tested it / is using it successfully daily?

I tested it today – but my conclusion is, that its not "production ready" yet. Some key functionalities of the Gas Mask App are not working. I think the to-dos in #202 need to be addressed, too.

I tried it first with the configured Target platform settings (11.0) and with the most recent once (13.1) – the later giving me actually better results on an Apple Silicon platform.

  • MacBook Air M2
  • macOS 13.3 (b) Beta (22E7752300g)
  • Xcode Version 14.2 (14C18)

Functionality + GUI issues

  • Good news first: this version adds support for #90 - although buggy (see below)
  • Sometimes the "Combine Hosts"-selection is missing
    • Might relate to Xcode Warnings with HostsListView.m, listed below
  • A "Combined" file does not show any (combined) content --> yet I think an existing combined hosts works technically
  • A "Remote" hosts file is not being displayed properly
    • e.g. after adding, an infinite "spinner"-icon is displayed (stuck downloading the file?)
    • upon App restart, a remote Hosts is rendered empty… and not refetching or alike
  • Also I think the release is not properly updating Version information etc. (e.g. still "0.8.6").
  • Tested the changes of 2 PRs and those both seem to work flawlessly – and could be merged IMHO:
    • #162
    • #193

—> below are some screenshots

Xcode issues

Build Errors

None

Build Warnings

ApplicationController.m

  • [ ] /Applications/GasMask/gasmask/Source/ApplicationController.m:136:12 'setAllowedFileTypes:' is deprecated: first deprecated in macOS 12.0 - Use -allowedContentTypes instead

HostsListView.m

  • [x] /Applications/GasMask/gasmask/Source/HostsListView.m:43:85 'NSFilenamesPboardType' is deprecated: first deprecated in macOS 10.14 - Create multiple pasteboard items with NSPasteboardTypeFileURL or kUTTypeFileURL instead
  • [x] /Applications/GasMask/gasmask/Source/HostsListView.m:47:35 'NSTableViewSelectionHighlightStyleSourceList' is deprecated: first deprecated in macOS 12.0 - Set the NSTableView.style property to NSTableViewStyleSourceList instead.
  • [x] /Applications/GasMask/gasmask/Source/HostsListView.m:101:1 Implementing deprecated method

HostsMainController.m

  • [ ] /Applications/GasMask/gasmask/Source/HostsMainController.m:420:9 'FSEventStreamScheduleWithRunLoop' is deprecated: first deprecated in macOS 13.0 - Use FSEventStreamSetDispatchQueue instead.
  • [ ] /Applications/GasMask/gasmask/Source/HostsMainController.m:431:9 'FSEventStreamUnscheduleFromRunLoop' is deprecated: first deprecated in macOS 13.0 - Use FSEventStreamSetDispatchQueue instead.

LoginItem.m

  • [ ] /Applications/GasMask/gasmask/Source/LoginItem.m:56:2 'LSSharedFileListInsertItemURL' is deprecated: first deprecated in macOS 10.11 - No longer supported
  • [ ] /Applications/GasMask/gasmask/Source/LoginItem.m:57:11 'kLSSharedFileListItemLast' is deprecated: first deprecated in macOS 10.11 - No longer supported
  • [ ] /Applications/GasMask/gasmask/Source/LoginItem.m:69:3 'LSSharedFileListItemRemove' is deprecated: first deprecated in macOS 10.11 - No longer supported
  • [ ] /Applications/GasMask/gasmask/Source/LoginItem.m:75:9 'LSSharedFileListCreate' is deprecated: first deprecated in macOS 10.11 - No longer supported
  • [ ] /Applications/GasMask/gasmask/Source/LoginItem.m:75:38 'kLSSharedFileListSessionLoginItems' is deprecated: first deprecated in macOS 10.11
  • [ ] /Applications/GasMask/gasmask/Source/LoginItem.m:87:49 'LSSharedFileListCopySnapshot' is deprecated: first deprecated in macOS 10.11 - No longer supported
  • [ ] /Applications/GasMask/gasmask/Source/LoginItem.m:95:7 'LSSharedFileListItemResolve' is deprecated: first deprecated in macOS 10.10

PrivilegedActions.m

  • [ ] /Applications/GasMask/gasmask/Source/PrivilegedActions.m:121:20 'AuthorizationExecuteWithPrivileges' is deprecated: first deprecated in macOS 10.7

Util.m

  • [x] /Applications/GasMask/gasmask/Source/Util.m:57:45 'currentAppearance' is deprecated: first deprecated in macOS 12.0 - Use -performAsCurrentDrawingAppearance: to temporarily set the drawing appearance, or +currentDrawingAppearance to access the currently drawing appearance.
  • [x] /Applications/GasMask/gasmask/Source/Util.m:57:45 'setCurrentAppearance:' is deprecated: first deprecated in macOS 12.0 - Use -performAsCurrentDrawingAppearance: to temporarily set the drawing appearance, or +currentDrawingAppearance to access the currently drawing appearance.

Screenshots

Screenshot 2023-03-12 at 16 26 12 Screenshot 2023-03-12 at 16 00 24

App GUI

Screenshot 2023-03-12 at 16 04 59 Screenshot 2023-03-12 at 16 06 45 Screenshot 2023-03-12 at 16 11 31

Xcode

Screenshot 2023-03-12 at 16 02 40 Screenshot 2023-03-12 at 15 30 00

oliveratgithub avatar Mar 12 '23 15:03 oliveratgithub

Thank you @oliveratgithub for testing. To be fair the current code in master does not work at all.

I will try to review it all.

2ndalpha avatar Mar 13 '23 18:03 2ndalpha

merge this!

lockieluke avatar Mar 25 '23 16:03 lockieluke

Hi @2ndalpha Is there something we can do to help the process of getting the Apple Silicon version out. I see some testing is required and maybe some fixes. Please advise as it seems you placed you self in the eye of the storm and wanted to review :-D

tlogik avatar Jan 23 '24 13:01 tlogik

@tlogik I can review and test PR-s. The changes would need to be as small as possible. This PR is huge and if the author does not have to fix the issues then there is no real way to move forward with it. Unfortunately I don't have time to actively develop it.

2ndalpha avatar Jan 23 '24 13:01 2ndalpha