File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ let package = Package(
1717 targets: [
1818 . target(
1919 name: " KIF " ,
20- dependencies: [ ] ,
20+ dependencies: [ " KIFSwift " ] ,
2121 publicHeadersPath: " include " ,
2222 cSettings: [
2323 . headerSearchPath( " ApplePrivateAPIs/ " ) ,
@@ -28,6 +28,10 @@ let package = Package(
2828 ] ,
2929 linkerSettings: [ . linkedFramework( " IOKit " ) , . linkedFramework( " XCTest " ) ]
3030 ) ,
31+ . target(
32+ name: " KIFSwift " ,
33+ dependencies: [ ] ,
34+ ) ,
3135 . testTarget(
3236 name: " KIFTests " ,
3337 dependencies: [ " KIF " ] ,
Original file line number Diff line number Diff line change 99#import " KIFEventVisualizer.h"
1010#import " KIFTouchVisualizerView.h"
1111#import < Foundation/Foundation.h>
12+ @import KIFSwift;
1213
1314@implementation UIView (Debugging)
1415
@@ -94,7 +95,7 @@ - (void)_KIF_appendIndentation:(int)indent result:(NSMutableString *)result{
9495}
9596
9697- (void )_KIF_appendClassName : (NSMutableString *)result {
97- [result appendString: NSStringFromClass ([ self class ]) ];
98+ [result appendString: [ NSObject _kif_typeNameOfObject: self qualified: YES ] ];
9899}
99100
100101- (void )_KIF_appendAccessibilityInfo : (NSMutableString *)result {
Original file line number Diff line number Diff line change 1+ import Foundation
2+
3+ extension NSObject {
4+ /// Return a demangled type name for a given object.
5+ /// If `qualified` is `true`, Swift types will produce a qualified type name
6+ @objc ( _kif_typeNameOfObject: qualified: )
7+ public static func _kif_typeName( object: Any , qualified: Bool ) -> String {
8+ let meta = type ( of: object)
9+ if qualified {
10+ return String ( reflecting: meta)
11+ } else {
12+ return String ( describing: meta)
13+ }
14+ }
15+ }
You can’t perform that action at this time.
0 commit comments