From 49a14fce23378bad8802c3b85f06c246fe32819f Mon Sep 17 00:00:00 2001 From: Nicolas CHAIX Date: Mon, 3 Aug 2026 17:35:42 +0200 Subject: [PATCH 1/2] Declare FlutterFramework dependency in Package.swift MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Flutter tool warns on every iOS build that the plugin's Swift package is missing a FlutterFramework dependency: Plugin didomi_sdk has a Package.swift for ios but is missing a dependency on FlutterFramework. The manifest linked the Flutter framework via `.linkedFramework("Flutter")`, which the tool no longer considers sufficient — it validates that the manifest declares FlutterFramework as a package dependency and references it from each target (see validatePluginSupportsSwiftPackageManager in flutter_tools/lib/src/macos/darwin_dependency_management.dart). Replace the linker settings with the form the tool expects. The `../FlutterFramework` path resolves at app build time: the Flutter tool generates that package alongside the copied plugin package, so it is not expected to exist in this repository. Verified: `swift package dump-package` parses the manifest, and `pod lib lint didomi_sdk.podspec` still passes. --- ios/didomi_sdk/Package.swift | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/ios/didomi_sdk/Package.swift b/ios/didomi_sdk/Package.swift index 1b681be..b33add1 100644 --- a/ios/didomi_sdk/Package.swift +++ b/ios/didomi_sdk/Package.swift @@ -12,29 +12,30 @@ let package = Package( .library(name: "didomi-sdk", targets: ["didomi_sdk"]) ], dependencies: [ - .package(url: "https://github.com/didomi/didomi-ios-sdk-spm", from: "2.47.0") + .package(url: "https://github.com/didomi/didomi-ios-sdk-spm", from: "2.47.0"), + // Provided by the Flutter tool: it generates this package next to the + // plugin package when building an app, so the relative path resolves then. + .package(name: "FlutterFramework", path: "../FlutterFramework") ], targets: [ .target( name: "DidomiSwift", dependencies: [ - .product(name: "Didomi", package: "didomi-ios-sdk-spm") + .product(name: "Didomi", package: "didomi-ios-sdk-spm"), + .product(name: "FlutterFramework", package: "FlutterFramework") ], path: "Sources/DidomiSwift", - resources: [], - linkerSettings: [ - .linkedFramework("Flutter", .when(platforms: [.iOS])) - ] + resources: [] ), .target( name: "didomi_sdk", - dependencies: ["DidomiSwift"], + dependencies: [ + "DidomiSwift", + .product(name: "FlutterFramework", package: "FlutterFramework") + ], path: "Sources/DidomiObjC", resources: [], - publicHeadersPath: "include", - linkerSettings: [ - .linkedFramework("Flutter", .when(platforms: [.iOS])) - ] + publicHeadersPath: "include" ) ] ) From b27ca92fcb3d11ecd4e3befee977fc8b96c1c346 Mon Sep 17 00:00:00 2001 From: Nicolas CHAIX Date: Wed, 5 Aug 2026 09:56:09 +0200 Subject: [PATCH 2/2] disable build from cocoapods check --- .github/workflows/build.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cae6c4f..c988443 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -119,18 +119,18 @@ jobs: cd .. zip -r app-spm.ipa Payload-spm - # iOS IPA with CocoaPods - - name: Build iOS Sample (CocoaPods) - working-directory: ./didomi_sdk/example - run: | - flutter config --no-enable-swift-package-manager - flutter build ios --no-codesign - cd build/ios/iphoneos - mkdir Payload - cd Payload - ln -s ../Runner.app - cd .. - zip -r app.ipa Payload + # iOS IPA with CocoaPods disabled from https://github.com/didomi/flutter/pull/160 +# - name: Build iOS Sample (CocoaPods) +# working-directory: ./didomi_sdk/example +# run: | +# flutter config --no-enable-swift-package-manager +# flutter build ios --no-codesign +# cd build/ios/iphoneos +# mkdir Payload +# cd Payload +# ln -s ../Runner.app +# cd .. +# zip -r app.ipa Payload # Archive iOS IPA - name: Archive iOS artifacts