Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B2F94200B68 for ; Fri, 19 Aug 2016 12:00:27 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B1845160AAC; Fri, 19 Aug 2016 10:00:27 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 01D44160A8E for ; Fri, 19 Aug 2016 12:00:26 +0200 (CEST) Received: (qmail 72824 invoked by uid 500); 19 Aug 2016 10:00:26 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 72803 invoked by uid 99); 19 Aug 2016 10:00:26 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Aug 2016 10:00:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D57832C0150 for ; Fri, 19 Aug 2016 10:00:25 +0000 (UTC) Date: Fri, 19 Aug 2016 10:00:25 +0000 (UTC) From: "Vladimir Kotikov (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CB-9936) iOS File Transfer not receiving Progress Event MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 19 Aug 2016 10:00:27 -0000 [ https://issues.apache.org/jira/browse/CB-9936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vladimir Kotikov updated CB-9936: --------------------------------- Labels: cannot-reproduce triaged (was: connection event filetransfer progress) > iOS File Transfer not receiving Progress Event > ---------------------------------------------- > > Key: CB-9936 > URL: https://issues.apache.org/jira/browse/CB-9936 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File Transfer > Affects Versions: 1.4.0 > Environment: iOS > Reporter: Tony Leung > Priority: Minor > Labels: cannot-reproduce, triaged > Attachments: screenshot.png > > > In CDVFileTransfer.m, download() method between line 447 to 462 > {noformat} > delegate.connection = [[NSURLConnection alloc] initWithRequest:req delegate:delegate startImmediately:NO]; > if (self.queue == nil) { > self.queue = [[NSOperationQueue alloc] init]; > } > [delegate.connection setDelegateQueue:self.queue]; > @synchronized (activeTransfers) { > activeTransfers[delegate.objectId] = delegate; > } > // Downloads can take time > // sending this to a new thread calling the download_async method > dispatch_async( > dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, (unsigned long)NULL), > ^(void) { [delegate.connection start];} > ); > {noformat} > If I replaced it with the older version of the code, then it works. > {noformat} > delegate.connection = [NSURLConnection connectionWithRequest:req delegate:delegate]; > if (activeTransfers == nil) { > activeTransfers = [[NSMutableDictionary alloc] init]; > } > [activeTransfers setObject:delegate forKey:delegate.objectId]; > {noformat} > In summary, if we don't use GCD to start the NSURLConnection, it works. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org