Using Firebase Firestone and storage.
If poor connectivity the Firestore read aborts automatically and goes to local last saved download – great.
However Storage doesn’t seem to follow this. I’ve tried setting timeout limits but can’t see how I implement code when these are triggered:
func getFiles() {
// Get a reference to the storage service using the default Firebase App
let storage = Storage.storage()
// Set time limits in case of poor connection msec
storage.maxUploadRetryTime = 1
storage.maxOperationRetryTime = 1
storage.maxDownloadRetryTime = 1
// Create a storage reference from our storage service
let storageRef = storage.reference()
// Create a reference to the file we want to download
let textRef = storageRef.child("/")
var countList = 0
textRef.listAll { (result, error) in
for item in result!.items {
If the connection is slow / beyond time limits (which I know I’ve set very low on purpose as a test) how do I capture has this has triggered and move on? Something like ‘maxOperationRetryTime has occurred so do this…’
Thanks in advance