Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-27320

iOS: Ti.Stream.writeStream fires callback for each loop of writes, no way to tell when done

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: Release 8.2.0
    • Fix Version/s: None
    • Component/s: iOS
    • Labels:
    • Story Points:
      8

      Description

      Ti.Stream.writeStream behaves differently on iOS vs Android. Android will do all of the writes and will fire the callback once at the end (or will fire it as soon as an error occurs).

      iOS will fire if an error occurs; or every iteration of it's internal read/write loop and at then at the end. But there's no way to know beforehand if it is done unless you know the exact byte count expected to be transferred. (The case I specifically saw was a Ti.File.FileStream and copying it's data)

      As a first step, adding a "done" property to the callback's argument object would be useful so you can tell when iOS is actually finished. A second step would be to eliminate the per-loop callback firing altogether for iOS.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                amukherjee Abir Mukherjee
                Reporter:
                cwilliams Christopher Williams
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration