mirror of
https://github.com/flutter/flutter
synced 2024-10-13 19:52:53 +00:00
c8bf7abeee
Updates the Podfile template to use the CocoaPod disable_input_output_paths installation option which prevents the [CP] Embed Pods Frameworks build phase from outputting the Flutter.framework files.
27 lines
1 KiB
Ruby
27 lines
1 KiB
Ruby
platform :ios, '12.0'
|
|
|
|
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
|
|
install! 'cocoapods', :disable_input_output_paths => true
|
|
|
|
flutter_application_path = 'flutterapp/'
|
|
framework_dir = File.join(flutter_application_path, '.ios', 'Flutter')
|
|
|
|
engine_dir = File.join(framework_dir, 'engine')
|
|
if !File.exist?(engine_dir)
|
|
# Copy the debug engine to have something to link against if the xcode backend script has not run yet.
|
|
debug_framework_dir = File.join(flutter_root(flutter_application_path), 'bin', 'cache', 'artifacts', 'engine', 'ios')
|
|
FileUtils.mkdir_p(engine_dir)
|
|
FileUtils.cp_r(File.join(debug_framework_dir, 'Flutter.framework'), engine_dir)
|
|
FileUtils.cp(File.join(debug_framework_dir, 'Flutter.podspec'), engine_dir)
|
|
end
|
|
|
|
target 'ios_add2app' do
|
|
eval(File.read(File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')), binding)
|
|
end
|
|
|
|
target 'ios_add2appTests' do
|
|
pod 'Flutter', :path => engine_dir
|
|
inherit! :search_paths
|
|
pod 'EarlGrey'
|
|
end
|