feat(storage): expose maxUploadRetryTime / maxDownloadRetryTime / maxOperationRetryTime on Storage#98
Merged
Conversation
…ationRetryTime on Storage Firebase iOS exposes these as TimeInterval (seconds) properties on Storage; the Android SDK has the equivalent get/setMax*RetryTimeMillis(long) accessors on FirebaseStorage. Bridge them so identical Swift code like 'storage.maxDownloadRetryTime = 20' works on both platforms. Without this there is no way on the Skip side to shorten the default 10-minute silent retry window an offline download drains before failing.
Member
|
Nice improvement, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Exposes the three retry-deadline properties of
StorageinSkipFirebaseStorage, matching the Firebase iOS SDK API:maxUploadRetryTime: TimeIntervalmaxDownloadRetryTime: TimeIntervalmaxOperationRetryTime: TimeIntervalAll three are seconds-based (
TimeInterval), exactly like their iOS counterparts, and map to the Android SDK's millisecond accessors (get/setMaxDownloadRetryTimeMillis(long)etc. onFirebaseStorage).Motivation
With no network, a Firebase Storage download on Android does not fail fast — it silently retries for the full
maxDownloadRetryTime(default 10 minutes, measured on device) before throwingStorageException: The operation retry limit has been exceeded. On iOS, apps commonly bound this withstorage.maxDownloadRetryTime = 20; the Skip wrapper had no way to do the same, so identical shared Swift code could not control the retry window on Android.With this change, the same line of Swift works on both platforms:
Testing
StorageAPI-shape checks added alongside the existing ones inSkipFirebaseStorageTests.maxDownloadRetryTime = 20, agetDataAsyncdownload fails after ~20s instead of the 10-minute default; getter round-trips the value.