Add flutter build ios-framework --swift-package flag to generate a Swift package manifest for the Flutter.xcframework to be consumed by the host app without the Flutter SDK installed, as an alternative to CocoaPods.
Would look something like:
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "Flutter",
platforms: [
.iOS(.v9)
],
products: [
.library(
name: "Flutter",
targets: ["Flutter"]),
],
targets: [
.binaryTarget(
name: "Flutter",
url: "https://storage.googleapis.com/flutter_infra_release/flutter/5d8bf811b3072390933d69f3e289a4bb673636c4/ios-release/artifacts.zip",
checksum: "746f02ffe75c030e98d028be45917da0bd04327eef6207e48e008ea5933861e9"
]
)
This requires that the Swift checksum be calculated for the iOS engine artifacts zip containing the XCFramework
https://developer.apple.com/documentation/swift_packages/distributing_binary_frameworks_as_swift_packages#3578966
Note swift package compute-checksum annoyingly requires a Package.swift file in the working directory, even if it's empty.
$ touch Package.swift
$ swift package compute-checksum artifacts.zip
746f02ffe75c030e98d028be45917da0bd04327eef6207e48e008ea5933861e9
This could be calculated as part of downloading the artifacts locally on the developer's machine before the zip is deleted, or it could be done on the engine publishing side.
Add
flutter build ios-framework --swift-packageflag to generate a Swift package manifest for the Flutter.xcframework to be consumed by the host app without the Flutter SDK installed, as an alternative to CocoaPods.Would look something like:
This requires that the Swift checksum be calculated for the iOS engine artifacts zip containing the XCFramework
https://developer.apple.com/documentation/swift_packages/distributing_binary_frameworks_as_swift_packages#3578966
Note
swift package compute-checksumannoyingly requires aPackage.swiftfile in the working directory, even if it's empty.This could be calculated as part of downloading the artifacts locally on the developer's machine before the zip is deleted, or it could be done on the engine publishing side.