Podfile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. platform :osx, '10.11'
  2. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
  3. ENV['COCOAPODS_DISABLE_STATS'] = 'true'
  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', 'ephemeral', '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 Flutter-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_macos_podfile_setup
  22. target 'Runner' do
  23. use_frameworks!
  24. use_modular_headers!
  25. flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
  26. end
  27. post_install do |installer|
  28. installer.pods_project.targets.each do |target|
  29. flutter_additional_macos_build_settings(target)
  30. end
  31. end