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

iOS: Ti.Stream.read() doesn't work with Ti.Filesystem.FileStream

    Details

    • Sprint:
      2014 Sprint 24 SDK

      Description

      problem

      Using Ti.Stream.read() with an open Ti.Filesystem.FileStream does nothing. The read call never invokes the result callback. Android works fine, but iOS always fails as described above, despite the documentation indicating that both support Ti.Stream.read() on FileStream. Without this support there is no asynchronous way to read files with Titanium on iOS, all reads must be blocking.

      test case

      var file = Ti.Filesystem.getFile('app.js')
      var stream = file.open(Ti.Filesystem.MODE_READ);
      var buffer = Ti.createBuffer({length:8096});
      Ti.Stream.read(stream, buffer, function(e) {
          Ti.API.error('I never get here');
          Ti.API.error(e);
      });
      

      expected

      The results callback should return an event object (e) containing all relevant information regarding the read operation. Both Ti.API.error calls should execute and print the results.

      actual

      The results callback is never executed. Nothing is printed.

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              tlukasavage Tony Lukasavage
              Reviewer:
              Jon Alter
              Tester:
              Wilson Luu (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-19397
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration