             environmentVariables: profileVariables
         )
 
-        let analyzeAction = XCScheme.AnalyzeAction(buildConfiguration: scheme.analyze?.config ?? defaultConfig(of: .debug, in: project).name)
+        let analyzeAction = XCScheme.AnalyzeAction(buildConfiguration: scheme.analyze?.config ?? defaultDebugConfig.name)
 
         let archiveAction = XCScheme.ArchiveAction(
-            buildConfiguration: scheme.archive?.config ?? defaultConfig(of: .release, in: project).name,
+            buildConfiguration: scheme.archive?.config ?? defaultReleaseConfig.name,
             revealArchiveInOrganizer: scheme.archive?.revealArchiveInOrganizer ?? true,
             customArchiveName: scheme.archive?.customArchiveName,
             preActions: scheme.archive?.preActions.map(getExecutionAction) ?? [],


        let launchAction = XCScheme.LaunchAction(
            runnable: shouldExecuteOnLaunch ? productRunable : nil,
            buildConfiguration: scheme.run?.config ?? defaultConfig(of: .debug, in: project).name,
            preActions: scheme.run?.preActions.map(getExecutionAction) ?? [],
            postActions: scheme.run?.postActions.map(getExecutionAction) ?? [],
            macroExpansion: shouldExecuteOnLaunch ? nil : buildableReference,

import ProjectSpec
import XcodeProj

private func suitableConfig(for type: ConfigType, in project: Project) -> Config {
    if let defaultConfig = Config.defaultConfigs.first(where: { $0.type == type }),
        project.configs.contains(defaultConfig) {
        return defaultConfig
