Closed pixlwave closed 2 months ago
Hi @pixlwave, something in Xcode/iOS must have changed this, but I don't think it's really a bug per se with the library. For these kinds of open ended questions I think discussions are better, so I am going to move this over to the discussions tab of the repo. Perhaps someone can help you figure it out over there!
Describe the bug Hi, I'm attempting to update our project from Xcode 15.2 to Xcode 15.4 and have hit a weird bug in our snapshot tests:
We have a custom SwiftUI text view that wraps a
UITextView
that's using the old TextKit 1 layout engine for various custom layout needs. With Xcode 15.4, when the height of this view exceeds a certain threshold (~5 lines of body text), then the text is no longer visible in any snapshots. All of our snapshots are generated from Xcode Previews which don't exhibit this behaviour so it appears to only be an issue with the snapshotting.Allowing the text view to use TextKit 2 by initialising with
usingTextLayoutManager: true
fixes the snapshots but sadly isn't a viable option for us at this time.To Reproduce A minimal reproduction case looks like so:
Expected behavior The snapshots should continue to render as they do when generated by Xcode 15.2.
Environment
Additional context Sample Xcode project: TextKitSnapshots.zip