Skip to content

feat(storage): expose maxUploadRetryTime / maxDownloadRetryTime / maxOperationRetryTime on Storage#98

Merged
marcprux merged 1 commit into
skiptools:mainfrom
vincentborko:storage-retry-times
Jul 22, 2026
Merged

feat(storage): expose maxUploadRetryTime / maxDownloadRetryTime / maxOperationRetryTime on Storage#98
marcprux merged 1 commit into
skiptools:mainfrom
vincentborko:storage-retry-times

Conversation

@vincentborko

Copy link
Copy Markdown
Contributor

Summary

Exposes the three retry-deadline properties of Storage in SkipFirebaseStorage, matching the Firebase iOS SDK API:

  • maxUploadRetryTime: TimeInterval
  • maxDownloadRetryTime: TimeInterval
  • maxOperationRetryTime: TimeInterval

All three are seconds-based (TimeInterval), exactly like their iOS counterparts, and map to the Android SDK's millisecond accessors (get/setMaxDownloadRetryTimeMillis(long) etc. on FirebaseStorage).

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 throwing StorageException: The operation retry limit has been exceeded. On iOS, apps commonly bound this with storage.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:

let storage = Storage.storage()
storage.maxDownloadRetryTime = 20 // seconds, both platforms

Testing

  • Storage API-shape checks added alongside the existing ones in SkipFirebaseStorageTests.
  • Verified on an Android emulator (API 36) via a bridged app build: with the device offline and maxDownloadRetryTime = 20, a getDataAsync download fails after ~20s instead of the 10-minute default; getter round-trips the value.

…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.
@cla-bot cla-bot Bot added the cla-signed label Jul 22, 2026
@marcprux
marcprux merged commit 06f24d1 into skiptools:main Jul 22, 2026
2 checks passed
@marcprux

Copy link
Copy Markdown
Member

Nice improvement, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants