From c7d85d6daa1c49c909843a78d698f4283efc391f Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Mon, 1 Jul 2019 13:27:18 +0200 Subject: [PATCH 1/3] Added log message when no window title can be determined --- MacPass/MPAutotypeDaemon.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MacPass/MPAutotypeDaemon.m b/MacPass/MPAutotypeDaemon.m index 8f84b017..1305c477 100644 --- a/MacPass/MPAutotypeDaemon.m +++ b/MacPass/MPAutotypeDaemon.m @@ -393,6 +393,10 @@ static MPAutotypeDaemon *_sharedInstance; } } } + if(currentWindows.count > 0 && infoDict.count == 0) { + // show some information about not being able to determine any windows + NSLog(@"Unable to retrieve any window names. If you encounter this issue you might be running 10.15 and MacPass has no permission for screen recording."); + } return infoDict; } From b1cb776e1490abe63499c0c1fc0a2f5e2a52b6e3 Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Wed, 3 Jul 2019 17:28:58 +0200 Subject: [PATCH 2/3] Moved accessibilty permission checks into MPAutotypeDoctor. Added screen capture permission test. --- MacPass.xcodeproj/project.pbxproj | 6 + MacPass/Base.lproj/IntegrationPreferences.xib | 17 ++- MacPass/MPAppDelegate.m | 4 - MacPass/MPAutotypeDaemon.h | 4 - MacPass/MPAutotypeDaemon.m | 63 ++-------- MacPass/MPAutotypeDoctor.h | 31 +++++ MacPass/MPAutotypeDoctor.m | 114 ++++++++++++++++++ MacPass/MPIntegrationPreferencesController.m | 7 +- MacPass/MPUserNotificationCenterDelegate.m | 4 +- 9 files changed, 173 insertions(+), 77 deletions(-) create mode 100644 MacPass/MPAutotypeDoctor.h create mode 100644 MacPass/MPAutotypeDoctor.m diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index 37da5583..71a05d20 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -35,6 +35,7 @@ 4C17F109184E6B6C00E85625 /* 30_TerminalTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C17F107184E6B6C00E85625 /* 30_TerminalTemplate.pdf */; }; 4C1BDF2B1E4392640012A3F0 /* MPPluginDataViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1BDF291E4392640012A3F0 /* MPPluginDataViewController.m */; }; 4C1E9885185F71A800943563 /* MPContextBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1E9884185F71A800943563 /* MPContextBarViewController.m */; }; + 4C1ECAE322CCD30F00F46069 /* MPAutotypeDoctor.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1ECAE222CCD30F00F46069 /* MPAutotypeDoctor.m */; }; 4C1F7FA21E3A12E600D6A40E /* MPModifiedKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1F7FA11E3A12E600D6A40E /* MPModifiedKey.m */; }; 4C1FA07B18231900003A3F8C /* MPDocument+Autotype.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C1FA07A18231900003A3F8C /* MPDocument+Autotype.m */; }; 4C224B4217DFCB2400FF6AEE /* MPNumericalInputFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C224B4117DFCB2400FF6AEE /* MPNumericalInputFormatter.m */; }; @@ -394,6 +395,8 @@ 4C1D56382271F4BC00C3E594 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/PluginRepositoryBrowserView.strings; sourceTree = ""; }; 4C1E9883185F71A800943563 /* MPContextBarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPContextBarViewController.h; sourceTree = ""; }; 4C1E9884185F71A800943563 /* MPContextBarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPContextBarViewController.m; sourceTree = ""; }; + 4C1ECAE122CCD30F00F46069 /* MPAutotypeDoctor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPAutotypeDoctor.h; sourceTree = ""; }; + 4C1ECAE222CCD30F00F46069 /* MPAutotypeDoctor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPAutotypeDoctor.m; sourceTree = ""; }; 4C1F7FA01E3A12E600D6A40E /* MPModifiedKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPModifiedKey.h; sourceTree = ""; }; 4C1F7FA11E3A12E600D6A40E /* MPModifiedKey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPModifiedKey.m; sourceTree = ""; }; 4C1FA07A18231900003A3F8C /* MPDocument+Autotype.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPDocument+Autotype.m"; sourceTree = ""; }; @@ -1534,6 +1537,8 @@ 4C3499FF218852160055AF45 /* MPKeyTyper.m */, 4C1F7FA01E3A12E600D6A40E /* MPModifiedKey.h */, 4C1F7FA11E3A12E600D6A40E /* MPModifiedKey.m */, + 4C1ECAE122CCD30F00F46069 /* MPAutotypeDoctor.h */, + 4C1ECAE222CCD30F00F46069 /* MPAutotypeDoctor.m */, ); name = Autotype; sourceTree = ""; @@ -1990,6 +1995,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 4C1ECAE322CCD30F00F46069 /* MPAutotypeDoctor.m in Sources */, 4CD034AC1BFE113B003C002C /* MPPluginHost.m in Sources */, 4C77E37315B84A240093A587 /* main.m in Sources */, 4C0F04402147A6FA000B8568 /* MPCustomFieldTableView.m in Sources */, diff --git a/MacPass/Base.lproj/IntegrationPreferences.xib b/MacPass/Base.lproj/IntegrationPreferences.xib index da6c65ae..e3bfb500 100644 --- a/MacPass/Base.lproj/IntegrationPreferences.xib +++ b/MacPass/Base.lproj/IntegrationPreferences.xib @@ -26,29 +26,28 @@ - + - + - + - + - - + + - Autotype is not available, because MacPass is not allowed to control your computer. To enable Autotype, go to the Security and Privacy Preferences and add MacPass to the Accessibilty group. Changes require a restart of MacPass. + + + + + + + + + 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 @@ - +