Skip to content

Modernise STTouchDisplay - #4

Merged
cysp merged 7 commits into
masterfrom
ci/modernize-ios15
Sep 23, 2026
Merged

cysp merged 7 commits into
masterfrom
ci/modernize-ios15

Conversation

@cysp

@cysp cysp commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Make the existing Objective-C static library maintainable on iOS 15 and current Xcode without changing its distribution model. This PR contains seven reviewable commits:

  1. Raise the deployment target to iOS 15, export the public view header, and handle newer non-touch event types. This commit credits Ishani Madaan, author of Set minimum os deployment target to 15.0 #3, as co-author.
  2. Establish clang-format and mechanically format the hand-written Objective-C sources. The embedded PNG byte array is excluded.
  3. Limit touch markers to the display view's own window and clear them when the view moves between windows.
  4. Add hostless unit tests to the root library project. They link the built static library and import its exported public header.
  5. Add MIT licensing and public library documentation.
  6. Run formatting, a Release build, simulator unit tests, and static analysis locally and on Xcode 26 CI with checked-in scripts.
  7. Clear fading touch markers when the display view moves between windows, with a regression test that preserves caller-owned subviews.

Scope

The optional legacy HID geometry remains in this PR. #5 replaces it with public UIKit touch data. #6 adds the separate demo, workspace, and UI tests. Swift Package Manager remains deferred.

STTouchDisplay.h already imported STTouchDisplayView.h, but the old target copied only the umbrella header into its built product. Exporting the view header makes that public import usable by a consumer without adding the source directory to Header Search Paths.

Validation

  • Local Xcode 27: the window-move regression test failed before the fix and passed afterward; the checked-in scripts passed formatting, a Release build, all five hostless simulator unit tests, and static analysis.
  • Xcode 26.6 CI passed formatting, the Release simulator build, five Debug simulator unit tests, and static analysis on the current PR head.
  • Simulator tests cover window/lifecycle behavior; they do not establish physical finger-contact geometry or operation on an iOS 15 device.

Supersedes #3. Its iOS 15 deployment target change is included here.

@cysp

cysp commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner Author

Adversarial review of origin/master...c01e5b9

Standards and maintainability

  • Checked the library project diff separately: it only raises the iOS minimum, exports the public view header, and removes obsolete absolute/private-HID search paths. The demo, unit tests, and UI test are in a separate project, and the root workspace includes both projects.
  • The header export repairs a pre-existing product defect: STTouchDisplay.h has always imported STTouchDisplayView.h, but the old Copy Files phase shipped only the former. The demo intentionally consumes the built archive and installed headers, so adding the latter to that phase is required for a self-contained public product. No Objective-C API declaration was added.
  • The new demo project file is relatively large and hand-authored. It declares Xcode 14 project compatibility alongside Xcode 26 creation metadata. Xcode opens, builds, tests, and analyzes it, but future GUI edits may reserialize it and create a noisy diff. This is a maintainability risk, not a demonstrated build defect.
  • The Objective-C formatter covers hand-written headers and implementations, with the pre-existing generated PNG array excluded. Review found two stale Swift-package ignore rules and a removed historical ignore rule; both were corrected in c01e5b9.

Requirements and behavior

  • Verified that the demo references and links the actual library archive from the original project, and imports its exported public headers from the built product. No library source is compiled a second time and CI copies no project files.
  • The overlay queries touchesForWindow:self.window, ignores events from other windows without clearing its own markers, and clears markers when moved to another window. This scopes display to the window and therefore its scene.
  • Unit tests cover approximate radius, movement and ending, other-window events, and window transfer. The UI test sends a real simulator tap through the demo window, observes that a marker was shown and cleared, and confirms that the underlying button still receives the tap. Its marker observation is through the demo's status labels rather than a direct snapshot of the view hierarchy.

Validation boundary

  • Local Xcode 27: Release library build, separate demo build, workspace test suite (four unit tests and one UI test), static analysis of both schemes, formatting, and project/workspace syntax checks passed.
  • CI runs the checked-in workspace under Xcode 26. The library and demo target iOS 15, while the test bundles target iOS 17. No iOS 15 runtime or physical contact-radius behavior is exercised; simulator-only validation was the agreed release gate.
  • The first Xcode 26 CI attempt passed formatting, the Release library build, and static analysis, but its UI test failed after a long simulator run. The quiet log names the test without an assertion detail. A same-commit rerun passed all three jobs, including simulator tests; the local Xcode 27 suite also passed again (5/5). The initial failure's root cause remains unknown. If it repeats, capture an .xcresult summary rather than adding blind retry logic.

No actionable standards or behavior finding remains after the ignore-rule correction. The unexplained initial UI-test failure and potential reserialization churn in the checked-in demo project file are the remaining validation and maintenance risks.

Final Xcode 26 validation: https://github.com/cysp/STTouchDisplay/actions/runs/35862435831/attempts/2

@cysp
cysp marked this pull request as ready for review September 23, 2026 09:33
@cysp
cysp force-pushed the ci/modernize-ios15 branch 2 times, most recently from c01e5b9 to 4e27950 Compare September 23, 2026 13:51
@cysp cysp changed the title Modernize STTouchDisplay for iOS 15 with Xcode 26 CI Maintain STTouchDisplay as an iOS 15 library Sep 23, 2026
@cysp
cysp force-pushed the ci/modernize-ios15 branch from 4e27950 to 719d32a Compare September 23, 2026 13:54
cysp and others added 5 commits September 24, 2026 00:39
Bring the existing project up to the iOS 15 deployment target, ship both public headers from the static-library product, and ignore newer non-touch UIEvent types so the library builds with current Xcode warnings enabled.

Co-authored-by: Ishani Madaan <imadaan@scentregroup.com>
Establish one clang-format style for hand-written Objective-C before changing touch behavior. Leave the generated PNG byte array untouched.
Ignore events from other windows, initialize both view construction paths, and clear markers when the display changes windows.
Run lifecycle and window-scoping tests against the built static library and its exported public header, without introducing a demo app or test host.
Publish the MIT license, identify it in source headers, and document the static-library integration and window-scoped overlay.
@cysp
cysp force-pushed the ci/modernize-ios15 branch from 719d32a to cd7cfed Compare September 23, 2026 14:40
@cysp cysp changed the title Maintain STTouchDisplay as an iOS 15 library Modernise STTouchDisplay Sep 23, 2026
@cysp
cysp force-pushed the ci/modernize-ios15 branch 2 times, most recently from 07bd001 to 8fa252f Compare September 23, 2026 22:03
Use the checked-in library project directly on a macOS 26 runner, pin checkout, and keep workflow dependencies current with Dependabot.
Keep ending markers tracked through their removal animation so a window change clears them along with active markers. Cover an immediate move after touch end while preserving caller-owned subviews.
@cysp
cysp force-pushed the ci/modernize-ios15 branch from 8fa252f to 36e7ee6 Compare September 23, 2026 22:36
@cysp
cysp merged commit fc3d2af into master Sep 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant