Podfile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
  2. ENV['COCOAPODS_DISABLE_STATS'] = 'true'
  3. platform :ios, '13.0'
  4. project 'Runner', {
  5. 'Debug' => :debug,
  6. 'Profile' => :release,
  7. 'Release' => :release,
  8. }
  9. def flutter_root
  10. generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  11. unless File.exist?(generated_xcode_build_settings_path)
  12. raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  13. end
  14. File.foreach(generated_xcode_build_settings_path) do |line|
  15. matches = line.match(/FLUTTER_ROOT\=(.*)/)
  16. return matches[1].strip if matches
  17. end
  18. raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
  19. end
  20. require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
  21. flutter_ios_podfile_setup
  22. target 'Runner' do
  23. use_frameworks!
  24. use_modular_headers!
  25. flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  26. end
  27. post_install do |installer|
  28. installer.pods_project.targets.each do |target|
  29. flutter_additional_ios_build_settings(target)
  30. target.build_configurations.each do |config|
  31. config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
  32. end
  33. end
  34. end