You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am addressing two problems here, but with the same root cause.
Fortunately I already know how to fix these issues on iOS.
Also I checked on Android and it seems that Android auto-retry when images failed to download.
So as far as I know Android isn't affected by this problem.
Problem 1:
Image failed to download, they won't auto-retry the download and no error will be broadcasted.
The method onError is triggered but won't return the error.
I understand that it's difficult to unify Android and iOS error handling
We can post a notification via NSNotificationCenter to all the instance of FFFastImageView sharing the same source.url to let them know that the resource has been downloaded successfully by one of them.
I am not sure that SDWebImageRetryFailed will manage all failure scenario but for the second solution I tested it and it works perfectly.
The text was updated successfully, but these errors were encountered:
StevenMasini
changed the title
Two problems with iOS Image download failure
Problems with iOS Image download failure
Mar 20, 2019
Hi @DylanVann
I am addressing two problems here, but with the same root cause.
Fortunately I already know how to fix these issues on iOS.
Also I checked on Android and it seems that Android auto-retry when images failed to download.
So as far as I know Android isn't affected by this problem.
Problem 1:
Image failed to download, they won't auto-retry the download and no error will be broadcasted.
The method
onError
is triggered but won't return the error.I understand that it's difficult to unify Android and iOS error handling
Problem 2:
I explained on this thread #394
Let's say we have ImageCanvas1 on Page 1 who failed to download the image, then I push Page 2 with ImageCanvas2 who successfully download the picture.
When I pop back to Page 1, "ImageCanvas1" isn't aware of the download by ImageCanvas2 and is still empty.
Solution
Apparently we can't only rely on the flag
SDWebImageRetryFailed
to auto-retry when an image download failed. We need to implement our own auto-retry mechanism. Feature Request: Add automatic download retry option SDWebImage/SDWebImage#2587We can post a notification via
NSNotificationCenter
to all the instance ofFFFastImageView
sharing the samesource.url
to let them know that the resource has been downloaded successfully by one of them.I am not sure that
SDWebImageRetryFailed
will manage all failure scenario but for the second solution I tested it and it works perfectly.The text was updated successfully, but these errors were encountered: