diff --git a/dev/integration_tests/channels/ios/.gitignore b/dev/integration_tests/channels/ios/.gitignore index 797c015957b..d0a7d98562c 100644 --- a/dev/integration_tests/channels/ios/.gitignore +++ b/dev/integration_tests/channels/ios/.gitignore @@ -35,5 +35,3 @@ Icon? /Flutter/Flutter.framework /Flutter/Generated.xcconfig /ServiceDefinitions.json - -Pods/ diff --git a/dev/integration_tests/channels/ios/Flutter/Debug.xcconfig b/dev/integration_tests/channels/ios/Flutter/Debug.xcconfig index 72c15fd3e18..5c0c1707526 100644 --- a/dev/integration_tests/channels/ios/Flutter/Debug.xcconfig +++ b/dev/integration_tests/channels/ios/Flutter/Debug.xcconfig @@ -1,4 +1,3 @@ #include "Generated.xcconfig" -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "TestConfig.xcconfig" diff --git a/dev/integration_tests/channels/ios/Flutter/Release.xcconfig b/dev/integration_tests/channels/ios/Flutter/Release.xcconfig index 8d3ed2b34fe..5c0c1707526 100644 --- a/dev/integration_tests/channels/ios/Flutter/Release.xcconfig +++ b/dev/integration_tests/channels/ios/Flutter/Release.xcconfig @@ -1,4 +1,3 @@ #include "Generated.xcconfig" -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "TestConfig.xcconfig" diff --git a/dev/integration_tests/channels/ios/Podfile b/dev/integration_tests/channels/ios/Podfile deleted file mode 100644 index 74b3de06493..00000000000 --- a/dev/integration_tests/channels/ios/Podfile +++ /dev/null @@ -1,38 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '9.0' - -if ENV['FLUTTER_FRAMEWORK_DIR'] == nil - abort('Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework') -end - -target 'Runner' do - use_frameworks! - - # Pods for Runner - - # Flutter Pods - pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR'] - - if File.exists? '../.flutter-plugins' - flutter_root = File.expand_path('..') - File.foreach('../.flutter-plugins') { |line| - plugin = line.split(pattern='=') - if plugin.length == 2 - name = plugin[0].strip() - path = plugin[1].strip() - resolved_path = File.expand_path("#{path}/ios", flutter_root) - pod name, :path => resolved_path - else - puts "Invalid plugin specification: #{line}" - end - } - end -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['ENABLE_BITCODE'] = 'NO' - end - end -end diff --git a/dev/integration_tests/channels/ios/Runner.xcodeproj/project.pbxproj b/dev/integration_tests/channels/ios/Runner.xcodeproj/project.pbxproj index 92cbb24fed8..52e0090b822 100644 --- a/dev/integration_tests/channels/ios/Runner.xcodeproj/project.pbxproj +++ b/dev/integration_tests/channels/ios/Runner.xcodeproj/project.pbxproj @@ -11,7 +11,6 @@ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 913134F849F6C8DEAC837F96 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C803412E9584DEAC0259A174 /* Pods_Runner.framework */; }; 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; @@ -57,7 +56,6 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C803412E9584DEAC0259A174 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -67,20 +65,12 @@ files = ( 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, - 913134F849F6C8DEAC837F96 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 840012C8B5EDBCF56B0E4AC1 /* Pods */ = { - isa = PBXGroup; - children = ( - ); - name = Pods; - sourceTree = ""; - }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -101,7 +91,6 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - 840012C8B5EDBCF56B0E4AC1 /* Pods */, CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, ); sourceTree = ""; @@ -138,14 +127,6 @@ name = "Supporting Files"; sourceTree = ""; }; - CF3B75C9A7D2FA2A4C99F110 /* Frameworks */ = { - isa = PBXGroup; - children = ( - C803412E9584DEAC0259A174 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ diff --git a/dev/integration_tests/channels/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/dev/integration_tests/channels/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 21a3cc14c74..1d526a16ed0 100644 --- a/dev/integration_tests/channels/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/dev/integration_tests/channels/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -4,7 +4,4 @@ - - diff --git a/dev/integration_tests/channels/ios/Runner.xcworkspace/contents.xcworkspacedata b/dev/integration_tests/channels/ios/Runner.xcworkspace/contents.xcworkspacedata index 21a3cc14c74..1d526a16ed0 100644 --- a/dev/integration_tests/channels/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/dev/integration_tests/channels/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,7 +4,4 @@ - - diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index 973652974cc..29c0ab9f365 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart @@ -152,9 +152,10 @@ Future buildXcodeProject({ // copied over to a location that is suitable for Xcodebuild to find them. final Directory appDirectory = fs.directory(app.appDirectory); await _addServicesToBundle(appDirectory); - injectPlugins(); + final bool hasFlutterPlugins = injectPlugins(); - await _runPodInstall(appDirectory, flutterFrameworkDir(mode)); + if (hasFlutterPlugins) + await _runPodInstall(appDirectory, flutterFrameworkDir(mode)); final List commands = [ '/usr/bin/env', diff --git a/packages/flutter_tools/lib/src/plugins.dart b/packages/flutter_tools/lib/src/plugins.dart index 57a07d0bd92..7590521c30c 100644 --- a/packages/flutter_tools/lib/src/plugins.dart +++ b/packages/flutter_tools/lib/src/plugins.dart @@ -194,7 +194,11 @@ void _writeIOSPluginRegistry(String directory, List plugins) { } -void injectPlugins({String directory}) { +/// Finds Flutter plugins in the pubspec.yaml, creates platform injection +/// registries classes and add them to the build depedencies. +/// +/// Returns whether any Flutter plugins are added. +bool injectPlugins({String directory}) { directory ??= fs.currentDirectory.path; final List plugins = _findPlugins(directory); _writeFlutterPluginsList(directory, plugins); @@ -202,4 +206,5 @@ void injectPlugins({String directory}) { _writeAndroidPluginRegistry(directory, plugins); if (fs.isDirectorySync(fs.path.join(directory, 'ios'))) _writeIOSPluginRegistry(directory, plugins); + return plugins.isNotEmpty; }