@@ -27,42 +27,11 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
2727
2828flutter_ios_podfile_setup
2929
30- def install_plugin_pods ( application_path = nil , relative_symlink_dir , platform )
31- # defined_in_file is set by CocoaPods and is a Pathname to the Podfile.
32- application_path ||= File . dirname ( defined_in_file . realpath ) if self . respond_to? ( :defined_in_file )
33- raise 'Could not find application path' unless application_path
34-
35- # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
36- # referring to absolute paths on developers' machines.
37-
38- symlink_dir = File . expand_path ( relative_symlink_dir , application_path )
39- system ( 'rm' , '-rf' , symlink_dir ) # Avoid the complication of dependencies like FileUtils.
40-
41- symlink_plugins_dir = File . expand_path ( 'plugins' , symlink_dir )
42- system ( 'mkdir' , '-p' , symlink_plugins_dir )
43-
44- plugins_file = File . join ( application_path , '..' , '.flutter-plugins-dependencies' )
45- plugin_pods = flutter_parse_plugins_file ( plugins_file , platform )
46- plugin_pods . each do |plugin_hash |
47- plugin_name = plugin_hash [ 'name' ]
48- plugin_path = plugin_hash [ 'path' ]
49- # iOS and macOS code can be shared in "darwin" directory, otherwise
50- # respectively in "ios" or "macos" directories.
51- shared_darwin_source = plugin_hash . fetch ( 'shared_darwin_source' , false )
52- platform_directory = shared_darwin_source ? 'darwin' : platform
53- if ( plugin_name && plugin_path )
54- specPath = "#{ plugin_path } /#{ platform_directory } /#{ plugin_name } .podspec"
55- pod plugin_name , :path => specPath
56- end
57- end
58- end
59-
6030target 'Runner' do
6131 use_frameworks!
6232 use_modular_headers!
6333
64- flutter_install_ios_engine_pod ( File . dirname ( File . realpath ( __FILE__ ) ) )
65- install_plugin_pods ( File . dirname ( File . realpath ( __FILE__ ) ) , '.symlinks' , 'ios' )
34+ flutter_install_all_ios_pods File . dirname ( File . realpath ( __FILE__ ) )
6635end
6736
6837post_install do |installer |
0 commit comments