With Xcode 16 / Swift 6.0, it's possible to build iOS libraries using SwiftPM / swift-build:
$ swift build --triple arm64-apple-ios --sdk "$(xcrun -sdk iphoneos -show-sdk-path)"
However, there's a small discrepancy (arguably an underspecification) between the XCBuild and SwiftPM build systems: XCBuild appears to process xcassets files automatically whereas SwiftPM requires explicitly declaring them as resources. This causes the build to fail.
$ swift build --triple arm64-apple-ios --sdk "$(xcrun -sdk iphoneos -show-sdk-path)"
warning: 'pow': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
[...]/Pow/Sources/Pow/Assets.xcassets
Building for debugging...
[...]/Pow/Sources/Pow/Effects/SmokeEffect.swift:61:63: error: type 'Bundle?' has no member 'module'
This PR makes a one line fix that allows Pow to build with XCBuild as well as SwiftPM.
With Xcode 16 / Swift 6.0, it's possible to build iOS libraries using SwiftPM /
swift-build
:However, there's a small discrepancy (arguably an underspecification) between the XCBuild and SwiftPM build systems: XCBuild appears to process
xcassets
files automatically whereas SwiftPM requires explicitly declaring them as resources. This causes the build to fail.This PR makes a one line fix that allows Pow to build with XCBuild as well as SwiftPM.