 				.catch { _ in .empty() }
 		}
 		.concat(identity)
-		.filter { $0 == .Framework }
+		.filter(shouldBuildProductType)
 		// If we find any framework target, we should indeed build this scheme.
 		.map { _ in true }
 		// Otherwise, nope.

	}
}

/// Determines whether the given scheme should be built automatically.
private func shouldBuildScheme(buildArguments: BuildArguments) -> ColdSignal<Bool> {
	precondition(buildArguments.scheme != nil)


		return launchTask(buildScheme, standardOutput: stdoutSink)
			.then(BuildSettings.loadWithArguments(copiedArgs))
			.filter { settings in
				// Only copy build products for the product types we care about.
				if let productType = settings.productType.value() {
					return shouldBuildProductType(productType)
				} else {
					return false
				}
			}
	}

	let buildSignal: ColdSignal<NSURL> = BuildSettings.platformForScheme(scheme, inProject: project)
