You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.3 KiB

2 years ago
  1. platform :osx, '10.12'
  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