If you’re encountering the following error while running your iOS app after updating the sqflite_sqlcipher package in your Flutter project:
Error (Xcode):
Multiple commands produce
/Users/…./Library/Developer/Xcode/DerivedData/Runner-dcarzxmaqvdbptghzzumpfkowiwn/Build/Intermediates.noindex/ArchiveIntermediates/dev/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/SQLCipher.bundle
This issue can be resolved by updating the Podfile located in the ios directory of your project.
- Replace the existing post_install block:
Before:
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
Code language: JavaScript (javascript)
With:
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'FMDB-SQLCipher'
target.build_configurations.each do |config|
config.build_settings['PRODUCT_NAME'] = 'FMDBSQLCipher'
end
end
flutter_additional_ios_build_settings(target)
end
end
Code language: JavaScript (javascript)
This update will help eliminate the build error and allow your app to build correctly.
