From ef5392088d4aeb255c4eee83157dbdafcd31bf07 Mon Sep 17 00:00:00 2001 From: Sash Zats Date: Thu, 23 Apr 2026 21:34:24 -0400 Subject: [PATCH] Fix SwiftPM resource packaging This package started failing to build on Xcode 26.5 / Swift 6.3 when used as a normal SwiftPM dependency. The first failure was that Sources/Vortex/Resources/Assets.xcassets was not declared as a SwiftPM resource, so SwiftPM treated it as an unhandled file and never generated Bundle.module. That made DefaultSymbols.swift fail to compile with "type Bundle has no member module". After fixing resource packaging, the build also hit a Swift 6.3 inference failure in VortexView.swift where .blendMode(.plusLighter) no longer resolved cleanly. Qualifying it as BlendMode.plusLighter keeps the package building on current Apple toolchains. Together these changes make Vortex usable as a normal SwiftPM dependency in apps building with newer Xcode releases. --- Package.swift | 5 ++++- Sources/Vortex/Views/VortexView.swift | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Package.swift b/Package.swift index 875647b..a2720ba 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,10 @@ let package = Package( // Targets are the basic building blocks of a package, defining a module or a test suite. // Targets can depend on other targets in this package and products from dependencies. .target( - name: "Vortex"), + name: "Vortex", + resources: [ + .process("Resources/Assets.xcassets"), + ]), .testTarget( name: "VortexTests", dependencies: ["Vortex"]) diff --git a/Sources/Vortex/Views/VortexView.swift b/Sources/Vortex/Views/VortexView.swift index 8294e90..50532ff 100644 --- a/Sources/Vortex/Views/VortexView.swift +++ b/Sources/Vortex/Views/VortexView.swift @@ -43,11 +43,11 @@ public struct VortexView: View where Symbols: View { @ViewBuilder symbols: () -> Symbols = { Group { Image.circle - .frame(width: 16).blendMode(.plusLighter).tag("circle") + .frame(width: 16).blendMode(BlendMode.plusLighter).tag("circle") Image.confetti - .frame(width: 16, height: 16).blendMode(.plusLighter).tag("confetti") + .frame(width: 16, height: 16).blendMode(BlendMode.plusLighter).tag("confetti") Image.sparkle - .frame(width: 16, height: 16).blendMode(.plusLighter).tag("sparkle") + .frame(width: 16, height: 16).blendMode(BlendMode.plusLighter).tag("sparkle") } } ) {