Repository navigation
What's Changed
- Toolchain: Require Swift 6.4 (Xcode 27) and swift-syntax 604 in 6d7e50e
- Changed: Raise the minimum deployment targets to iOS 15, Mac Catalyst 15, macOS 12, tvOS 15 and watchOS 8 (visionOS stays at 1) in 5febb34
- Changed: String literals in text builders are localized like
Text("…"), so Markdown in them is rendered. String values stay verbatim. UseText(verbatim:)to keep a literal as written, in d9862b3// Before: rendered as written "**Hello**" // After: localized, with Markdown rendered. To keep it as written: Text(verbatim: "**Hello**")
- Changed: Localized literals are looked up in the caller's bundle (
#bundle), in 5febb34. In a Swift package target without resources this fails to compile with "No resource bundle is available for this module". Pass the bundle that holds your strings, ornilfor the main bundle:@TextBuilder(separator: " ", bundle: nil) var greeting: Text { "Hello" }
- Changed:
Text(separator:default:bundle:content:)takes a@TextSegmentBuilderclosure instead of@ArrayBuilder<Text>, and swift-builders is no longer a dependency, in 5febb34// Before @ArrayBuilder<Text> func parts() -> [Text] { … } // After @TextSegmentBuilder func parts() -> [TextSegment] { … }
- Removed:
StringProtocol.text. UseText(verbatim:)instead, in e3e63a1 - Added:
bundle:parameter on@TextBuilderandText(separator:default:bundle:content:)in 5febb34 - Added:
AttributedString,LocalizedStringResource(iOS 16+) andImagevalues in text builders in 36c32e7 - Added:
@TextSegmentBuilderhelpers can be nested in other builders in c59721a - Fixed:
Text(separator: "…", default:)now usesdefaultin 5febb34 - Fixed:
TextorSwiftUIdeclarations in the caller's scope no longer break the macro expansion in fd94da2 - Infra: CI runs on Swift 6.4 only, and the swift-syntax compatibility job is removed, in 6d7e50e
Full Changelog: 4.3.0...5.0.0