Uh oh!
There was an error while loading. Please reload this page.
Fix crash in additionalTokenRefreshParameters when emmSupport is nil - #608
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
This is good to merge :) You can override the swift integration test to do so. Before merging, please file a follow-up issue to make the following changes:
- That the
parametersWithParametersfunction drops key parameters that contain values like a nested array. - We should fix the test swizzling UIDevice to Not Do That (or ensure all the tests are doing it the same way; using the real UIDevice will be non-hermetic).
- Consider upleveling these tests to the public API.
AkshatG6
commented
Jul 31, 2026
Merging this PR.
|
Uh oh!
There was an error while loading. Please reload this page.
Overview
This PR fixes an edge case missed by the previous fix for the Swift casting crash in
additionalTokenRefreshParameters(#564).The Problem
The previous fix correctly converted non-string values (like
NSNumber) into theirNSStringrepresentations to avoid a Swift type mismatch exception. However, it missed the scenario whereemmSupportisnilorNO. In that case,[GIDEMMSupport parametersWithParameters:emmSupport:isPasscodeInfoRequired:]returned the original parameters dictionary early, bypassing the newly added string conversion helper.The Fix
This change updates the early return block to apply
[GIDEMMSupport dictionaryWithStringValuesFromDictionary:parameters], ensuring that the dictionary is safely stringified regardless of theemmSupportconfiguration.