 		}
 	}
 
+	/// Attempts to determine the name of the built product's wrapper bundle.
+	public var wrapperName: Result<String> {
+		return self["WRAPPER_NAME"]
+	}
+
 	/// Attempts to determine the URL to the built product's wrapper.
 	public var wrapperURL: Result<NSURL> {
 		return builtProductsDirectoryURL.flatMap { builtProductsURL in
-			return self["WRAPPER_NAME"].map { wrapperName in
+			return self.wrapperName.map { wrapperName in
 				return builtProductsURL.URLByAppendingPathComponent(wrapperName)
 			}
 		}


						return copyBuildProductIntoDirectory(folderURL, deviceSettings)
							.map { productURL in
								let mergeProductBinaries = URLToBuiltExecutable(simulatorSettings)
									.concat(URLToBuiltExecutable(deviceSettings))
									.reduce(initial: []) { $0 + [ $1 ] }
									// TODO: This should be a zip.
									.combineLatestWith(valueForBuildSetting("EXECUTABLE_PATH", deviceSettings).map(folderURL.URLByAppendingPathComponent))
									.map { (executableURLs: [NSURL], outputURL: NSURL) -> ColdSignal<()> in
										return mergeExecutables(executableURLs, outputURL)
									}
									.merge(identity)

								let sourceModulesURL = pathToModulesFolder(simulatorSettings)
									// TODO: This should be a zip.
									.combineLatestWith(URLToBuildProductsDirectory(simulatorSettings))
									.map { (modulesPath, productsURL) -> NSURL in
										return productsURL.URLByAppendingPathComponent(modulesPath)
									}

								let destinationModulesURL = pathToModulesFolder(deviceSettings)
									.map { modulesPath -> NSURL in
										return folderURL.URLByAppendingPathComponent(modulesPath)
									}

								let mergeProductModules = sourceModulesURL

/// already exist.
///
/// Returns a signal that will send the URL after copying upon success.
private func copyBuildProductIntoDirectory(directoryURL: NSURL, settings: BuildSettings) -> ColdSignal<NSURL> {
	return ColdSignal.lazy {
		var error: NSError?
		if !NSFileManager.defaultManager().createDirectoryAtURL(directoryURL, withIntermediateDirectories: true, attributes: nil, error: &error) {
			return .error(error ?? CarthageError.WriteFailed(directoryURL).error)
		}

		return ColdSignal.fromResult(settings.wrapperName)
			.map(directoryURL.URLByAppendingPathComponent)
			.map { destinationURL in
				return ColdSignal.fromResult(settings.wrapperURL)
					.try { (productURL, error) in
						// TODO: Atomic copying.
						NSFileManager.defaultManager().removeItemAtURL(destinationURL, error: nil)
