Podfile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. platform :osx, '10.14'
  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. target 'RunnerTests' do
  27. inherit! :search_paths
  28. end
  29. end
  30. post_install do |installer|
  31. installer.pods_project.targets.each do |target|
  32. flutter_additional_macos_build_settings(target)
  33. end
  34. end