@@ -19,7 +19,7 @@ import Foundation
19
19
}
20
20
21
21
let frames = ( appleCrashTreadBacktraceDict [ " contents " ] as? [ [ String : AnyObject ] ] ) ?
22
- . flatMap ( { Frame ( appleCrashFrameDict: $0, binaryImages: binaryImages) } )
22
+ . flatMap ( { Frame ( appleCrashFrameDict: $0, binaryImages: binaryImages) } )
23
23
self . init ( frames: frames)
24
24
25
25
}
@@ -33,8 +33,13 @@ import Foundation
33
33
extension Stacktrace : EventSerializable {
34
34
internal typealias SerializedType = SerializedTypeDictionary
35
35
internal var serialized : SerializedType {
36
+ #if swift(>=3.0)
36
37
return [ : ]
37
- . set ( " frames " , value: frames. map ( { $0. serialized} ) )
38
+ . set ( " frames " , value: frames. reversed ( ) . map ( { $0. serialized } ) )
39
+ #else
40
+ return [ : ]
41
+ . set ( " frames " , value: frames. reverse ( ) . map ( { $0. serialized } ) )
42
+ #endif
38
43
}
39
44
}
40
45
@@ -50,7 +55,6 @@ extension Stacktrace: EventSerializable {
50
55
public var platform : String ?
51
56
public var instructionAddress : String ?
52
57
public var symbolAddress : String ?
53
- public var inApp : Bool ?
54
58
55
59
var fileName : String ? {
56
60
guard let file = file else { return nil }
@@ -85,12 +89,6 @@ extension Stacktrace: EventSerializable {
85
89
self . init ( )
86
90
87
91
self . function = frameDict [ " symbol_name " ] as? String
88
-
89
- #if swift(>=3.0)
90
- self . inApp = binaryImage. name? . contains ( " /Bundle/Application/ " ) ?? false
91
- #else
92
- self . inApp = binaryImage. name? . containsString ( " /Bundle/Application/ " ) ?? false
93
- #endif
94
92
self . package = binaryImage. name
95
93
96
94
self . imageAddress = BinaryImage . getHexAddress ( binaryImage. imageAddress)
@@ -117,7 +115,6 @@ extension Frame: EventSerializable {
117
115
attributes. append ( ( " image_addr " , imageAddress) )
118
116
attributes. append ( ( " instruction_addr " , instructionAddress) )
119
117
attributes. append ( ( " symbol_addr " , symbolAddress) )
120
- attributes. append ( ( " in_app " , inApp) )
121
118
122
119
return convertAttributes ( attributes)
123
120
}
0 commit comments