diff --git a/ios/RNBackgroundDownloader.m b/ios/RNBackgroundDownloader.m index 62f1da8..b256263 100644 --- a/ios/RNBackgroundDownloader.m +++ b/ios/RNBackgroundDownloader.m @@ -22,7 +22,6 @@ static CompletionHandler storedCompletionHandler; NSMutableDictionary *idToResumeDataMap; NSMutableDictionary *idToPercentMap; NSMutableDictionary *progressReports; - NSOperationQueue *downloadOperationsQueue; NSDate *lastProgressReport; } @@ -67,7 +66,6 @@ RCT_EXPORT_MODULE(); NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier]; NSString *sessonIdentifier = [bundleIdentifier stringByAppendingString:@".backgrounddownloadtask"]; sessionConfig = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:sessonIdentifier]; - downloadOperationsQueue = [[NSOperationQueue alloc] init]; progressReports = [[NSMutableDictionary alloc] init]; lastProgressReport = [[NSDate alloc] init]; } @@ -76,7 +74,7 @@ RCT_EXPORT_MODULE(); - (void)lazyInitSession { if (urlSession == nil) { - urlSession = [NSURLSession sessionWithConfiguration:sessionConfig delegate:self delegateQueue:downloadOperationsQueue]; + urlSession = [NSURLSession sessionWithConfiguration:sessionConfig delegate:self delegateQueue:nil]; } }