-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
王洋洋
committed
Jun 30, 2022
1 parent
018c20a
commit 48933bd
Showing
178 changed files
with
6,926 additions
and
2,469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
SensorsAnalyticsSDK/ChannelMatch/SAChannelInfoPropertyPlugin.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// SAChannelInfoPropertyPlugin.h | ||
// SensorsAnalyticsSDK | ||
// | ||
// Created by 储强盛 on 2022/4/26. | ||
// Copyright © 2015-2022 Sensors Data Co., Ltd. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "SAPropertyPlugin.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/// 渠道属性插件 | ||
@interface SAChannelInfoPropertyPlugin : SAPropertyPlugin | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
54 changes: 54 additions & 0 deletions
54
SensorsAnalyticsSDK/ChannelMatch/SAChannelInfoPropertyPlugin.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// | ||
// SAChannelInfoPropertyPlugin.m | ||
// SensorsAnalyticsSDK | ||
// | ||
// Created by 储强盛 on 2022/4/26. | ||
// Copyright © 2015-2022 Sensors Data Co., Ltd. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
#if ! __has_feature(objc_arc) | ||
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file. | ||
#endif | ||
|
||
#import "SAChannelInfoPropertyPlugin.h" | ||
#import "SAPropertyPlugin+SAPrivate.h" | ||
#import "SAConstants+Private.h" | ||
#import "SAModuleManager.h" | ||
#import "SATrackEventObject.h" | ||
|
||
@implementation SAChannelInfoPropertyPlugin | ||
|
||
- (BOOL)isMatchedWithFilter:(id<SAPropertyPluginEventFilter>)filter { | ||
// 不支持 H5 打通事件 | ||
// 开启 enableAutoAddChannelCallbackEvent 后,只有手动 track 事件包含渠道信息 | ||
if ([filter hybridH5] || ![filter isKindOfClass:SACustomEventObject.class]) { | ||
return NO; | ||
} | ||
|
||
return filter.type & SAEventTypeTrack; | ||
} | ||
|
||
- (SAPropertyPluginPriority)priority { | ||
return SAPropertyPluginPriorityLow; | ||
} | ||
|
||
- (NSDictionary<NSString *,id> *)properties { | ||
if (!self.filter) { | ||
return nil; | ||
} | ||
|
||
return [SAModuleManager.sharedInstance channelInfoWithEvent:self.filter.event]; | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.