anchor.diff:        }
   
         // Create XCFramework from iOS and simulator frameworks.
  -      final List<String> xcframeworkCommand = <String>[
  -        ...globals.xcode.xcrunCommand(),
  -        'xcodebuild',
  -        '-create-xcframework',
  -        '-framework', armFlutterFrameworkDirectory.path,
  -        '-framework', simulatorFlutterFrameworkDirectory.path,
  -        '-output', fatFramework.parent
  -            .childFile('$frameworkBinaryName.xcframework')
  -            .path
  -      ];
  -
  -      final RunResult xcframeworkResult = await globals.processUtils.run(
  -        xcframeworkCommand,
  -        allowReentrantFlutter: false,
  -      );
  -
  -      if (xcframeworkResult.exitCode != 0) {
  -        throwToolExit(
  -          'Unable to create XCFramework: ${xcframeworkResult.stderr}',
  -        );
  -      }
  +      await _produceXCFramework(
  +        <Directory>[
  +          armFlutterFrameworkDirectory,
  +          simulatorFlutterFrameworkDirectory
  +        ],
  +        frameworkBinaryName,
  +        fatFramework.parent,
  +      );
       } finally {
         temporaryOutput.deleteSync(recursive: true);
       }
     }
   
  -  Future<void> _produceNonDebugXCFramework(
  -    BuildInfo buildInfo,
  -    Directory fatFramework,
  -    String frameworkBinaryName,
  -  ) async {
  -    // Simulator is only supported in Debug mode.
  -    // "Fat" framework here must only contain arm.
  +  Future<void> _produceXCFramework(Iterable<Directory> frameworks,
  +      String frameworkBinaryName, Directory outputDirectory) async {
  +    if (!boolArg('xcframework')) {
  +      return;
  +    }
       final List<String> xcframeworkCommand = <String>[
         ...globals.xcode.xcrunCommand(),
         'xcodebuild',
         '-create-xcframework',
  -      '-framework', fatFramework.path,
  -      '-output', fatFramework.parent
  -          .childFile('$frameworkBinaryName.xcframework')
  -          .path
  +      for (Directory framework in frameworks) ...<String>[
  +        '-framework',
  +        framework.path
  +      ],
  +      '-output',
  +      outputDirectory.childDirectory('$frameworkBinaryName.xcframework').path
       ];
   
       final RunResult xcframeworkResult = await globals.processUtils.run(
  
positive.code:             continue;
            }
            final String binaryName = globals.fs.path.basenameWithoutExtension(podFrameworkName);
            if (boolArg('universal')) {
              globals.fsUtils.copyDirectorySync(
                podProduct as Directory,
                modeDirectory.childDirectory(podFrameworkName),
              );
              final List<String> lipoCommand = <String>[
                ...globals.xcode.xcrunCommand(),
                'lipo',
                '-create',
                globals.fs.path.join(podProduct.path, binaryName),
                if (mode == BuildMode.debug)
                  simulatorBuildConfiguration
                    .childDirectory(binaryName)
                    .childDirectory(podFrameworkName)
                    .childFile(binaryName)
                    .path,
                '-output',
                modeDirectory.childDirectory(podFrameworkName).childFile(binaryName).path
              ];
  
              final RunResult pluginsLipoResult = await globals.processUtils.run(
                lipoCommand,
                workingDirectory: outputDirectory.path,
                allowReentrantFlutter: false,
              );
  
              if (pluginsLipoResult.exitCode != 0) {
                throwToolExit(
                  'Unable to create universal $binaryName.framework: ${buildPluginsResult.stderr}',
                );
              }
            }
  
            if (boolArg('xcframework')) {
              final List<String> xcframeworkCommand = <String>[
                ...globals.xcode.xcrunCommand(),
                'xcodebuild',
                '-create-xcframework',
                '-framework',
                podProduct.path,
                if (mode == BuildMode.debug)
                  '-framework',
                if (mode == BuildMode.debug)
                  simulatorBuildConfiguration
                    .childDirectory(binaryName)
                    .childDirectory(podFrameworkName)
                    .path,
                '-output',
                modeDirectory.childFile('$binaryName.xcframework').path
              ];
  
              final RunResult xcframeworkResult = await globals.processUtils.run(
                xcframeworkCommand,
                workingDirectory: outputDirectory.path,
                allowReentrantFlutter: false,
              );
  
              if (xcframeworkResult.exitCode != 0) {
                throwToolExit(
                  'Unable to create $binaryName.xcframework: ${xcframeworkResult.stderr}',
                );
              }
            }
          }
        }
      } finally {
  
negative.code:       status.stop();
      }
  
      await _produceXCFrameworkFromUniversal(buildInfo, fatFlutterFrameworkCopy);
    }
  
    Future<void> _produceAppFramework(BuildInfo buildInfo, Directory modeDirectory) async {
  