Repository navigation
Swift Package Manager integration FAILED! #186054
Description
Steps to reproduce
flutter upgrade
flutter config --enable-swift-package-manager
flutter run
Actual results
Launching lib/main.dart on iPhone (wireless) in debug mode...
Wireless debugging on iOS 26 may be slower than expected. For better performance, consider using a wired (USB) connection.
Adding Swift Package Manager integration... 1219.9s
Error: An error occurred when adding Swift Package Manager integration:
Error: Unable to get Xcode project information:
2026-05-05 16:59:34.139 xcodebuild[83218:1391991] Writing error result bundle to
/var/folders/dm/xz9zz70s0_zgdn8r94pmrrx80000gn/T/ResultBundle_2026-05-05_16-59-0034.xcresult
xcodebuild: error: Could not resolve package dependencies:
failed downloading 'https://dl.google.com/firebase/ios/swiftpm/12.12.1/GoogleAppMeasurementIdentitySupport.zip' which is required by binary target
'GoogleAppMeasurementIdentitySupport':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___dl_google_com_firebase_ios_swiftpm_12_12_1_GoogleAppMeasurementIdentitySupport_zip
already exists in file system
failed downloading 'https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.5.0/OneSignalNotifications.xcframework.zip' which is required by
binary target 'OneSignalNotifications':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_OneSignal_OneSignal_iOS_SDK_releases_download_5_5_0_OneSignalNotifications
_xcframework_zip already exists in file system
failed downloading 'https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.5.0/OneSignalLocation.xcframework.zip' which is required by binary
target 'OneSignalLocation':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_OneSignal_OneSignal_iOS_SDK_releases_download_5_5_0_OneSignalLocation_xcfr
amework_zip already exists in file system
failed downloading 'https://dl.google.com/firebase/ios/swiftpm/12.12.1/FirebaseAnalytics.zip' which is required by binary target 'FirebaseAnalytics':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___dl_google_com_firebase_ios_swiftpm_12_12_1_FirebaseAnalytics_zip already exists in
file system
failed downloading 'https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.5.0/OneSignalExtension.xcframework.zip' which is required by binary
target 'OneSignalExtension':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_OneSignal_OneSignal_iOS_SDK_releases_download_5_5_0_OneSignalExtension_xcf
ramework_zip already exists in file system
failed downloading 'https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.5.0/OneSignalUser.xcframework.zip' which is required by binary target
'OneSignalUser':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_OneSignal_OneSignal_iOS_SDK_releases_download_5_5_0_OneSignalUser_xcframew
ork_zip already exists in file system
failed downloading 'https://dl.google.com/firebase/ios/appads/3.5.0/GoogleAdsOnDeviceConversion.zip' which is required by binary target
'GoogleAdsOnDeviceConversion':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___dl_google_com_firebase_ios_appads_3_5_0_GoogleAdsOnDeviceConversion_zip already
exists in file system
failed downloading 'https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.5.0/OneSignalOutcomes.xcframework.zip' which is required by binary
target 'OneSignalOutcomes':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_OneSignal_OneSignal_iOS_SDK_releases_download_5_5_0_OneSignalOutcomes_xcfr
amework_zip already exists in file system
failed downloading 'https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.5.0/OneSignalFramework.xcframework.zip' which is required by binary
target 'OneSignalFramework':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_OneSignal_OneSignal_iOS_SDK_releases_download_5_5_0_OneSignalFramework_xcf
ramework_zip already exists in file system
failed downloading 'https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.5.0/OneSignalOSCore.xcframework.zip' which is required by binary
target 'OneSignalOSCore':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_OneSignal_OneSignal_iOS_SDK_releases_download_5_5_0_OneSignalOSCore_xcfram
ework_zip already exists in file system
failed downloading 'https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.5.0/OneSignalCore.xcframework.zip' which is required by binary target
'OneSignalCore':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_OneSignal_OneSignal_iOS_SDK_releases_download_5_5_0_OneSignalCore_xcframew
ork_zip already exists in file system
failed downloading 'https://dl.google.com/firebase/ios/bin/abseil/1.2024072200.0/rc0/absl.zip' which is required by binary target 'absl':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___dl_google_com_firebase_ios_bin_abseil_1_2024072200_0_rc0_absl_zip already exists in
file system
failed downloading 'https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.5.0/OneSignalInAppMessages.xcframework.zip' which is required by
binary target 'OneSignalInAppMessages':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_OneSignal_OneSignal_iOS_SDK_releases_download_5_5_0_OneSignalInAppMessages
_xcframework_zip already exists in file system
failed downloading 'https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.5.0/OneSignalLiveActivities.xcframework.zip' which is required by
binary target 'OneSignalLiveActivities':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_OneSignal_OneSignal_iOS_SDK_releases_download_5_5_0_OneSignalLiveActivitie
s_xcframework_zip already exists in file system
failed downloading 'https://dl.google.com/firebase/ios/swiftpm/12.12.1/GoogleAppMeasurement.zip' which is required by binary target 'GoogleAppMeasurement':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___dl_google_com_firebase_ios_swiftpm_12_12_1_GoogleAppMeasurement_zip already exists in
file system
failed downloading 'https://dl.google.com/firebase/ios/bin/grpc/1.69.1/rc0/openssl_grpc.zip' which is required by binary target 'openssl_grpc':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___dl_google_com_firebase_ios_bin_grpc_1_69_1_rc0_openssl_grpc_zip already exists in
file system
failed downloading 'https://dl.google.com/firebase/ios/bin/grpc/1.69.1/rc0/grpcpp.zip' which is required by binary target 'grpcpp':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___dl_google_com_firebase_ios_bin_grpc_1_69_1_rc0_grpcpp_zip already exists in file
system
failed downloading 'https://dl.google.com/firebase/ios/bin/firestore/12.12.0/rc2/FirebaseFirestoreInternal.zip' which is required by binary target
'FirebaseFirestoreInternal':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___dl_google_com_firebase_ios_bin_firestore_12_12_0_rc2_FirebaseFirestoreInternal_zip
already exists in file system
failed downloading 'https://dl.google.com/firebase/ios/bin/grpc/1.69.1/rc0/grpc.zip' which is required by binary target 'grpc':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___dl_google_com_firebase_ios_bin_grpc_1_69_1_rc0_grpc_zip already exists in file system
failed downloading 'https://github.com/getsentry/sentry-cocoa/releases/download/8.58.1/Sentry.xcframework.zip' which is required by binary target 'Sentry':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_getsentry_sentry_cocoa_releases_download_8_58_1_Sentry_xcframework_zip
already exists in file system
failed downloading 'https://github.com/getsentry/sentry-cocoa/releases/download/8.58.1/Sentry-WithoutUIKitOrAppKit.xcframework.zip' which is required by
binary target 'Sentry-WithoutUIKitOrAppKit':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_getsentry_sentry_cocoa_releases_download_8_58_1_Sentry_WithoutUIKitOrAppKi
t_xcframework_zip already exists in file system
failed downloading 'https://github.com/getsentry/sentry-cocoa/releases/download/8.58.1/Sentry-Dynamic.xcframework.zip' which is required by binary target
'Sentry-Dynamic':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_getsentry_sentry_cocoa_releases_download_8_58_1_Sentry_Dynamic_xcframework
zip already exists in file system
failed downloading 'https://github.com/getsentry/sentry-cocoa/releases/download/8.58.1/Sentry-Dynamic-WithARM64e.xcframework.zip' which is required by binary
target 'Sentry-Dynamic-WithARM64e':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_getsentry_sentry_cocoa_releases_download_8_58_1_Sentry_Dynamic_WithARM64e
xcframework_zip already exists in file system
failed downloading 'https://github.com/getsentry/sentry-cocoa/releases/download/8.58.1/Sentry-WithoutUIKitOrAppKit-WithARM64e.xcframework.zip' which is
required by binary target 'Sentry-WithoutUIKitOrAppKit-WithARM64e':
/Users/priyankarawat/Library/Caches/org.swift.swiftpm/artifacts/https___github_com_getsentry_sentry_cocoa_releases_download_8_58_1_Sentry_WithoutUIKitOrAppKi
t_WithARM64e_xcframework_zip already exists in file system
fatalError
Swift Package Manager is currently an experimental feature, please file a bug at
https://github.com/flutter/flutter/issues/new?template=01_activation.yml
Consider including a copy of the following files in your bug report:
ios/Runner.xcodeproj/project.pbxproj
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (or the scheme for the flavor used)
To add Swift Package Manager integration manually, please use the following instructions:
https://docs.flutter.dev/to/add-swift-package-manager-manually
Alternatively, to avoid this failure, disable Flutter Swift Package Manager integration for the project
by adding the following in the project's pubspec.yaml under the "flutter" section:
config:
enable-swift-package-manager: false
Or disable Flutter Swift Package Manager integration globally with the
following command:
"flutter config --no-enable-swift-package-manager"
Logs
Logs
<!-- Paste your logs here -->
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.38.9, on macOS 26.3 25D125 darwin-x64, locale en-IN) [969ms]
• Flutter version 3.38.9 on channel stable at /Users/priyankarawat/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 67323de285 (3 months ago), 2026-01-28 13:43:12 -0800
• Engine revision 587c18f873
• Dart version 3.10.8
• DevTools version 2.51.1
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations,
enable-native-assets, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [4.7s]
• Android SDK at /Users/priyankarawat/Library/Android/sdk
• Emulator version 35.6.11.0 (build_id 13610412) (CL:N/A)
• Platform android-36, build-tools 36.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 26.1) [2.7s]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 17B55
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [22ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Connected device (3 available) [8.8s]
• Priyanka’s iPhone (wireless) (mobile) • 00008140-001A44261493001C • ios • iOS 26.3.1 23D771330a
• macOS (desktop) • macos • darwin-x64 • macOS 26.3 25D125 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 147.0.7727.138
[✓] Network resources [674ms]
• All expected network resources are available.
• No issues found!
Activity
vashworth commentedon May 5, 2026
@priyankarawat953 Thank you for you report. This seems like Xcode is failing to download the artifacts. Could you try running
rm -rf ~/Library/Caches/org.swift.swiftpm/artifacts/and then try again?large commentedon May 25, 2026
This still fails on the xcode cloud, using Flutter v3.44 @vashworth / @okorohelijah
It is 50/50 if it comes through when compiling main, but if you create a branch it will compile "always". It does not fail so often.
Tried to update the ci_scripts to clear cache directories etc (like /Users/local/Library/Caches/org.swift.swiftpm/artifacts/ ) , but that does not work.
I cannot give you an reproducing code either, so this is annoying and odd.
From the log above, the equalness is "grpcpp" package.
CI-log:
ci_post_clone.sh script for xcode cloud to run:
If you run the same unchanged code, once again in the xcode cloud you get other failures:
VladislavGlushko commentedon May 27, 2026
Currently encountering the same issue with other google packages: FirebaseAnalytics, grpc, abseil, GoogleAppMeasurement, GoogleAdsOnDeviceConversion. Cannot compile any builds with 3.44.0 right now because of this..
large commentedon May 27, 2026
If you are using Xcode Cloud to build, I had some compilation success if you create another branch and setup to compile on that branch (with same code). Quite annoying though
Stop prefetching Swift packages in pub get (flutter#187113)
vashworth commentedon May 27, 2026
A workaround fix is landed on master and I'll cherry-pick it to beta and stable shortly.
I've also filed an issue with SwiftPM since it's an error from their side: swiftlang/swift-package-manager#10138. Please upvote that issue to get their team's attention on it.
[CP-stable][iOS] Remove async prefetch of Swift package dependencies (#…
Pankti1Kosmos commentedon Jun 11, 2026
I'm hitting the same issue. Environment:
The plugin's Package.swift is correctly detected by Flutter (FlutterGeneratedPluginSwiftPackage references it), but SPM packages are never linked into the Runner build — results in "Module not found" at compile time.
CocoaPods fallback is not viable in our case because the xcframework's .swiftinterface imports SPM-only dependencies (e.g., krzyzanowskim/OpenSSL 3.3.3001) that don't exist on CocoaPods trunk.
This completely blocks local iOS development for any plugin consuming SPM-only dependencies on Xcode 26.
Is there an ETA for a fix?
bardez commentedon Jun 14, 2026
same here!
jakelacey2012 commentedon Jun 14, 2026
Upgrading to
3.44.2should fix your issue containing the following fix 638b3c8.vashworth commentedon Jun 15, 2026
Fix is available on
3.44.2. If you continue to have issues, please file a new issue.Stop prefetching Swift packages in pub get (flutter#187113)
github-actions commentedon Jul 14, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.