Skip to content

Commit

Permalink
fix: xcontent in list (#287)
Browse files Browse the repository at this point in the history
* fix: xcontent in list

* style: code format

* chore: pod dependency version limit

* chore: update podfile lock

* chore: 修改 beta 版本判断

* feat: release 4.0.0-beta.1

* chore: update podfile lock

---------

Co-authored-by: GIOSDK <[email protected]>
  • Loading branch information
YoloMao and GIOSDK authored Oct 26, 2023
1 parent 0de68d1 commit 569f7ca
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 100 deletions.
142 changes: 71 additions & 71 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
PODS:
- GrowingAnalytics/Advert (4.0.0-beta):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta)
- GrowingAnalytics/APM (4.0.0-beta):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta)
- GrowingAPM/Core
- GrowingAnalytics/Autotracker (4.0.0-beta):
- GrowingAnalytics/AutotrackerCore (= 4.0.0-beta)
- GrowingAnalytics/DefaultServices (= 4.0.0-beta)
- GrowingAnalytics/Hybrid (= 4.0.0-beta)
- GrowingAnalytics/MobileDebugger (= 4.0.0-beta)
- GrowingAnalytics/WebCircle (= 4.0.0-beta)
- GrowingAnalytics/AutotrackerCore (4.0.0-beta):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta)
- GrowingUtils/AutotrackerCore (= 1.0.0)
- GrowingAnalytics/Compression (4.0.0-beta):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta)
- GrowingAnalytics/Database (4.0.0-beta):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta)
- GrowingAnalytics/DefaultServices (4.0.0-beta):
- GrowingAnalytics/Compression (= 4.0.0-beta)
- GrowingAnalytics/Encryption (= 4.0.0-beta)
- GrowingAnalytics/JSON (= 4.0.0-beta)
- GrowingAnalytics/Network (= 4.0.0-beta)
- GrowingAnalytics/Protobuf (= 4.0.0-beta)
- GrowingAnalytics/TrackerCore (= 4.0.0-beta)
- GrowingAnalytics/Encryption (4.0.0-beta):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta)
- GrowingAnalytics/Hybrid (4.0.0-beta):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta)
- GrowingAnalytics/ImpressionTrack (4.0.0-beta):
- GrowingAnalytics/AutotrackerCore (= 4.0.0-beta)
- GrowingAnalytics/JSON (4.0.0-beta):
- GrowingAnalytics/Database (= 4.0.0-beta)
- GrowingAnalytics/MobileDebugger (4.0.0-beta):
- GrowingAnalytics/Screenshot (= 4.0.0-beta)
- GrowingAnalytics/TrackerCore (= 4.0.0-beta)
- GrowingAnalytics/WebSocket (= 4.0.0-beta)
- GrowingAnalytics/Network (4.0.0-beta):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta)
- GrowingAnalytics/Protobuf (4.0.0-beta):
- GrowingAnalytics/Database (= 4.0.0-beta)
- GrowingAnalytics/Protobuf/Proto (= 4.0.0-beta)
- GrowingAnalytics/Protobuf/Proto (4.0.0-beta):
- GrowingAnalytics/Database (= 4.0.0-beta)
- GrowingAnalytics/Advert (4.0.0-beta.1):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
- GrowingAnalytics/APM (4.0.0-beta.1):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
- GrowingAPM/Core (~> 1.0.0)
- GrowingAnalytics/Autotracker (4.0.0-beta.1):
- GrowingAnalytics/AutotrackerCore (= 4.0.0-beta.1)
- GrowingAnalytics/DefaultServices (= 4.0.0-beta.1)
- GrowingAnalytics/Hybrid (= 4.0.0-beta.1)
- GrowingAnalytics/MobileDebugger (= 4.0.0-beta.1)
- GrowingAnalytics/WebCircle (= 4.0.0-beta.1)
- GrowingAnalytics/AutotrackerCore (4.0.0-beta.1):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
- GrowingUtils/AutotrackerCore (~> 1.0.0)
- GrowingAnalytics/Compression (4.0.0-beta.1):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
- GrowingAnalytics/Database (4.0.0-beta.1):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
- GrowingAnalytics/DefaultServices (4.0.0-beta.1):
- GrowingAnalytics/Compression (= 4.0.0-beta.1)
- GrowingAnalytics/Encryption (= 4.0.0-beta.1)
- GrowingAnalytics/JSON (= 4.0.0-beta.1)
- GrowingAnalytics/Network (= 4.0.0-beta.1)
- GrowingAnalytics/Protobuf (= 4.0.0-beta.1)
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
- GrowingAnalytics/Encryption (4.0.0-beta.1):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
- GrowingAnalytics/Hybrid (4.0.0-beta.1):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
- GrowingAnalytics/ImpressionTrack (4.0.0-beta.1):
- GrowingAnalytics/AutotrackerCore (= 4.0.0-beta.1)
- GrowingAnalytics/JSON (4.0.0-beta.1):
- GrowingAnalytics/Database (= 4.0.0-beta.1)
- GrowingAnalytics/MobileDebugger (4.0.0-beta.1):
- GrowingAnalytics/Screenshot (= 4.0.0-beta.1)
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
- GrowingAnalytics/WebSocket (= 4.0.0-beta.1)
- GrowingAnalytics/Network (4.0.0-beta.1):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
- GrowingAnalytics/Protobuf (4.0.0-beta.1):
- GrowingAnalytics/Database (= 4.0.0-beta.1)
- GrowingAnalytics/Protobuf/Proto (= 4.0.0-beta.1)
- GrowingAnalytics/Protobuf/Proto (4.0.0-beta.1):
- GrowingAnalytics/Database (= 4.0.0-beta.1)
- Protobuf (>= 3.22.0)
- GrowingAnalytics/Screenshot (4.0.0-beta):
- GrowingAnalytics/Screenshot (4.0.0-beta.1):
- GrowingAnalytics/TrackerCore
- GrowingAnalytics/Tracker (4.0.0-beta):
- GrowingAnalytics/DefaultServices (= 4.0.0-beta)
- GrowingAnalytics/MobileDebugger (= 4.0.0-beta)
- GrowingAnalytics/TrackerCore (= 4.0.0-beta)
- GrowingAnalytics/TrackerCore (4.0.0-beta):
- GrowingUtils/TrackerCore (= 1.0.0)
- GrowingAnalytics/WebCircle (4.0.0-beta):
- GrowingAnalytics/AutotrackerCore (= 4.0.0-beta)
- GrowingAnalytics/Hybrid (= 4.0.0-beta)
- GrowingAnalytics/Screenshot (= 4.0.0-beta)
- GrowingAnalytics/WebSocket (= 4.0.0-beta)
- GrowingAnalytics/WebSocket (4.0.0-beta):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta)
- GrowingAPM (0.0.15):
- GrowingAPM/Core (= 0.0.15)
- GrowingAPM/CrashMonitor (= 0.0.15)
- GrowingAPM/UIMonitor (= 0.0.15)
- GrowingAPM/Core (0.0.15):
- GrowingAnalytics/Tracker (4.0.0-beta.1):
- GrowingAnalytics/DefaultServices (= 4.0.0-beta.1)
- GrowingAnalytics/MobileDebugger (= 4.0.0-beta.1)
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
- GrowingAnalytics/TrackerCore (4.0.0-beta.1):
- GrowingUtils/TrackerCore (~> 1.0.0)
- GrowingAnalytics/WebCircle (4.0.0-beta.1):
- GrowingAnalytics/AutotrackerCore (= 4.0.0-beta.1)
- GrowingAnalytics/Hybrid (= 4.0.0-beta.1)
- GrowingAnalytics/Screenshot (= 4.0.0-beta.1)
- GrowingAnalytics/WebSocket (= 4.0.0-beta.1)
- GrowingAnalytics/WebSocket (4.0.0-beta.1):
- GrowingAnalytics/TrackerCore (= 4.0.0-beta.1)
- GrowingAPM (1.0.0):
- GrowingAPM/Core (= 1.0.0)
- GrowingAPM/CrashMonitor (= 1.0.0)
- GrowingAPM/UIMonitor (= 1.0.0)
- GrowingAPM/Core (1.0.0):
- GrowingUtils/TrackerCore
- GrowingAPM/CrashMonitor (0.0.15):
- GrowingAPM/CrashMonitor (1.0.0):
- GrowingAPM/Core
- GrowingAPM/UIMonitor (0.0.15):
- GrowingAPM/UIMonitor (1.0.0):
- GrowingAPM/Core
- GrowingToolsKit (1.2.1):
- GrowingToolsKit/Default (= 1.2.1)
Expand Down Expand Up @@ -117,9 +117,9 @@ PODS:
- Protobuf (3.24.4)
- SDCycleScrollView (1.82):
- SDWebImage (>= 5.0.0)
- SDWebImage (5.18.2):
- SDWebImage/Core (= 5.18.2)
- SDWebImage/Core (5.18.2)
- SDWebImage (5.18.3):
- SDWebImage/Core (= 5.18.3)
- SDWebImage/Core (5.18.3)

DEPENDENCIES:
- GrowingAnalytics/Advert (from `../`)
Expand Down Expand Up @@ -150,15 +150,15 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
GrowingAnalytics: 7f5da039bce1b155fb10e2d5699049a4b984fb1a
GrowingAPM: 83118328af06eec2a987f47b8e62a9d6d986994c
GrowingAnalytics: 1bb25325883e2c4bec0d1b8e1d9e6540185d88e8
GrowingAPM: 6750d66ca6876c2c7d22c1c087625bc9ccc3430c
GrowingToolsKit: 134a78b023c4ab7da51e0a1111e9956a96e42dab
GrowingUtils: f0a9858cfd15dc584367957f24a784813a68d637
KIF: 7660c626b0f2d4562533590960db70a36d640558
LBXScan: e51449f0832d1fe17da632af0d22adeb3cfa3543
Protobuf: 351e9022fe13a6e2af00e9aefc22077cb88520f8
SDCycleScrollView: a0d74c3384caa72bdfc81470bdbc8c14b3e1fbcf
SDWebImage: c0de394d7cf7f9838aed1fd6bb6037654a4572e4
SDWebImage: 96e0c18ef14010b7485210e92fac888587ebb958

PODFILE CHECKSUM: eadc8a2cddef5401cfafd1d713a6bacab48232e6

Expand Down
8 changes: 4 additions & 4 deletions GrowingAnalytics.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'GrowingAnalytics'
s.version = '4.0.0-beta'
s.version = '4.0.0-beta.1'
s.summary = 'iOS SDK of GrowingIO.'
s.description = <<-DESC
GrowingAnalytics具备自动采集基本的用户行为事件,比如访问和行为数据等。目前支持代码埋点、无埋点、可视化圈选、热图等功能。
Expand Down Expand Up @@ -40,7 +40,7 @@ GrowingAnalytics具备自动采集基本的用户行为事件,比如访问和
end

s.subspec 'TrackerCore' do |trackerCore|
trackerCore.dependency 'GrowingUtils/TrackerCore', '1.0.0'
trackerCore.dependency 'GrowingUtils/TrackerCore', '~> 1.0.0'
trackerCore.source_files = 'GrowingTrackerCore/**/*{.h,.m,.c,.cpp,.mm}'
trackerCore.public_header_files = 'GrowingTrackerCore/Public/*.h'
trackerCore.ios.resource_bundles = {'GrowingAnalytics' => ['Resources/iOS/GrowingAnalytics.bundle/PrivacyInfo.xcprivacy']}
Expand All @@ -50,7 +50,7 @@ GrowingAnalytics具备自动采集基本的用户行为事件,比如访问和

s.subspec 'AutotrackerCore' do |autotrackerCore|
autotrackerCore.ios.deployment_target = '10.0'
autotrackerCore.dependency 'GrowingUtils/AutotrackerCore', '1.0.0'
autotrackerCore.dependency 'GrowingUtils/AutotrackerCore', '~> 1.0.0'
autotrackerCore.source_files = 'GrowingAutotrackerCore/**/*{.h,.m,.c,.cpp,.mm}'
autotrackerCore.public_header_files = 'GrowingAutotrackerCore/Public/*.h'
autotrackerCore.dependency 'GrowingAnalytics/TrackerCore', s.version.to_s
Expand Down Expand Up @@ -171,7 +171,7 @@ GrowingAnalytics具备自动采集基本的用户行为事件,比如访问和
apm.source_files = 'Modules/APM/**/*{.h,.m,.c,.cpp,.mm}'
apm.public_header_files = 'Modules/APM/Public/*.h'
apm.dependency 'GrowingAnalytics/TrackerCore', s.version.to_s
apm.dependency 'GrowingAPM/Core'
apm.dependency 'GrowingAPM/Core', '~> 1.0.0'
end

s.subspec 'V2Adapter' do |adapter|
Expand Down
10 changes: 7 additions & 3 deletions GrowingAutotrackerCore/GrowingNode/GrowingNodeHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,21 @@ + (void)recalculateXpath:(UIView *)view
NSMutableArray *viewPathArray = [NSMutableArray array];
NSMutableArray *xcontentArray = [NSMutableArray array];
NSMutableArray *originxcontentArray = [NSMutableArray array];
BOOL isSimilar = YES;
BOOL hasSimilarIndexInside = NO;
while (node && [node isKindOfClass:[UIView class]]) {
if ([self isIgnoredPrivateView:node]) {
node = node.growingNodeParent;
continue;
}

BOOL isSimilar = [node isKindOfClass:[UITableViewCell class]] ||
[node isKindOfClass:[UICollectionReusableView class]] ||
[node isKindOfClass:NSClassFromString(@"UISegment")];

[originxcontentArray addObject:node.growingNodeSubIndex];
if (isSimilar) {
if (isSimilar && !hasSimilarIndexInside) {
[xcontentArray addObject:node.growingNodeSubSimilarIndex];
isSimilar = NO;
hasSimilarIndexInside = YES;
} else {
[xcontentArray addObject:node.growingNodeSubIndex];
}
Expand Down
21 changes: 13 additions & 8 deletions GrowingAutotrackerCore/GrowingNode/GrowingViewNode.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,19 @@ - (GrowingViewNode *)appendNode:(UIView *)view isRecalculate:(BOOL)recalculate {
NSString *uniqueTag = view.growingUniqueTag;
BOOL hasUniqueTag = uniqueTag && uniqueTag.length > 0;
BOOL isBreak = self.isBreak || hasUniqueTag;
NSString *xpath = hasUniqueTag ? [NSString stringWithFormat:@"/%@", uniqueTag]
: [self.xpath stringByAppendingFormat:@"/%@", view.growingNodeSubPath];
NSString *xcontent = hasUniqueTag
? [NSString stringWithFormat:@"/%@", view.growingNodeSubSimilarIndex]
: [self.originxcontent stringByAppendingFormat:@"/%@", view.growingNodeSubSimilarIndex];
NSString *originxcontent = hasUniqueTag
? [NSString stringWithFormat:@"/%@", view.growingNodeSubIndex]
: [self.originxcontent stringByAppendingFormat:@"/%@", view.growingNodeSubIndex];
NSString *xpath = nil;
NSString *xcontent = nil;
NSString *originxcontent = nil;
if (hasUniqueTag) {
xpath = [NSString stringWithFormat:@"/%@", uniqueTag];
xcontent = [NSString stringWithFormat:@"/%@", view.growingNodeSubSimilarIndex];
originxcontent = [NSString stringWithFormat:@"/%@", view.growingNodeSubIndex];
} else {
xpath = [self.xpath stringByAppendingFormat:@"/%@", view.growingNodeSubPath];
xcontent = isSimilar ? [self.originxcontent stringByAppendingFormat:@"/%@", view.growingNodeSubSimilarIndex]
: [self.xcontent stringByAppendingFormat:@"/%@", view.growingNodeSubSimilarIndex];
originxcontent = [self.originxcontent stringByAppendingFormat:@"/%@", view.growingNodeSubIndex];
}
NSString *parentXpath = self.view.growingNodeUserInteraction ? self.xpath : self.clickableParentXpath;
NSString *parentXcontent = self.view.growingNodeUserInteraction ? self.xcontent : self.clickableParentXcontent;
NSString *content = view.growingNodeContent;
Expand Down
2 changes: 1 addition & 1 deletion GrowingTrackerCore/GrowingRealTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#import "GrowingTrackerCore/Utils/GrowingDeviceInfo.h"
#import "GrowingULAppLifecycle.h"

NSString *const GrowingTrackerVersionName = @"4.0.0-beta";
NSString *const GrowingTrackerVersionName = @"4.0.0-beta.1";
const int GrowingTrackerVersionCode = 40000;

@interface GrowingRealTracker ()
Expand Down
21 changes: 9 additions & 12 deletions scripts/cocoapods-beta.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
#!/bin/bash
set -x

POD_BETA_VERSOIN=`cat GrowingAnalytics.podspec | grep 's.version\s*=' | grep -Eo '[0-9]+.[0-9]+.[0-9]+'-beta`
BETA='beta'
POD_BETA_VERSION=`cat GrowingAnalytics.podspec | grep 's.version\s*=' | grep -Eo '[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'`

if [[ $POD_BETA_VERSOIN == *$BETA* ]]
then
if [ ! -n "$POD_BETA_VERSION" ] ;then
echo "spec文件中,版本号包含beta,且配置正确,继续"
else
echo "spec文件中,版本号配置beta错误,无法进行beta版本发布"
exit 0;
exit 1
fi

TAG_VERSION=$(git tag | grep $POD_BETA_VERSOIN)
TAG_VERSION=$(git tag | grep $POD_BETA_VERSION)

if [ ! -n "$TAG_VERSION" ] ;then
echo "Tag not exist, continue"
else
echo "Tag already exist"
git tag -d $POD_BETA_VERSOIN
git push origin -d tag $POD_BETA_VERSOIN
git tag -d $POD_BETA_VERSION
git push origin -d tag $POD_BETA_VERSION
echo "Tag removed"
echo "删除trunk上的cocoapods库"
echo y | pod trunk delete GrowingAnalytics $POD_BETA_VERSION
fi

echo "删除trunk上的cocoapods库"
echo y | pod trunk delete GrowingAnalytics $POD_BETA_VERSOIN

git tag $POD_BETA_VERSOIN
git tag $POD_BETA_VERSION
git push --tags

pod trunk push GrowingAnalytics.podspec --allow-warnings --use-libraries
2 changes: 1 addition & 1 deletion scripts/update_version.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NEW_VERSION=$@

REGEX1="[0-9]+\\.[0-9]+\\.[0-9]+((-hotfix.[0-9]+)|-beta)*"
REGEX1="[0-9]+\\.[0-9]+\\.[0-9]+(-(hotfix|beta).[0-9]+)?"
REGEX2="[0-9]+"
SDK_VERSION_FILE1=./GrowingTrackerCore/GrowingRealTracker.m
SDK_VERSION_FILE2=./GrowingAnalytics.podspec
Expand Down

0 comments on commit 569f7ca

Please sign in to comment.