Repository navigation
fix: [SDK-5701] treat indirect attribution window as minutes - #1801
Merged
Merged
Conversation
abdulraqeeb33
approved these changes
Nov 10, 2026
abdulraqeeb33
left a comment
Contributor
There was a problem hiding this comment.
The window is stored in minutes and this is the only place it is compared. Notification and IAM both use it, and the tests fail if the conversion is removed.
One nit inline.
nan-li
approved these changes
Nov 10, 2026
The outcomes attribution window from remote params is in minutes, but lastReceivedIds compared it against a difference in seconds, so the default 24 hour window only covered about 24 minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndary Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fadi-george
force-pushed
the
fadi/sdk-5701
branch
from
November 10, 2026 20:11
e10d962 to
c848e2c
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
Convert the indirect attribution window from minutes to seconds before comparing it against notification and IAM ages.
Details
Motivation
minutes_since_displayedfrom remote params, andDEFAULT_INDIRECT_ATTRIBUTION_WINDOW(24 * 60), are in minutes.OSChannelTracker lastReceivedIdscompared that value against an elapsed time in seconds. A 60 minute window only covered 60 seconds, and the default 24 hour window only covered about 24 minutes. App opens shortly after a push came in were then UNATTRIBUTED instead of INDIRECT. Android already does this conversion (ChannelTracker.kt,indirectAttributionWindow * 60 * 1000L).Fixes SDK-5701. Same symptom as SDK-4619.
Scope
OSChannelTracker. The notification and IAM trackers both inherit it, so both channels are fixed.Testing
Unit testing
Added
ChannelTrackerAttributionWindowTestswith a 60 minute window:All four fail without the fix.
+[NSDate date]is swizzled byNSDateOverriderin the UnitTests bundle, so the tests set that clock explicitly (added to the bridging header). FullUnitTestApp_TestPlan_Reducedpasses locally (667 tests).Manual testing
Side by side on two iOS simulators running the demo app (
examples/demo) against app0acec4d1-...with a 60 minute influenced window (minutes_since_displayed: 60). One sim was built frommain, the other from this branch. Both apps were killed, received the same push without tapping it, and were opened from the icon about 21 minutes later, then backgrounded.mainos__session_durationrequestdirect: false, nonotification_idsdirect: false,notification_ids: [<push id>]On
mainthe 21 minute old push fell outside the effective 60 second window. With the fix it is inside the 60 minute window.Affected code checklist
Checklist
Overview
Testing
Final pass
🤖 Generated with Claude Code