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: add path property to custom event #329

Merged
merged 11 commits into from
Sep 29, 2024
Merged

feat: add path property to custom event #329

merged 11 commits into from
Sep 29, 2024

Conversation

YoloMao
Copy link
Collaborator

@YoloMao YoloMao commented Sep 27, 2024

PR 内容

  • GrowingCustomEvent 添加 path 字段,通过 customEventWithPath 配置项设置是否携带最后一个 PAGE 事件的 path
  • 移除不必要的 GrowingHybridCustomEvent

Important

注意测试 JSON/Protobuf/SwiftProtobuf 三种环境下,CustomEvent 是否正常携带 path 字段

@YoloMao
Copy link
Collaborator Author

YoloMao commented Sep 29, 2024

SwiftPM 测试步骤(20240929)

集成步骤

  1. 使用以下内容替换 Podfile 所有内容:
platform :ios, '12.0'
use_frameworks!

install!'cocoapods',:deterministic_uuids=>false, :warn_for_unused_master_specs_repo=>false

workspace 'GrowingAnalytics.xcworkspace'
project 'Example'

target 'Example' do
  pod 'SDCycleScrollView', '~> 1.75'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
    end
    if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
      target.build_configurations.each do |config|
          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
      end
    end
  end
end
  1. 执行 pod install,这将移除 demo 使用 cocoapods 集成的 GrowingAnalytics SDK
  2. 打开 GrowingAnalytics.xcworkspace,按下图步骤打开 Swift Packages 添加页面
    image
  3. 点击 Add Local... 添加本地 Package,选择已 clone 至本地的 growing-sdk-ios-autotracker 文件夹(比如当前分支,可通过指令:git clone https://github.com/growingio/growingio-sdk-ios-autotracker.git -b feat/cstm_path --depth=1),Add to project 选择 Example,之后点击 Add Package
  4. 同样的步骤,添加 growingio-sdk-ios-toolskit 文件夹 (可选)
  5. 找到 TARGETS -> Example -> Frameworks, Libraries, and Embedded Content,点击加号,添加 GrowingAutotracker
  6. 同样的步骤,添加 GrowingToolsKit (可选,需要在 Other Linker Flags 添加 -ObjC)
    image
  7. 找到 TARGETS -> ShareExtension -> Frameworks, Libraries, and Embedded Content,点击加号,添加 GrowingAutotracker
  8. 找到 TARGETS -> Example-watchOS Watch App -> Frameworks, Libraries, and Embedded Content,点击加号,添加 GrowingTracker
  9. 运行 Demo,测试在 SwiftPM 集成下,事件数据所有字段是否能够正常地在远端服务器落库

Copy link

codecov bot commented Sep 29, 2024

Codecov Report

Attention: Patch coverage is 52.77778% with 17 lines in your changes missing coverage. Please review.

Project coverage is 81.98%. Comparing base (2c03519) to head (f50bf0f).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
GrowingAutotrackerCore/Page/GrowingPageManager.m 11.76% 15 Missing ⚠️
GrowingTrackerCore/Event/GrowingCustomEvent.m 86.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #329      +/-   ##
==========================================
- Coverage   83.68%   81.98%   -1.71%     
==========================================
  Files         137      136       -1     
  Lines        8056    10181    +2125     
==========================================
+ Hits         6742     8347    +1605     
- Misses       1314     1834     +520     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Sep 29, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
52.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@YoloMao YoloMao merged commit 05a01a8 into master Sep 29, 2024
3 of 13 checks passed
@YoloMao YoloMao deleted the feat/cstm_path branch September 29, 2024 09:21
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.

4 participants