blob: dade8dfad0dcfe28032732e497b14f7023b21a51 [file] [log] [blame]
Casey Hillers5cfd7d52021-12-07 12:29:01 -08001platform :osx, '10.11'
2
3# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5
6project 'Runner', {
7 'Debug' => :debug,
8 'Profile' => :release,
9 'Release' => :release,
10}
11
12def flutter_root
13 generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14 unless File.exist?(generated_xcode_build_settings_path)
15 raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16 end
17
18 File.foreach(generated_xcode_build_settings_path) do |line|
19 matches = line.match(/FLUTTER_ROOT\=(.*)/)
20 return matches[1].strip if matches
21 end
22 raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23end
24
25require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26
27flutter_macos_podfile_setup
28
29target 'Runner' do
30 use_frameworks!
31 use_modular_headers!
32
33 flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34end
35
36post_install do |installer|
37 installer.pods_project.targets.each do |target|
38 flutter_additional_macos_build_settings(target)
39 end
40end