Podfile 1.5 KB

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