Feature/production safety#62
Open
NullIsOne wants to merge 3 commits into
Open
Conversation
NullIsOne
force-pushed
the
feature/production-safety
branch
from
September 5, 2024 08:39
c841460 to
63d20d1
Compare
hekuli
added a commit
to hekulis-org/ShowTime
that referenced
this pull request
Apr 11, 2026
1. Default state is now .never -- zero swizzling occurs until explicitly enabled 2. Zero performance impact when disabled -- swizzle only activates on didSet of enabled, and fully unswizzles when disabled. Removed the UIWindow.layer override that ran on every layout cycle (the root cause of 24% CPU from upstream issue KaneCheshire#54) 3. _UIReparentingView warning fixed -- replaced TouchView: UIView (added via addSubview) with TouchIndicatorLayer: CAShapeLayer (added via addSublayer). Layers don't participate in UIView hierarchy, so no SwiftUI hosting conflict 4. Upstream PR KaneCheshire#62 changes incorporated -- CGSize -> CGFloat for size, default .never, swizzle/unswizzle support. Improved on PR KaneCheshire#62's approach by using didSet instead of the layer override 5. Swift 6 strict concurrency -- removed swiftLanguageModes: [.v5], added @mainactor isolation on touch handling methods, nonisolated(unsafe) on static stored properties, Sendable enums 6. Dead code removed -- all commented-out text/label code, shouldShowMultipleTapCount, shouldShowForce, UIColor.auto sentinel, Animation.custom, iOS 9 availability checks, UITouch.normalizedForce
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.
What changed?
Linked issues
#54
Motivation
Inspired by todos.
Notes
First of all
struct Swizzledwas in wrong scope. It tried to swizzle any time whenUIWindow.layerwas touched.Also I've added
unswizzleas mirrored operation triggered only correctSwizzled.once == trueto completely disable it. It's important in production.Logs are temporary.