Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v2 to v3+ adapter #270

Merged
merged 5 commits into from
Sep 14, 2023
Merged

feat: v2 to v3+ adapter #270

merged 5 commits into from
Sep 14, 2023

Conversation

YoloMao
Copy link
Collaborator

@YoloMao YoloMao commented Jun 27, 2023

SaaS/CDP v2 to v3+ Adapter

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #270 (8de3be5) into master (d273ca0) will increase coverage by 0.02%.
Report is 1 commits behind head on master.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #270      +/-   ##
==========================================
+ Coverage   79.37%   79.40%   +0.02%     
==========================================
  Files         127      127              
  Lines        6730     6739       +9     
==========================================
+ Hits         5342     5351       +9     
  Misses       1388     1388              
Files Changed Coverage Δ
GrowingTrackerCore/GrowingRealTracker.m 83.22% <ø> (ø)

... and 1 file with indirect coverage changes

@YoloMao
Copy link
Collaborator Author

YoloMao commented Jun 27, 2023

V2Adapter

V2Adapter 支持从 SaaS/CDP v2.x SDK 无缝升级到当前 SDK,兼容 2.x APIs 调用;只需要修改初始化代码和集成 V2Adapter 即可按照 3.x 的测量协议发送数据

  • 支持 SaaS (v2.x) to New SaaS (v3.x+),CDP (v1.x) to New CDP (v3.x+) (皆指 SDK 版本)
  • 仅支持 Cocoapods 集成
  • 不兼容同时集成了 GrowingTouch SDK 无缝升级,此场景请使用 2to3 upgrade SDK
  • 部分接口归类为 Deprecated,在 Adapter 中为空实现,按照日志提示使用新接口或不处理
  • 部分接口归类为 Unavailable,调用将报错,请按照集成文档使用新接口或删除调用

使用方式

无埋点

  1. 移除 SaaS/CDP v2.x SDK 集成,如使用 Cocoapods 集成,删除 Podfile 中对应行;如手动集成,移除对应 framework 文件
  2. 移除 SaaS/CDP v2.x SDK 初始化代码,如 [Growing startWithAccountId:...],并初始化无埋点 SDK
  3. 在您的 Podfile 文件中添加
pod 'GrowingAnalytics/V2Adapter'

打开终端,切换到项目目录,执行 pod installpod update

埋点

  1. 移除 SaaS/CDP v2.x SDK 集成,如使用 Cocoapods 集成,删除 Podfile 中对应行;如手动集成,移除对应 framework 文件
  2. 移除 SaaS/CDP v2.x SDK 初始化代码,如 [Growing startWithAccountId:...],并初始化埋点 SDK
  3. 在您的 Podfile 文件中添加
pod 'GrowingAnalytics/V2AdapterTrackOnly'

打开终端,切换到项目目录,执行 pod installpod update

迁移本地数据

如需使用 v2.x 版本的用户数据 (userId、deviceId),请在当前 SDK 初始化之前,进行迁移

#import "Growing.h"

[GrowingV2Adapter upgrade];

// 初始化 SDK
...

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 6, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

warning The version of Java (11.0.11) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@YoloMao YoloMao merged commit 8dcd2bf into master Sep 14, 2023
7 checks passed
@YoloMao YoloMao deleted the feat/2to3 branch September 14, 2023 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants