     }
 }
 
+struct TemplateStructure {
+    let baseKey: String
+    let templatesKey: String
+    let nameToReplace: String
+}
+
 extension Target: CustomStringConvertible {
 
     public var description: String {

        return merged
    }

    static func resolveSchemeTemplates(jsonDictionary: JSONDictionary) -> JSONDictionary {
        guard var schemesDictionary: [String: JSONDictionary] = jsonDictionary["schemes"] as? [String: JSONDictionary] else {
            return jsonDictionary
        }

        let schemeTemplatesDictionary: [String: JSONDictionary] = jsonDictionary["schemeTemplates"] as? [String: JSONDictionary] ?? [:]

        // Recursively collects all nested template names of a given dictionary.
        func collectTemplates(of jsonDictionary: JSONDictionary,

}

extension Target {

    static func resolveMultiplatformTargets(jsonDictionary: JSONDictionary) -> JSONDictionary {
        guard let targetsDictionary: [String: JSONDictionary] = jsonDictionary["targets"] as? [String: JSONDictionary] else {
