From bc281a5e65348ea322dfe297522775b8d106861a Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Mon, 23 Sep 2024 11:50:14 +0300 Subject: [PATCH] Fix iOS sqlite3 linking issue fixes #888 Co-Authored-By: Ross Savage <551697+dangeross@users.noreply.github.com> --- ios/Podfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ios/Podfile b/ios/Podfile index 6a3c1c05b..af74919e8 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -46,6 +46,15 @@ post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| + # Remove the -lsqlite3 linker flag + # https://github.com/CocoaPods/CocoaPods/issues/830 + # We already include our own sqlite3 implementation via a pod, + # so we don't want the system-provided one as well. + xcconfig_path = config.base_configuration_reference.real_path + xcconfig = File.read(xcconfig_path) + new_xcconfig = xcconfig.sub('-l"sqlite3"', '') + File.open(xcconfig_path, "w") { |file| file << new_xcconfig } + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target config.build_settings['SWIFT_VERSION'] = '5.0' config.build_settings['ENABLE_BITCODE'] = 'NO'