     
     lazy var os:OS = self.initOS() ?? OS.iOS
     private func initOS() -> OS? {
-        if let xml = self.xml, targetRuntime = xml["document"].element?.attributes["targetRuntime"] {
-            return OS.fromTargetRuntime(targetRuntime)
+        if let targetRuntime = self.xml?["document"].element?.attributes["targetRuntime"] {
+            return OS(targetRuntime: targetRuntime)
         }
         return nil
     }

}


//MARK: Functions Storyboards

func findStoryboards(rootPath: String, suffix: String) -> [String]? {
    var result = Array<String>()

for os in OS.allValues {
    var storyboardsForOS = storyboardFiles.filter { $0.os == os }
    if !storyboardsForOS.isEmpty {
        
        if storyboardsForOS.count != storyboardFiles.count {
            println("#if os(\(os.rawValue))")
        }
        
        processStoryboards(storyboardsForOS, os)
        
        if storyboardsForOS.count != storyboardFiles.count {
            println("#endif")
        }
    }
}
