@@ -33,10 +33,15 @@ const String brokenCocoaPodsConsequence = '''
3333 This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
3434 This can usually be fixed by re-installing CocoaPods. For more info, see https://github.com/flutter/flutter/issues/14293.''' ;
3535
36- const String outOfDatePodfileConsequence = '''
36+ const String outOfDateFrameworksPodfileConsequence = '''
3737 This can cause a mismatched version of Flutter to be embedded in your app, which may result in App Store submission rejection or crashes.
3838 If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/24641 for instructions.''' ;
3939
40+ const String outOfDatePluginsPodfileConsequence = '''
41+ This can cause issues if your application depends on plugins that do not support iOS.
42+ See https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms for details.
43+ If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/45197 for instructions.''' ;
44+
4045const String cocoaPodsInstallInstructions = '''
4146 sudo gem install cocoapods''' ;
4247
@@ -375,25 +380,41 @@ class CocoaPods {
375380 }
376381 }
377382
378- // Previously, the Podfile created a symlink to the cached artifacts engine framework
379- // and installed the Flutter pod from that path. This could get out of sync with the copy
380- // of the Flutter engine that was copied to ios/Flutter by the xcode_backend script.
381- // It was possible for the symlink to point to a Debug version of the engine when the
382- // Xcode build configuration was Release, which caused App Store submission rejections.
383- //
384- // Warn the user if they are still symlinking to the framework.
385383 void _warnIfPodfileOutOfDate (XcodeBasedProject xcodeProject) {
386384 if (xcodeProject is ! IosProject ) {
387385 return ;
388386 }
387+
388+ // Previously, the Podfile created a symlink to the cached artifacts engine framework
389+ // and installed the Flutter pod from that path. This could get out of sync with the copy
390+ // of the Flutter engine that was copied to ios/Flutter by the xcode_backend script.
391+ // It was possible for the symlink to point to a Debug version of the engine when the
392+ // Xcode build configuration was Release, which caused App Store submission rejections.
393+ //
394+ // Warn the user if they are still symlinking to the framework.
389395 final Link flutterSymlink = _fileSystem.link (_fileSystem.path.join (
390- xcodeProject.symlinks.path,
396+ ( xcodeProject as IosProject ) .symlinks.path,
391397 'flutter' ,
392398 ));
393399 if (flutterSymlink.existsSync ()) {
394400 _logger.printError (
395401 'Warning: Podfile is out of date\n '
396- '$outOfDatePodfileConsequence \n '
402+ '$outOfDateFrameworksPodfileConsequence \n '
403+ 'To regenerate the Podfile, run:\n '
404+ '$podfileMigrationInstructions \n ' ,
405+ emphasis: true ,
406+ );
407+ return ;
408+ }
409+ // Most of the pod and plugin parsing logic was moved from the Podfile
410+ // into the tool's podhelper.rb script. If the Podfile still references
411+ // the old parsed .flutter-plugins file, prompt the regeneration. Old line was:
412+ // plugin_pods = parse_KV_file('../.flutter-plugins')
413+ if (xcodeProject.podfile.existsSync () &&
414+ xcodeProject.podfile.readAsStringSync ().contains ('.flutter-plugins\' ' )) {
415+ _logger.printError (
416+ 'Warning: Podfile is out of date\n '
417+ '$outOfDatePluginsPodfileConsequence \n '
397418 'To regenerate the Podfile, run:\n '
398419 '$podfileMigrationInstructions \n ' ,
399420 emphasis: true ,
0 commit comments