Skip to content

2.9.1 — Swift Package Manager builds on macOS and iOS

Choose a tag to compare

@alessonqueirozdev-hub alessonqueirozdev-hub released this 06 Nov 20:28
· 154 commits to master since this release
2ee3287

One defect, reported by a user and caught by no test: an app depending
on this package could not be built with Swift Package Manager
, on macOS or
iOS. A CI job now builds such an app for both, so this cannot ship again
unnoticed. Every version since 2.2.0, which added the SwiftPM manifests, has
the defect, so anyone building for Apple platforms with SwiftPM should upgrade.

Fixed — Swift Package Manager

  • The package builds under Swift Package Manager. Both
    Package.swift files opened with a UTF-8 byte-order mark, so SwiftPM did not
    read the swift-tools-version line and assumed 3.1, which current Xcode
    rejects. Adding this package to a new macOS app stopped that app building
    (#58, reported by @axiopisty), and iOS shared the same manifest defect. The mark
    is gone from both manifests and both plugin sources, and .gitattributes keeps
    Swift files on LF.
  • CI now builds a real consumer. The SwiftPM consumer build job creates a
    new app, adds this package and builds it for macOS and the iOS simulator. Its
    first run, before the fix, reproduced the reported error.
    test/invariants/swift_package_manifest_test.dart pins the bytes on every
    platform.