From 66c4f1ea2d8dca35fbe09ee7a53aae9e36ce2454 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Chauhan Date: Tue, 25 Aug 2026 17:31:25 +0530 Subject: [PATCH] fix(attachment_engine): put swift-tools-version as the literal first line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Swift Package Manager requires '// swift-tools-version:' to be the first line of the manifest — putting the license header above it makes SPM treat the tools-version as unspecified, which Xcode then rejects: Could not resolve package dependencies: the manifest is backward-incompatible with Swift < 6.0 because the tools-version was specified in a subsequent line of the manifest, not the first line. This blocked flutter run/build on iOS and macOS for any real consumer app (surfaced by a teammate evaluating attachment_engine from cloudemy_student). Swapped the order in both Package.swift files: swift-tools-version (+ its comment) first, then the copyright header, then import PackageDescription. Verified: 'swift package dump-package' now succeeds (exit 0) for both attachment_engine_ios and attachment_engine_macos, and license-check still passes (it checks for header presence, not position). --- .../ios/attachment_engine_ios/Package.swift | 6 +++--- .../macos/attachment_engine_macos/Package.swift | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/attachment_engine/attachment_engine_ios/ios/attachment_engine_ios/Package.swift b/packages/attachment_engine/attachment_engine_ios/ios/attachment_engine_ios/Package.swift index 67f846a..153425b 100644 --- a/packages/attachment_engine/attachment_engine_ios/ios/attachment_engine_ios/Package.swift +++ b/packages/attachment_engine/attachment_engine_ios/ios/attachment_engine_ios/Package.swift @@ -1,10 +1,10 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + // Copyright 2026 DHC Tech // Use of this source code is governed by an MIT-style license that can be // found in the LICENSE file. -// swift-tools-version: 5.9 -// The swift-tools-version declares the minimum version of Swift required to build this package. - import PackageDescription let package = Package( diff --git a/packages/attachment_engine/attachment_engine_macos/macos/attachment_engine_macos/Package.swift b/packages/attachment_engine/attachment_engine_macos/macos/attachment_engine_macos/Package.swift index 583125c..6d350b2 100644 --- a/packages/attachment_engine/attachment_engine_macos/macos/attachment_engine_macos/Package.swift +++ b/packages/attachment_engine/attachment_engine_macos/macos/attachment_engine_macos/Package.swift @@ -1,10 +1,10 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + // Copyright 2026 DHC Tech // Use of this source code is governed by an MIT-style license that can be // found in the LICENSE file. -// swift-tools-version: 5.9 -// The swift-tools-version declares the minimum version of Swift required to build this package. - import PackageDescription let package = Package(