Closed nan-li closed 1 year ago
I think this was a change that we might've ended up reverting because it caused other issues. Could you check the current state of main? Is this change there or was it reverted?
Main contains these same changes. It was this PR https://github.com/OneSignal/OneSignal-iOS-SDK/pull/1240 that was reverted in https://github.com/OneSignal/OneSignal-iOS-SDK/pull/1251.
Description
One Line Summary
Cherry-pick of https://github.com/OneSignal/OneSignal-iOS-SDK/pull/1311 from
main
.Details
Motivation
Fixes a crash when a session has a direct influence but the direct id is nil.
This does not resolve getting into this situation in the first place since we should not have a direction session without a direct id, but this will at least prevent a crash when the issue happens. Instead we will log an error.
Testing
Unit testing
Unit test was also cherry-picked even though it will not run.
Manual testing
None on this PR
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is