Make TOCropOverlayView.h public so the grid overlay is visible to Swift - #653
Merged
Conversation
TOCropView.h declared `gridOverlayView` as a `TOCropOverlayView *` but only forward-declared that class. Swift omits any property whose class it knows solely as a forward declaration, so `cropView.gridOverlayView` did not exist from Swift in any configuration -- framework, CocoaPods or bridging header. That also put the `displayHorizontalGridLines` / `displayVerticalGridLines` settings fixed in 3.2.0 out of reach for Swift callers. Importing the header from TOCropView.h is the fix, but it only works if the header is reachable under the framework's own module: TOCropOverlayView.h was marked Project in both framework targets, so `<TOCropViewController/ TOCropOverlayView.h>` did not resolve and the Xcode 26 module verifier failed on the quoted fallback. It is now Public in both targets, alongside the other headers TOCropView.h already depends on, and imported with the same conditional form used for TOCropViewConstants.h. The test bundle's bridging header previously imported TOCropOverlayView.h directly to work around this. That workaround is removed, which makes the existing Swift test the regression guard: without the import in TOCropView.h, CropViewControllerTests.swift no longer compiles.
TimOliver
force-pushed
the
fix/public-overlay-header
branch
from
July 28, 2026 15:25
76a7d9c to
6d5c5df
Compare
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.
TOCropView.hdeclaresgridOverlayViewas aTOCropOverlayView *, but only forward-declares that class. Swift omits any property whose class it knows solely as a forward declaration, socropView.gridOverlayViewdid not exist from Swift in any configuration — framework, CocoaPods, or bridging header. That also put thedisplayHorizontalGridLines/displayVerticalGridLinessettings fixed in 3.2.0 out of reach for Swift callers.Why it needed the header to go public
Importing the header from
TOCropView.his the fix, but it only works if the header is reachable under the framework's own module.TOCropOverlayView.hwas markedProjectin both framework targets, so<TOCropViewController/TOCropOverlayView.h>didn't resolve and the Xcode 26 module verifier failed on the quoted fallback.It's now
Publicin both targets — alongside the other headersTOCropView.halready depends on — and imported using the same conditional form already used forTOCropViewConstants.h.Regression guard
The test bundle's bridging header had been importing
TOCropOverlayView.hdirectly to work around this. That workaround is removed, so the existing Swift test is now the guard: reverting the import inTOCropView.hmakesCropViewControllerTests.swiftfail to compile withVerification
TOCropOverlayView.halongside the other five public headerspod lib lintclang-formatcleanThe changelog entry is filed under 3.2.0, since that hasn't been tagged or pushed to trunk yet. Happy to move it to its own section if you'd rather ship 3.2.0 as-is.