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.
Author's Bio
Prashant Telangi brings over 14 years of experience in Mobile Technology, He is currently serving as Head of Technology, Mobile at Mobisoft Infotech. With a proven history in IT and services, he is a skilled, passionate developer specializing in Mobile Applications. His strong engineering background underscores his commitment to crafting innovative solutions in the ever-evolving tech landscape.