smartdevicelink / sdl_ios

Get your app connected to the 🚙, make your users feel like a 🌟
www.smartdevicelink.com
BSD 3-Clause "New" or "Revised" License
169 stars 105 forks source link

Alert images that are flagged for overwrite fail to display #2109

Closed joeljfischer closed 2 years ago

joeljfischer commented 2 years ago

Bug Summary

The SDLPresentAlertOperation fails to display an image marked for overwrite because of this line:

- (SDLAlert *)alertRPC {
...
    alert.alertIcon = ([self sdl_supportsAlertIcon] && ![self.fileManager fileNeedsUpload:self.alertView.icon]) ? self.alertView.icon.imageRPC : nil;
...
}

The check for fileNeedsUpload returns true if the image is flagged for overwrite, which results in a failure to display the image.

Additional options were considered, like mixing hasUploadedFile and isStaticIcon checks, but those have an issue where if an overwrite file upload fails the old image will be shown, when it should not show any image instead.

Reproduction Steps

  1. Upload an image with name "test"
  2. Create an AlertView with an icon artwork overwriting "test"
  3. Present the image through the screen manager

Expected Behavior: The overwriting image should be shown

Observed Behavior: No image is shown

iOS Version(s)

n/a

sdl_ios Version

7.5.0

Testing Environment(s)

Observed through code

Relevant log output

No response