 /// If the platform is unrecognized or could not be determined, an error will be
 /// sent on the returned signal.
 public func platformForScheme(scheme: String, inProject project: ProjectLocator) -> ColdSignal<Platform> {
-	return valueForBuildSetting("PLATFORM_NAME", withScheme: scheme, inProject: project).tryMap(Platform.fromString)
+	return valueForBuildSetting("PLATFORM_NAME", BuildArguments(project: project, scheme: scheme))
+		.tryMap(Platform.fromString)
 }
 
 /// Builds one scheme of the given project, for all supported platforms.

	}
}

/// Creates a task description for executing `xcodebuild` in the given directory
/// and with the given arguments.
public func xcodebuildTask(arguments: [String], project: ProjectLocator? = nil, scheme: String? = nil, configuration: String? = nil, platform: Platform? = nil) -> TaskDescription {
	var args = [ "xcodebuild" ]

	if let project = project {
		args += project.arguments
	}

	if let scheme = scheme {
		args += [ "-scheme", scheme ]
	}

	if let configuration = configuration {
		args += [ "-configuration", configuration ]
	}

	if let platform = platform {
		args += platform.arguments
	}

	args += arguments
	return TaskDescription(launchPath: "/usr/bin/xcrun", arguments: args)
}

/// Sends each scheme found in the given project.
public func schemesInProject(project: ProjectLocator) -> ColdSignal<String> {
	let task = xcodebuildTask([ "-list" ], project: project)
	
	return launchTask(task)
		.map { (data: NSData) -> String in
			return NSString(data: data, encoding: NSStringEncoding(NSUTF8StringEncoding))!


/// Returns the value for the given build setting, or an error if it could not
/// be determined.
private func valueForBuildSetting(setting: String, buildArguments: BuildArguments) -> ColdSignal<String> {
	let task = xcodebuildTask("-showBuildSettings", buildArguments)

	return launchTask(task)
		.map { (data: NSData) -> String in
