I am struggling with these for days. Searching for answers online but still to no avail.
List of pod files: (I assume this is related to MDFInternationalisation?)
This is my code in podfile:
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
I tried this solution https://github.com/material-components/material-components-ios/issues/10203 but error still persists. I also tried installing the latest xcode version.
Please please help me. I have been stucked for days and it is extremely frustrating. I am a flutter dev so I am quite a noob in ios. Hope to get any guidance. Thank you!
CodePudding user response:
After trying out multiple solutuions, this is my solution. Simply add this pod 'MDFInternationalization','~>2.0
to your podfile, nothing more. There are some solutions on the internet that require us to change post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end end
It is not required. just add pod md internationalisation and make sure you specify 2.0.
After that, pod install, flutter clean and flutter run.