From 946442d56d4a441e391b624ef0149fb030540d23 Mon Sep 17 00:00:00 2001 From: John Holdsworth Date: Sat, 2 May 2020 12:13:46 +0200 Subject: [PATCH] Port video capture to AVFoundation (#222) Minor changes, to non-core feature. --- InjectionIII/AppDelegate.swift | 8 ++++- InjectionIII/Base.lproj/MainMenu.xib | 50 ++++++++++++++++++---------- InjectionIII/Info.plist | 2 +- README.md | 9 ++--- Remote | 2 +- 5 files changed, 46 insertions(+), 25 deletions(-) diff --git a/InjectionIII/AppDelegate.swift b/InjectionIII/AppDelegate.swift index 41fe2623..235bdab0 100644 --- a/InjectionIII/AppDelegate.swift +++ b/InjectionIII/AppDelegate.swift @@ -24,6 +24,7 @@ class AppDelegate : NSObject, NSApplicationDelegate { @IBOutlet weak var enabledTDDItem: NSMenuItem! @IBOutlet weak var enableVaccineItem: NSMenuItem! @IBOutlet weak var windowItem: NSMenuItem! + @IBOutlet weak var remoteItem: NSMenuItem! @IBOutlet weak var frontItem: NSMenuItem! @IBOutlet var statusItem: NSStatusItem! @@ -189,7 +190,12 @@ class AppDelegate : NSObject, NSApplicationDelegate { @IBAction func startRemote(_ sender: NSMenuItem) { RMWindowController.startServer(sender) - sender.state = .on + remoteItem.state = .on + } + + @IBAction func stopRemote(_ sender: NSMenuItem) { + RMWindowController.stopServer() + remoteItem.state = .off } @IBAction func traceApp(_ sender: NSMenuItem) { diff --git a/InjectionIII/Base.lproj/MainMenu.xib b/InjectionIII/Base.lproj/MainMenu.xib index 3182569d..2781cae3 100644 --- a/InjectionIII/Base.lproj/MainMenu.xib +++ b/InjectionIII/Base.lproj/MainMenu.xib @@ -19,6 +19,7 @@ + @@ -737,34 +738,47 @@ - + - - - - - - - - + - + + + - + - + - + - - + - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/InjectionIII/Info.plist b/InjectionIII/Info.plist index 86f61a4e..7f5f9a71 100644 --- a/InjectionIII/Info.plist +++ b/InjectionIII/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 2643 + 2670 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/README.md b/README.md index dea1c8b0..f6683b0a 100644 --- a/README.md +++ b/README.md @@ -130,12 +130,13 @@ onto if they are running InjectionIII.) You can also use a machine's hostname RemoteCapture.start("192.168.1.14") #endif ``` -When InjectionIII is running, select the "Remote" menu item to start the server -and then run your app. It should connect to the server which will pop up a +When InjectionIII is running, select the "Remote/Start Server" menu item to start the +server and then run your app. It should connect to the server which will pop up a window showing the device display and accepting tap events. Events can be saved as `macros` and replayed. If you include a snapshot in a macro this will -be compared against the device display (within a tolerance) when your replay -the macro for automated testing. +be compared against the device display (within an editable tolerance) when your +replay the macro for automated testing. As it operates over the network, `Remote` +isn't fast enough to capture animationed transitions. ## SwiftEval - Yes, it's eval() for Swift diff --git a/Remote b/Remote index bbe7c2fc..78f0e4a0 160000 --- a/Remote +++ b/Remote @@ -1 +1 @@ -Subproject commit bbe7c2fc34259ba87fd6ee3c97c3b4f791471e8e +Subproject commit 78f0e4a03b29bc8f61da5cd2693a65b57ea95367