From 32899cb7071fedc43aa22d00e7252d5b8c3b1bf8 Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Tue, 9 Jul 2019 15:39:23 +0200 Subject: [PATCH] Introduced Autotype doctor in preparation for macOS 10.15. This change removes the test for autotype on startup and will only check for permissoins when the pereferences are shown or when (gloabal)autotype is performed. --- MacPass.xcodeproj/project.pbxproj | 10 ++ .../AutotypeDoctorReportViewController.xib | 138 +++++++++++++++++ MacPass/Base.lproj/IntegrationPreferences.xib | 17 ++- MacPass/Base.lproj/MainMenu.xib | 12 +- MacPass/MPAppDelegate.h | 1 + MacPass/MPAppDelegate.m | 5 + MacPass/MPAutotypeDaemon.m | 32 ++-- MacPass/MPAutotypeDoctor.h | 18 +-- MacPass/MPAutotypeDoctor.m | 141 ++++++++++-------- .../MPAutotypeDoctorReportViewController.h | 28 ++++ .../MPAutotypeDoctorReportViewController.m | 67 +++++++++ MacPass/MPDocument.m | 6 +- MacPass/MPIntegrationPreferencesController.h | 2 +- MacPass/MPIntegrationPreferencesController.m | 6 +- MacPass/MPSettingsHelper.h | 2 +- MacPass/MPSettingsHelper.m | 7 +- MacPass/MPUserNotificationCenterDelegate.h | 2 +- MacPass/MPUserNotificationCenterDelegate.m | 8 +- MacPass/NSError+Messages.h | 8 +- MacPass/NSError+Messages.m | 10 +- .../en.lproj/IntegrationPreferences.strings | 8 +- MacPass/en.lproj/Localizable.strings | 39 +++-- MacPass/en.lproj/Localizable.strings.updated | Bin 0 -> 54594 bytes 23 files changed, 429 insertions(+), 138 deletions(-) create mode 100644 MacPass/AutotypeDoctorReportViewController.xib create mode 100644 MacPass/MPAutotypeDoctorReportViewController.h create mode 100644 MacPass/MPAutotypeDoctorReportViewController.m create mode 100644 MacPass/en.lproj/Localizable.strings.updated diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index 71a05d20..78504f2d 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -226,6 +226,8 @@ 4CAD338F205169D30068587E /* MPPluginRepositoryItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CAD338E205169D30068587E /* MPPluginRepositoryItem.m */; }; 4CAD748C15B889B700104512 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CAD748B15B889B700104512 /* Security.framework */; }; 4CAD748E15B88AC100104512 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CAD748D15B88AC100104512 /* libz.dylib */; }; + 4CAD8AA622CF397B0090B2DD /* MPAutotypeDoctorReportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CAD8AA422CF397B0090B2DD /* MPAutotypeDoctorReportViewController.m */; }; + 4CAD8AA722CF397B0090B2DD /* AutotypeDoctorReportViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CAD8AA522CF397B0090B2DD /* AutotypeDoctorReportViewController.xib */; }; 4CB33F861EAF54A000C9341E /* KPKNode+MPIsHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CB33F851EAF54A000C9341E /* KPKNode+MPIsHistory.m */; }; 4CB9339916D3A0DD00A13B5D /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 4CB9339716D3A0DD00A13B5D /* Credits.rtf */; }; 4CBA2ABA17074C07006D8139 /* MPSettingsHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CBA2AB917074C07006D8139 /* MPSettingsHelper.m */; }; @@ -776,6 +778,9 @@ 4CAD338E205169D30068587E /* MPPluginRepositoryItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPPluginRepositoryItem.m; sourceTree = ""; }; 4CAD748B15B889B700104512 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 4CAD748D15B88AC100104512 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + 4CAD8AA322CF397B0090B2DD /* MPAutotypeDoctorReportViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPAutotypeDoctorReportViewController.h; sourceTree = ""; }; + 4CAD8AA422CF397B0090B2DD /* MPAutotypeDoctorReportViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPAutotypeDoctorReportViewController.m; sourceTree = ""; }; + 4CAD8AA522CF397B0090B2DD /* AutotypeDoctorReportViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AutotypeDoctorReportViewController.xib; sourceTree = ""; }; 4CB33F841EAF54A000C9341E /* KPKNode+MPIsHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KPKNode+MPIsHistory.h"; sourceTree = ""; }; 4CB33F851EAF54A000C9341E /* KPKNode+MPIsHistory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KPKNode+MPIsHistory.m"; sourceTree = ""; }; 4CB63A6018986530002DEC4C /* MPFlagsHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPFlagsHelper.h; sourceTree = ""; }; @@ -1615,6 +1620,9 @@ 4C73B6EE215E64A7009787F7 /* MPWelcomeViewController.h */, 4C73B6EF215E64A7009787F7 /* MPWelcomeViewController.m */, 4C7F8B6A1A10B68400CCB83D /* WelcomeView.xib */, + 4CAD8AA322CF397B0090B2DD /* MPAutotypeDoctorReportViewController.h */, + 4CAD8AA422CF397B0090B2DD /* MPAutotypeDoctorReportViewController.m */, + 4CAD8AA522CF397B0090B2DD /* AutotypeDoctorReportViewController.xib */, ); name = "View Controller"; sourceTree = ""; @@ -1847,6 +1855,7 @@ 4C3826B41AD04D8E007D7D67 /* 39_HistoryTemplate.pdf in Resources */, 4C77E37D15B84A240093A587 /* MainMenu.xib in Resources */, 4C3826CD1AD04D8E007D7D67 /* 66_MoneyTemplate.pdf in Resources */, + 4CAD8AA722CF397B0090B2DD /* AutotypeDoctorReportViewController.xib in Resources */, 4CA0B2ED15BCADAC00654E32 /* PreferencesWindow.xib in Resources */, 4C76155C1764C04C0015A1A6 /* GeneralPreferences.xib in Resources */, 4CD884B715BD47080042BBF8 /* DocumentWindow.xib in Resources */, @@ -2090,6 +2099,7 @@ 4CEE46DD181C301D006BF1E5 /* MPAutotypeDaemon.m in Sources */, 4C50CC041F6C18830095629D /* MPCollectionViewItem.m in Sources */, 4CA78C001FD58C92003C8560 /* MPPluginRepository.m in Sources */, + 4CAD8AA622CF397B0090B2DD /* MPAutotypeDoctorReportViewController.m in Sources */, 4C8990F71EE978EB0043B48D /* MPDuplicateEntryOptionsWindowController.m in Sources */, 4CA3530B18A53CB800839B0F /* MPKeyMapper.m in Sources */, 4CE298EB1795FC2A00DF7BDB /* MPEntryContextMenuDelegate.m in Sources */, diff --git a/MacPass/AutotypeDoctorReportViewController.xib b/MacPass/AutotypeDoctorReportViewController.xib new file mode 100644 index 00000000..e9275fa6 --- /dev/null +++ b/MacPass/AutotypeDoctorReportViewController.xib @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MacPass will send key press events to the system when Autotype or Global Autotype is executed. Since macOS 10.14 Mojave this is only possible, if Accessibility permissions are granted to the application. + + + + + + + + + + + + + + MacPass will read every window title when Global Autotype is executed to find a match. Since macOS 10.15 Catalina it is not possible to read any window title, if the user has not granted permissions to record the screen. If you are running macOS 10.15 or higher, MacPass will try to capture the left top most pixel on your screen to initate a request to record the screen. This pixel will not be stored and processed in any way. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MacPass/Base.lproj/IntegrationPreferences.xib b/MacPass/Base.lproj/IntegrationPreferences.xib index e3bfb500..07213981 100644 --- a/MacPass/Base.lproj/IntegrationPreferences.xib +++ b/MacPass/Base.lproj/IntegrationPreferences.xib @@ -26,21 +26,22 @@ - + - + - + - + - - + + + Autotype might not work properly. Some issues where found that prevent Autotype or Global Autotype to work. Please run the Autotype Doctor to fix those issues. @@ -52,7 +53,7 @@ - +