Move Flutter.podspec to add-to-app project template (#71103)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# NOTE: This podspec is NOT to be published. It is only used as a local source!
|
||||
#
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'Flutter'
|
||||
s.version = '1.0.0'
|
||||
s.summary = 'High-performance, high-fidelity mobile apps.'
|
||||
s.description = <<-DESC
|
||||
Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS.
|
||||
DESC
|
||||
s.homepage = 'https://flutter.io'
|
||||
s.license = { :type => 'MIT' }
|
||||
s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
|
||||
s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.vendored_frameworks = 'Flutter.framework'
|
||||
end
|
||||
@@ -30,13 +30,13 @@ end
|
||||
def install_flutter_engine_pod
|
||||
current_directory = File.expand_path('..', __FILE__)
|
||||
engine_dir = File.expand_path('engine', current_directory)
|
||||
if !File.exist?(engine_dir)
|
||||
framework_name = 'Flutter.framework'
|
||||
copied_engine = File.expand_path(framework_name, engine_dir)
|
||||
if !File.exist?(copied_engine)
|
||||
# Copy the debug engine to have something to link against if the xcode backend script has not run yet.
|
||||
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
|
||||
debug_framework_dir = File.join(flutter_root, '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)
|
||||
FileUtils.cp_r(File.join(debug_framework_dir, framework_name), engine_dir)
|
||||
end
|
||||
|
||||
# Keep pod path relative so it can be checked into Podfile.lock.
|
||||
|
||||
@@ -176,6 +176,7 @@
|
||||
"templates/module/ios/host_app_ephemeral/Config.tmpl/Debug.xcconfig",
|
||||
"templates/module/ios/host_app_ephemeral/Config.tmpl/Flutter.xcconfig",
|
||||
"templates/module/ios/host_app_ephemeral/Config.tmpl/Release.xcconfig",
|
||||
"templates/module/ios/host_app_ephemeral/Flutter/engine/Flutter.podspec.tmpl",
|
||||
"templates/module/ios/host_app_ephemeral/Runner.tmpl/AppDelegate.h",
|
||||
"templates/module/ios/host_app_ephemeral/Runner.tmpl/AppDelegate.m",
|
||||
"templates/module/ios/host_app_ephemeral/Runner.tmpl/Assets.xcassets/AppIcon.appiconset/Contents.json",
|
||||
|
||||
Reference in New Issue
Block a user