@@ -41,8 +41,8 @@ struct XcodeDatabase {
4141 let value = data [ key] as? [ String : AnyObject ] ,
4242 let schemeName = value [ " schemeIdentifier-schemeName " ] as? String ,
4343 let title = value [ " title " ] as? String ,
44- let timeStartedRecording = value [ " timeStartedRecording " ] as? Int ,
45- let timeStoppedRecording = value [ " timeStoppedRecording " ] as? Int ,
44+ let timeStartedRecording = value [ " timeStartedRecording " ] as? NSNumber ,
45+ let timeStoppedRecording = value [ " timeStoppedRecording " ] as? NSNumber ,
4646 let fileAttributes = try ? FileManager . default. attributesOfItem ( atPath: path) ,
4747 let modificationDate = fileAttributes [ FileAttributeKey . modificationDate] as? Date
4848 else { return nil }
@@ -52,8 +52,8 @@ struct XcodeDatabase {
5252 self . key = key
5353 self . schemeName = schemeName
5454 self . title = title
55- self . timeStartedRecording = timeStartedRecording
56- self . timeStoppedRecording = timeStoppedRecording
55+ self . timeStartedRecording = timeStartedRecording. intValue
56+ self . timeStoppedRecording = timeStoppedRecording. intValue
5757 }
5858
5959 func processLog( ) -> String ? {
@@ -68,8 +68,8 @@ struct XcodeDatabase {
6868 var sortedKeys : [ ( Int , key: String ) ] = [ ]
6969 for key in data. keys {
7070 if let value = data [ key] as? [ String : AnyObject ] ,
71- let timeStoppedRecording = value [ " timeStoppedRecording " ] as? Int {
72- sortedKeys. append ( ( timeStoppedRecording, key) )
71+ let timeStoppedRecording = value [ " timeStoppedRecording " ] as? NSNumber {
72+ sortedKeys. append ( ( timeStoppedRecording. intValue , key) )
7373 }
7474 }
7575 return sortedKeys. sorted { $0. 0 < $1. 0 }
0 commit comments