Podfile 1.38 KB
Newer Older
1 2 3
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

4 5
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6

Josh Soref's avatar
Josh Soref committed
7
def parse_KV_file(file,separator='=')
8 9 10 11 12 13 14 15
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  pods_ary = []
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) { |line|
      next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
Josh Soref's avatar
Josh Soref committed
16
      plugin = line.split(pattern=separator)
17
      if plugin.length == 2
18
        podname = plugin[0].strip()
19
        path = plugin[1].strip()
20 21
        podpath = File.expand_path("#{path}", file_abs_path)
        pods_ary.push({:name => podname,:path=>podpath});
22 23 24
      else
        puts "Invalid plugin specification: #{line}"
      end
25 26 27 28 29 30
  }
  return pods_ary
end

target 'Runner' do
  # Flutter Pods
31 32
  pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR']
  
33 34 35 36 37
  # Plugin Pods
  plugin_pods = parse_KV_file("../.flutter-plugins")
  plugin_pods.map{ |p|
    pod p[:name], :path => File.expand_path("ios",p[:path])
  }
38 39 40 41 42
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
43
      config.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = ''
44 45 46
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
47
end