Skip to content

Commit

Permalink
fix: Native侧默认不采集h5指令。
Browse files Browse the repository at this point in the history
  • Loading branch information
Hulk committed May 12, 2021
1 parent 48976e2 commit 92f79c1
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DiDiPrism.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |spec|
#

spec.name = "DiDiPrism"
spec.version = "0.0.6"
spec.version = "0.1.0"
spec.summary = "一款专注移动端操作行为的工具"

# This description is used to generate tags and improve search results.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (BOOL)canUpload;
/*
是否可以上报H5页面指令。
是否可以上报H5页面指令。
*/
- (BOOL)canH5Upload;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ - (void)addInstruction:(NSString*)instruction withEventParams:(NSDictionary*)eve
if (!instruction.length) {
return;
}
// TODO: 构造通知器
[[NSNotificationCenter defaultCenter] postNotificationName:@"prism_new_instruction_notification" object:nil userInfo:@{@"instruction":instruction, @"params":eventParams.allKeys.count ? eventParams : @{}}];
}

Expand All @@ -76,7 +75,6 @@ - (void)addRequestInfoWithUrl:(NSString *)url traceId:(NSString *)traceId {
return;
}
dispatch_async(dispatch_get_main_queue(), ^{
// TODO: 构造通知器
[[NSNotificationCenter defaultCenter] postNotificationName:@"prism_new_request_notification" object:nil userInfo:@{@"url":url, @"traceId":traceId}];
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

#import "PrismTapGestureInstructionGenerator.h"
#import "PrismBehaviorRecordManager.h"
#import "PrismInstructionDefines.h"
// Util
#import "PrismInstructionResponseChainUtil.h"
Expand Down Expand Up @@ -37,8 +36,7 @@ + (NSString*)getInstructionOfTapGesture:(UITapGestureRecognizer*)tapGesture {
NSString *responseChainInfo = [tapGesture autoDotResponseChainInfo];
NSString *areaInfo = [tapGesture autoDotAreaInfo];
// 屏蔽Native侧的H5页面点击指令
if ([[PrismBehaviorRecordManager sharedManager] canH5Upload] &&
([areaInfo containsString:@"WKScrollView"] || [areaInfo containsString:@"WKContentView"])) {
if (([areaInfo containsString:@"WKScrollView"] || [areaInfo containsString:@"WKContentView"])) {
return nil;
}
NSString *functionName = [self getFunctionNameOfTapGesture:tapGesture];
Expand Down
1 change: 0 additions & 1 deletion iOS/DiDiPrism/Src/Util/PrismRuntimeUtil.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

#import "PrismRuntimeUtil.h"
#import "PrismBehaviorRecordManager.h"

@implementation PrismRuntimeUtil
+ (void)hookClass:(Class)cls originalSelector:(SEL)originalSelector swizzledSelector:(SEL)swizzledSelector {
Expand Down

0 comments on commit 92f79c1

Please sign in to comment.