Repository navigation
FeedbackKit: macOS support - #15
Merged
Merged
Conversation
The sheet, relay client and sign-in are shared. On macOS the key window (or a given one) is captured with cacheDisplay(in:to:), so no screen-recording permission, and the sheet opens in a window of its own. UIKit capture, screenshot trigger, touches and keyboard tracking stay behind os(iOS). meta.platform is macOS and meta.device is hw.model. Refs arfct/alchemy#199 Co-Authored-By: Geist <agent@artifact.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FeedbackKit gains macOS: the same sheet, relay client and sign-in, with AppKit capture and a window of its own.
Refs arfct/alchemy#199
Changes
bitmapImageRepForCachingDisplay(in:)andcacheDisplay(in:to:), so no screen-recording permission.Feedback.present()takes the key window, else the main window, else the frontmost visible one;Feedback.present(capturing:)takes a given window (for a menu-bar panel that isn't key).Feedback.windowIdentifier.UI/Platform.swiftholds the few UIKit/AppKit differences (image type, insets, colours). UIKit capture, the screenshot trigger, touch handling and keyboard tracking stay behind#if os(iOS);CanvasToucheshas aDragGestureversion for the Mac.meta.platformismacOSthere andmeta.deviceishw.model(e.g.Mac16,10) rather thanarm64. New test:readsTheMacsModelNotItsArchitecture.Feedback.triggersdoes nothing on macOS (the system doesn't tell apps about screenshots).Package.swiftfiles: comments only (macOS 26 was already declared); they stay in step.apple/README.md: an "On macOS" section, API table rows, meta.Verified
swift testinapple/FeedbackKit: 48 tests in 15 suites pass.xcodebuild -scheme FeedbackKitforgeneric/platform=iOSandgeneric/platform=macOS: both succeed. FeedbackDemo builds for the iOS simulator.feedback-macos, this branch's sources copied into Quicksilver for Mac): the Debug build opened the sheet over the panel and over Settings; I looked at both window captures. The sheet shows the screenshot, the tools and Send, and the Settings capture is sharp and legible. Quicksilver and Quicksilver Pro build in Debug and Release.Not verified
cacheDisplay(in:to:)doesn't draw Liquid Glass, vibrancy, Metal or video. A glass panel comes out as a blurred grey shape, and transparent parts of a borderless window come out transparent (black on the sheet).#if os(iOS), not changed.After merge
apple/FeedbackKitinto arfct/alchemy again and point its README at the merge commit (alchemy'sfeedback-macoscurrently points at this branch's commit).