Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions iOSViewHierarchy/iOSHierarchyViewer.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//

#import <Foundation/NSURL.h>
#import <UIKit/UIApplication.h>
#import <sys/socket.h>
#import <netinet/in.h>
#import <ifaddrs.h>
Expand All @@ -30,6 +31,18 @@ @implementation iOSHierarchyViewer
static HVHTTPServer *server = nil;
static HVCoreDataHandler *coreDataHandler = nil;

/// addObserver UIApplicationDidFinishLaunchingNotification auto start
/// so don't need [iOSHierarchyViewer start] at applicationDidBecomeActive
/// added by dengwu.wang
+(void)load{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(start) name:UIApplicationDidFinishLaunchingNotification object:nil];
}

-(void)dealloc{
[super dealloc];
[[NSNotificationCenter defaultCenter] removeObserver:self];
}

+ (void)logServiceAdresses
{
struct ifaddrs *interfaces = NULL;
Expand Down