From de6ce24cc1cfa1a3cf0b6577e0041d7a2428ec31 Mon Sep 17 00:00:00 2001 From: Thor963 Date: Tue, 3 Mar 2026 01:46:09 +0530 Subject: [PATCH 1/2] fix: added lenient configs for file download timeouts --- ios/main/StallionFileDownloader.swift | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ios/main/StallionFileDownloader.swift b/ios/main/StallionFileDownloader.swift index 1f45bdc..5e45ca8 100644 --- a/ios/main/StallionFileDownloader.swift +++ b/ios/main/StallionFileDownloader.swift @@ -9,9 +9,13 @@ import Foundation import ZIPFoundation class StallionFileDownloader: NSObject { - private lazy var urlSession = URLSession(configuration: .default, - delegate: self, - delegateQueue: nil) + private lazy var urlSession: URLSession = { + let configuration = URLSessionConfiguration.default + configuration.timeoutIntervalForRequest = 540.0 // 9 minutes per request + configuration.timeoutIntervalForResource = 3600.0 // 1 hour total + configuration.waitsForConnectivity = true + return URLSession(configuration: configuration, delegate: self, delegateQueue: nil) + }() private var downloadTask: URLSessionDownloadTask? private var _resolve: RCTPromiseResolveBlock? private var _reject: RCTPromiseRejectBlock? @@ -65,9 +69,9 @@ class StallionFileDownloader: NSObject { let downloadFolder = URL(fileURLWithPath: downloadDirectory, isDirectory: true) let fileManager = FileManager.default - // Delete existing folder if it exists + // Delete existing folder if it exists (ignore errors - we'll create it anyway) if fileManager.fileExists(atPath: downloadFolder.path) { - try fileManager.removeItem(at: downloadFolder) + try? fileManager.removeItem(at: downloadFolder) } // Create new download folder From 7c6d8893fc20c42426d8be3a9ae441cfb6ba4ecb Mon Sep 17 00:00:00 2001 From: Thor963 Date: Tue, 3 Mar 2026 01:48:09 +0530 Subject: [PATCH 2/2] chore: corrected alpha version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5c4b370..9076952 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-stallion", - "version": "2.4.0-alpha.4", + "version": "2.4.0-alpha.6", "description": "Offical React Native SDK for Stallion", "main": "index", "types": "types/index.d.ts",