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

iOS: File methods isFile() and isDirectory() are missing for encrypted assets

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 7.5.0
    • Component/s: iOS
    • Labels:
    • Story Points:
      1
    • Sprint:
      2018 Sprint 15 SDK, 2018 Sprint 16 SDK, 2016 Sprint 17 SDK, 2018 Sprint 18 SDK, 2018 Sprint 19 SDK

      Description

      Summary:
      On iOS, when loading an encrypted asset such as "app.js" via Ti.Filesystem.getFile(), the returned File object is missing methods isFile() and isDirectory(). Attempting to call these methods will cause JavaScript runtime error.

      This is an issue for iOS "production" builds and "test" builds for device.
      This is not an issue for iOS Simulator builds since JS files are not encrypted.
      This is not an issue on Android.

      Steps to reproduce:

      1. Create a Titanium project with the below code.
      2. Build and run to an iOS device.
      3. Notice that the app crashes on startup.
      4. Build and run to the iOS simulator.
      5. The isFile() and isDirectory() methods work and are correctly logged.

      var file = Ti.Filesystem.getFile("app.js");
      Ti.API.info("@@@ app.js isFile(): " + file.isFile());
      Ti.API.info("@@@ app.js isDirectory(): " + file.isDirectory());
      

      Cause:
      Our TiFileSystemBlobProxy.m code is missing the isFile() and isDirectory() methods.

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              jquick Joshua Quick
              Reviewer:
              Hans Knöchel
              Tester:
              Lokesh Choudhary
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code