Add tvOS platform support - #77
Open
om-mani-padme-hum wants to merge 1 commit into
Open
om-mani-padme-hum wants to merge 1 commit into
om-mani-padme-hum wants to merge 1 commit into
Conversation
- Add .tvOS(.v16) to Package.swift platforms - Add || os(tvOS) to all #if os(iOS) conditional compilation checks (Aliases, Renderer, Image+Extensions, ImageRenderer+Extensions, Font+Extensions, SVGGeometry) - Fix Font+Extensions: return .title1 instead of .largeTitle on tvOS (UIFont.TextStyle.largeTitle is unavailable on tvOS) tvOS uses UIKit like iOS, so all existing iOS code paths apply directly. All three dependencies already work on tvOS: - MathJaxSwift 3.4.0: uses JavaScriptCore (not WKWebView) - SVGView 1.0.6: needs .tvOS platform in its Package.swift (separate PR) - swift-html-entities 4.0.1: no platform restrictions Note: SVGView 1.0.6 does not declare tvOS in its Package.swift platforms. A companion PR to exyte/SVGView is needed to add .tvOS(.v16). Without it, SPM will still compile SVGView for tvOS but TapGesture usage may require the consuming app to set a tvOS deployment target >= 16.0.
2 tasks
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.
Summary
Adds tvOS platform support to LaTeXSwiftUI, based on the v1.3.2 release.
.tvOS(.v16)to Package.swift platforms|| os(tvOS)to all#if os(iOS)conditional compilation checks across 7 source files (Aliases, Renderer, Image+Extensions, ImageRenderer+Extensions, Font+Extensions, SVGGeometry).title1instead of.largeTitleon tvOS (UIFont.TextStyle.largeTitleis unavailable on tvOS)Rationale
tvOS uses UIKit, so all existing iOS code paths (UIImage, UIFont, UIColor, ImageRenderer) apply directly with no behavioral changes needed. The rendering pipeline (MathJax via JavaScriptCore → SVG → ImageRenderer) works on tvOS since it does not depend on WKWebView.
All three dependencies work on tvOS:
.tvOSadded to its Package.swift platforms separately)Note on SVGView
SVGView 1.0.6 does not declare tvOS in its Package.swift platforms. A companion PR to
exyte/SVGViewadding.tvOS(.v16)is recommended. Without it, SPM will still compile SVGView for tvOS butTapGestureusage requires the consuming app to set a tvOS deployment target ≥ 16.0.Test plan
🤖 Generated with Claude Code