anchor.diff:      'plugins': iosPlugins,
     };
     final String registryDirectory = project.ios.pluginRegistrantHost.path;
  -  return await _writeCocoaPluginRegistrant(project, context, registryDirectory);
  +  if (project.isModule) {
  +    final String registryClassesDirectory = fs.path.join(registryDirectory, 'Classes');
  +    _renderTemplateToFile(
  +      _pluginRegistrantPodspecTemplate,
  +      context,
  +      fs.path.join(registryDirectory, 'FlutterPluginRegistrant.podspec'),
  +    );
  +    _renderTemplateToFile(
  +      _objcPluginRegistryHeaderTemplate,
  +      context,
  +      fs.path.join(registryClassesDirectory, 'GeneratedPluginRegistrant.h'),
  +    );
  +    _renderTemplateToFile(
  +      _objcPluginRegistryImplementationTemplate,
  +      context,
  +      fs.path.join(registryClassesDirectory, 'GeneratedPluginRegistrant.m'),
  +    );
  +  } else {
  +    _renderTemplateToFile(
  +      _objcPluginRegistryHeaderTemplate,
  +      context,
  +      fs.path.join(registryDirectory, 'GeneratedPluginRegistrant.h'),
  +    );
  +    _renderTemplateToFile(
  +      _objcPluginRegistryImplementationTemplate,
  +      context,
  +      fs.path.join(registryDirectory, 'GeneratedPluginRegistrant.m'),
  +    );
  +  }
   }
   
   Future<void> _writeMacOSPluginRegistrant(FlutterProject project, List<Plugin> plugins) async {
  
positive.code: #endif /* GeneratedPluginRegistrant_h */
  ''';
  
  const String _cocoaPluginRegistryImplementationTemplate = '''//
  //  Generated file. Do not edit.
  //
  
  
negative.code:   _renderTemplateToFile(_androidPluginRegistryTemplate, context, registryPath);
  }
  
  const String _objcPluginRegistryHeaderTemplate = '''//
  //  Generated file. Do not edit.
  //
  
  