Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions StreetHawk/Classes/Core/Publish/SHApp.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#import "SHFriendlyNameObject.h"
#import "SHUtils.h"
#import "SHHTTPSessionManager.h" //for set header "X-Installid"
#import "SHBaseViewController.h" //for aspect
//header from System
#import <CoreSpotlight/CoreSpotlight.h> //for spotlight search
#import <MobileCoreServices/MobileCoreServices.h> //for kUTTypeImage
Expand Down Expand Up @@ -360,6 +361,8 @@ - (void)registerInstallForApp:(nonnull NSString *)appKey withDebugMode:(BOOL)isD
{
action();
}
//aspect view controller
[StreetHawkViewControllerSwizzle aspect];
}

- (void)registerInstallForApp:(nonnull NSString *)appKey segmentId:(NSString *)segmentId withDebugMode:(BOOL)isDebugMode
Expand Down
19 changes: 11 additions & 8 deletions StreetHawk/Classes/Core/Publish/SHBaseViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,21 @@
@end

/**
Base class for all view controller inherit from UIViewController. It sends logs when enter/exit this VC.
Method to aspect StreetHawk related functions into normal view controller.
*/
@interface StreetHawkViewControllerSwizzle : NSObject

+ (void)aspect;

@end

/**
Keep StreetHawk base vc classes for compatibility.
*/
@interface StreetHawkBaseViewController : UIViewController <ISHDeepLinking>

/**
Some customer view controller may be inherited not in purpose (such as base vc do inherit).
Some customer view controller may be inherited not in purpose (such as base vc do inherit).
Use this property to exclude them from being treated as StreetHawk behavior vc.
*/
@property (nonatomic) BOOL excludeBehavior;
Expand All @@ -70,9 +79,6 @@

@end

/**
Base class for all view controller inherit from UITableViewController. It sends logs when enter/exit this VC.
*/
@interface StreetHawkBaseTableViewController : UITableViewController <ISHDeepLinking>

/**
Expand All @@ -88,9 +94,6 @@

@end

/**
Base class for all view controller inherit from UICollectionViewController. It sends logs when enter/exit this VC.
*/
@interface StreetHawkBaseCollectionViewController : UICollectionViewController <ISHDeepLinking>

/**
Expand Down
Loading