   ///   - frameworkLocations: A dictionary containing the pod name as the key and a location to
   ///                         the compiled frameworks.
   ///   - ignoreFrameworks: A list of Pod
+  /// - Returns: The filenames of the frameworks that were copied.
   /// - Throws: Various FileManager errors in case the copying fails, or an error if the framework
   //            doesn't exist in `frameworkLocations`.
   private func copyFrameworks(fromPods installedPods: [CocoaPodUtils.PodInfo],
                               toDirectory dir: URL,
                               frameworkLocations: [String: [URL]],
                               podsToIgnore: [String],
-                              foldersToIgnore: [String]) throws {
+                              foldersToIgnore: [String]) throws -> [String] {
     let fileManager = FileManager.default
     if !fileManager.directoryExists(at: dir) {
       try fileManager.createDirectory(at: dir, withIntermediateDirectories: false, attributes: nil)
     }
+
+    // Keep track of the names of the frameworks copied over.
+    var copiedFrameworkNames: [String] = []
 
     // Loop through each InstalledPod item and get the name so we can fetch the framework and copy
     // it to the destination directory.

    let installedPods = CocoaPodUtils.installPods([pod], inDir: projectDir, customSpecRepos: customSpecRepos)
    // Copy the frameworks into the proper product directory.
    let productDir = rootZipDir.appendingPathComponent(pod.rawValue)
    try copyFrameworks(fromPods: installedPods,
                       toDirectory: productDir,
                       frameworkLocations: builtFrameworks,
                       podsToIgnore: podsToIgnore,
                       foldersToIgnore: pod.duplicateFrameworksToRemove())

    // Return the names of all the installed frameworks.
    let namedFrameworks = installedPods.map { $0.name }
    let copiedFrameworks = namedFrameworks.filter {
      // Only return the frameworks that aren't contained in the "podsToIgnore" array, aren't an
      // interop framework (since they don't compile to frameworks), or the Firebase pod itself.


        let destination = dir.appendingPathComponent(frameworkName)
        try fileManager.copyItem(at: framework, to: destination)
        copiedFrameworkNames.append(frameworkName.replacingOccurrences(of: ".framework", with: ""))
      }
    }

    return copiedFrameworkNames
  }

  /// Copies required files from the Firebase pod (i.e. `Firebase.h`, `module.modulemap`, etc) into
