fix: Guard against nil customerID in AppsFlyer updateCustomerUserIDIfNeededForUser#694
Conversation
PR SummaryLow Risk Overview Adds a Written by Cursor Bugbot for commit 280d922. This will update automatically on new commits. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
📦 SDK Size Impact ReportMeasures how much the SDK adds to an app's size (with-SDK minus without-SDK).
➡️ SDK size impact change is minimal. Raw measurementsTarget branch (workstation/9.0-Release): {"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1788,"with_sdk_executable_size_bytes":76360,"sdk_impact_kb":1704,"sdk_executable_impact_bytes":896,"xcframework_size_kb":5604}This PR: {"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1788,"with_sdk_executable_size_bytes":76360,"sdk_impact_kb":1704,"sdk_executable_impact_bytes":896,"xcframework_size_kb":5604} |
cdf0c99 to
a9dc7f2
Compare
…lback tests Revert to customerId.length guard per AppsFlyer's documented pattern of skipping setCustomerUserID when no valid CUID is available, rather than passing an empty string. Add unit tests for identity lifecycle callbacks (onIdentifyComplete, onLoginComplete, onLogoutComplete, onModifyComplete) covering MPID mode, CustomerId mode, legacy mode, and nil/empty scenarios. Made-with: Cursor
a9dc7f2 to
280d922
Compare

Background
updateCustomerUserIDIfNeededForUser:potentially passing nil to AppsFlyer'ssetCustomerUserID:.What Has Changed
setCustomerUserID:withcustomerId.lengthso it is only called when a valid, non-empty CUID is available, consistent with the existing guard pattern used inrouteCommerceEvent:androuteEvent:FilteredMParticleUserMockfor testing identity lifecycle callbacksonIdentifyComplete,onLoginComplete,onLogoutComplete, andonModifyCompletecovering MPID mode, CustomerId mode, legacy mode, and nil/empty CUID scenariosChecklist
Reference Issue (For employees only. Ignore if you are an outside contributor)