You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During an upload, task.response is nil until the server replies — i.e. for every didSendBodyData callback fired while bytes are still being streamed — so statusCode is always 0 and progress is suppressed. The single event observers see ("only fires once the file is uploaded") isn't actually a didSendBodyData event; it's the forced progress tick the plugin emits from the .complete branch in FileTransferPlugin.swift:214-223 right before resolving the upload promise.
Android works because the equivalent code doesn't have the gate. Downloads happen to work because for GETs the response arrives before the body, so task.response is populated by the time didWriteData fires.
Opened a PR in the underlying lib that drops the gate: ionic-team/ion-ios-filetransfer#21. Once that's released and bumped here, this issue should be resolved.
Activity
evanlegamer commentedon Jun 2, 2026
Got the same problem
evanlegamer commentedon Jun 2, 2026
Traced this to the underlying
IONFileTransferLib. The gate is atIONFLTRUploadDelegate.swift:43-50:During an upload,
task.responseisniluntil the server replies — i.e. for everydidSendBodyDatacallback fired while bytes are still being streamed — sostatusCodeis always0and progress is suppressed. The single event observers see ("only fires once the file is uploaded") isn't actually adidSendBodyDataevent; it's the forced progress tick the plugin emits from the.completebranch inFileTransferPlugin.swift:214-223right before resolving the upload promise.Android works because the equivalent code doesn't have the gate. Downloads happen to work because for GETs the response arrives before the body, so
task.responseis populated by the timedidWriteDatafires.Opened a PR in the underlying lib that drops the gate: ionic-team/ion-ios-filetransfer#21. Once that's released and bumped here, this issue should be resolved.