Conflict Between ios package and flutter package During making archive file

I have the following Podfile for my project:
Conflict Between ios package(SDWebImageWebPCoder) and flutter package(flutter_image_compress) During making archive file

target 'WidgetGroupExtension' do
  use_frameworks!
  use_modular_headers!

  pod 'GoogleUtilities'
  pod 'Firebase'
  # Add the Firebase pod for Google Analytics
  pod 'Firebase/Analytics'
  pod 'Firebase/RemoteConfig'
  pod 'SDWebImageWebPCoder'
end

In my Flutter project’s pubspec.yaml, the package flutter_image_compress: ^2.2.0 is included.

While the build works locally, I encounter an error during the build for deployment, suggesting a conflict with the iOS native package SDWebImageWebPCoder. Is there a way to resolve this issue?

I got the error like this:

Read webview_flutter_wkwebview scheme in 0s.
[04:26:21] Reading xcode project
Finding platform type
[04:26:21] Reading build settings…
[04:26:21] $ xcodebuild “-project” “/Users/[REDACTED]/git/ios/Runner.xcodeproj” “-target” “Runner” “-configuration” “Release-stg” “-showBuildSettings”
[04:26:22] Read target settings.
Platform type: iOS
[04:26:22] Reading main target
[04:26:22] Creating the Archive …
Starting the Archive …
[04:26:22] $ set -o pipefail && xcodebuild “archive” “-workspace” “/Users/[REDACTED]/git/ios/Runner.xcworkspace” “-scheme” “stg” “-configuration” “Release-stg” “-xcconfig” “/var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/2162201188/temp.xcconfig” “-archivePath” “/var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/xcodeArchive2843604277/Runner.xcarchive” “-destination” “generic/platform=iOS” | xcpretty
:x: error: Multiple commands produce ‘/Users/[REDACTED]/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/ArchiveIntermediates/stg/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SDWebImage.framework’
unexpected mutating task (‘SetOwnerAndGroup [REDACTED]:staff /Users/[REDACTED]/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/ArchiveIntermediates/stg/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SDWebImage.framework’) with no relation to prior mutator (‘SetOwnerAndGroup [REDACTED]:staff /Users/[REDACTED]/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/ArchiveIntermediates/stg/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SDWebImage.framework’) (in target ‘SDWebImage’ from project ‘Pods’)
duplicate output file ‘/Users/[REDACTED]/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/ArchiveIntermediates/stg/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SDWebImage.framework’ on task: MkDir /Users/[REDACTED]/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/ArchiveIntermediates/stg/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SDWebImage.framework (in target ‘SDWebImage-Core’ from project ‘Pods’)
duplicate output file ‘’ on task: MkDir /Users/[REDACTED]/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/ArchiveIntermediates/stg/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SDWebImage.framework (in target ‘SDWebImage-Core’ from project ‘Pods’)

warning: duplicate output file ‘/Users/[REDACTED]/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/ArchiveIntermediates/stg/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SDWebImage.framework/SDWebImage’ on task: Ld /Users/[REDACTED]/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/ArchiveIntermediates/stg/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SDWebImage.framework/SDWebImage normal (in target ‘SDWebImage-Core’ from project ‘Pods’)

/Users/[REDACTED]/git/ios/Runner.xcodeproj: warning: Multiple targets match implicit dependency for linker flags ‘-framework SDWebImage’. Consider adding an explicit dependency on the intended target to resolve this ambiguity. (in target ‘Runner’ from project ‘Runner’)
note: Target ‘SDWebImage’ (in project ‘Pods’)
note: Target ‘SDWebImage-Core’ (in project ‘Pods’)
warning: Run script build phase ‘Firebase Setup’ will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking “Based on dependency analysis” in the script phase. (in target ‘Runner’ from project ‘Runner’)
warning: Run script build phase ‘Override InfoPlist’ will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking “Based on dependency analysis” in the script phase. (in target ‘Runner’ from project ‘Runner’)
note: Run script build phase ‘Run Script’ will be run during every build because the option to run the script phase “Based on dependency analysis” is unchecked. (in target ‘Runner’ from project ‘Runner’)
warning: Skipping duplicate build file in Copy Bundle Resources build phase: /Users/[REDACTED]/git/ios/Runner/GoogleService-Info.plist (in target ‘Runner’ from project ‘Runner’)
note: Run script build phase ‘Thin Binary’ will be run during every build because the option to run the script phase “Based on dependency analysis” is unchecked. (in target ‘Runner’ from project ‘Runner’)
warning: Run script build phase ‘[firebase_crashlytics] Crashlytics Upload Symbols’ will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking “Based on dependency analysis” in the script phase. (in target ‘Runner’ from project ‘Runner’)
note: Run script build phase ‘[CP] Copy Pods Resources’ will be run during every build because the option to run the script phase “Based on dependency analysis” is unchecked. (in target ‘Runner’ from project ‘Runner’)

** ARCHIVE FAILED **
You can find the last couple of lines of Xcode’s build log above, but the full log will be also available in the xcodebuild-archive.log
The log file will be stored in $BITRISE_DEPLOY_DIR, and its full path will be available in the $BITRISE_XCODEBUILD_ARCHIVE_LOG_PATH environment variable.
Failed to execute Step main logic:
failed to archive the project:
command failed with exit status 65 (set -o pipefail && xcodebuild “archive” “-workspace” “/Users/[REDACTED]/git/ios/Runner.xcworkspace” “-scheme” “stg” “-configuration” “Release-stg” “-xcconfig” “/var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/2162201188/temp.xcconfig” “-archivePath” “/var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/xcodeArchive2843604277/Runner.xcarchive” “-destination” “generic/platform=iOS” | xcpretty):
error: Multiple commands produce ‘/Users/[REDACTED]/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/ArchiveIntermediates/stg/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SDWebImage.framework’
Exporting outputs…
The xcodebuild archive log path is now available in the Environment Variable: BITRISE_XCODEBUILD_ARCHIVE_LOG_PATH (value: /Users/[REDACTED]/deploy/xcodebuild-archive.log)
Failed to execute Step main logic:
failed to archive the project:
command failed with exit status 65 (set -o pipefail && xcodebuild “archive” “-workspace” “/Users/[REDACTED]/git/ios/Runner.xcworkspace” “-scheme” “stg” “-configuration” “Release-stg” “-xcconfig” “/var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/2162201188/temp.xcconfig” “-archivePath” “/var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/xcodeArchive2843604277/Runner.xcarchive” “-destination” “generic/platform=iOS” | xcpretty):
error: Multiple commands produce ‘/Users/[REDACTED]/Library/Developer/Xcode/DerivedData/Runner-fvdlvfvunbwmbcgkbjykdeexifra/Build/Intermediates.noindex/ArchiveIntermediates/stg/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SDWebImage.framework’
| |
±–±--------------------------------------------------------------±---------+
| x | Xcode Archive & Export for iOS (Failed) | 21.76 sec |
±–±--------------------------------------------------------------±---------+
| Issue tracker: Issues · bitrise-steplib/steps-xcode-archive · GitHub |
| Source: GitHub - bitrise-steplib/steps-xcode-archive: Xcode Archive for iOS step |
±–±--------------------------------------------------------------±---------+