         let scheme = document["Scheme"]
         lastUpgradeVersion = scheme.attributes["LastUpgradeVersion"]
         version = scheme.attributes["version"]
-        buildAction = BuildAction(element: scheme["BuildAction"])
-        testAction = TestAction(element: scheme["TestAction"])
-        launchAction = LaunchAction(element: scheme["LaunchAction"])
-        analyzeAction = AnalyzeAction(element: scheme["AnalyzeAction"])
-        archiveAction = ArchiveAction(element: scheme["ArchiveAction"])
-        profileAction = ProfileAction(element: scheme["ProfileAction"])
+        buildAction = try BuildAction(element: scheme["BuildAction"])
+        testAction = try TestAction(element: scheme["TestAction"])
+        launchAction = try LaunchAction(element: scheme["LaunchAction"])
+        analyzeAction = try AnalyzeAction(element: scheme["AnalyzeAction"])
+        archiveAction = try ArchiveAction(element: scheme["ArchiveAction"])
+        profileAction = try ProfileAction(element: scheme["ProfileAction"])
     }
     
     public init(path: Path,

            self.useCustomWorkingDirectory = useCustomWorkingDirectory
            self.debugDocumentVersioning = debugDocumentVersioning
        }
        public init(element: AEXMLElement) {
            self.buildConfiguration = element.attributes["buildConfiguration"]!
            self.shouldUseLaunchSchemeArgsEnv = element.attributes["shouldUseLaunchSchemeArgsEnv"] == "YES"
            self.savedToolIdentifier = element.attributes["savedToolIdentifier"]!
            self.useCustomWorkingDirectory = element.attributes["useCustomWorkingDirectory"] == "YES"
            self.debugDocumentVersioning = element.attributes["debugDocumentVersioning"] == "YES"
            self.buildableProductRunnable = BuildableProductRunnable(element: element["BuildableProductRunnable"])
        }
        public func xmlElement() -> AEXMLElement {
            let element = AEXMLElement(name: "ProfileAction",

            self.locationScenarioReference = locationScenarioReference
        }
        
        public init(element: AEXMLElement) throws {
            guard let buildConfiguration = element.attributes["buildConfiguration"] else { throw XCSchemeError.missing(property: "buildConfiguration") }
            guard let selectedDebuggerIdentifier = element.attributes["selectedDebuggerIdentifier"] else { throw XCSchemeError.missing(property: "selectedDebuggerIdentifier") }
            guard let selectedLauncherIdentifier = element.attributes["selectedLauncherIdentifier"] else { throw XCSchemeError.missing(property: "selectedLauncherIdentifier") }
            guard let launchStyle = element.attributes["launchStyle"] else { throw XCSchemeError.missing(property: "launchStyle") }
            guard let debugServiceExtension = element.attributes["debugServiceExtension"] else { throw XCSchemeError.missing(property: "debugServiceExtension") }
            self.buildConfiguration = buildConfiguration
            self.selectedDebuggerIdentifier = selectedDebuggerIdentifier
            self.selectedLauncherIdentifier = selectedLauncherIdentifier
            self.launchStyle = Style(rawValue: launchStyle) ?? .auto
            self.useCustomWorkingDirectory = element.attributes["useCustomWorkingDirectory"] == "YES"
            self.ignoresPersistentStateOnLaunch = element.attributes["ignoresPersistentStateOnLaunch"] == "YES"
            self.debugDocumentVersioning = element.attributes["debugDocumentVersioning"] == "YES"
            self.debugServiceExtension = debugServiceExtension
            self.allowLocationSimulation = element.attributes["allowLocationSimulation"] == "YES"
            self.buildableProductRunnable = try BuildableProductRunnable(element:  element["BuildableProductRunnable"])
            if let _ = element["LocationScenarioReference"].all?.first {
                self.locationScenarioReference = try LocationScenarioReference(element: element["LocationScenarioReference"])
            } else {
                self.locationScenarioReference = nil
            }
