Skip to content

Commit

Permalink
Dispatch install event tracking on internal queue
Browse files Browse the repository at this point in the history
  • Loading branch information
matus-tomlein committed Nov 14, 2023
1 parent d2b2408 commit 5d2f58d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
uses: kishikawakatsumi/xcresulttool@v1
with:
path: TestResults.xcresult
title: Test results: ${{ matrix.name }}
title: "Test results: ${{ matrix.name }}"
if: success() || failure()

build_objc_demo_app:
Expand Down
6 changes: 4 additions & 2 deletions Sources/Core/Tracker/Tracker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,9 @@ class Tracker: NSObject {

private func checkInstall() {
if installEvent {
DispatchQueue.global(qos: .default).async { [weak self] in
InternalQueue.async { [weak self] in
guard let self = self else { return }

let installTracker = InstallTracker()
let previousTimestamp = installTracker.previousInstallTimestamp
installTracker.clearPreviousInstallTimestamp()
Expand All @@ -305,7 +307,7 @@ class Tracker: NSObject {
let installEvent = SelfDescribingJson(schema: kSPApplicationInstallSchema, andDictionary: data)
let event = SelfDescribing(eventData: installEvent)
event.trueTimestamp = previousTimestamp // it can be nil
let _ = self?.track(event)
let _ = self.track(event)
}
}
}
Expand Down

0 comments on commit 5d2f58d

Please sign in to comment.