Shipping Label: Fix incorrect height for predefined packages when unavailable #15812
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.

Closes WOOMOB-682
Description
This PR fixes the incorrect package dimensions when height is unavailable.
Previously we were using the last dimension as the height. This is incorrect when the API response for packages doesn't include a height for a package.
The solution is to access dimensions by safe indices and return nil if unavailable.
Another problem is when sending a 0 height, the label rates request would fail with an unexpected value error. This PR adds a workaround to set a default value of 0.25 in this case, the rates returned would still be the same for predefined packages [p1750923325060079-slack-C05VBLKHHV1].
Testing steps
Testing information
Tested and confirmed with simulator iPhone 16 iOS 18.4.
Screenshots
Simulator.Screen.Recording.-.iPhone.16.-.2025-06-26.at.15.09.04.mp4
RELEASE-NOTES.txtif necessary.