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

iOS: Support running LiveView with Hyperloop

    Details

    • Story Points:
      7

      Description

      Summary:
      Running an iOS app with LiveView will cause runtime exceptions when modifying a JS file using hyperloop.
      (This works on Android as of Titanium 9.0.0 and we'd like to do the same on iOS.)

      Cause:
      While the app is being built, hyperloop will string replace all require/import calls which reference a native Objective-C/Swift type with the hyperloop JS file which wraps that native type. This works fine for normal builds since the modified JS file is written to the app bundle. But this require/import string replacement does not happen with LiveView, causing the module lookup to fail.

      Recommended Solution:
      Modify the hyperloop build hook to not modify the JS source files anymore. Instead, create a bootstrap script (which is ran before the "app.js") that defines the require/import bindings between native types to the actual hyperloop JS file. The below is how Android handles it.
      generate-sources-task.js

      Limitations:
      Do the following while LiveView is running still won't be supported. The below requires a native rebuild to integrate them into the app.

      • Adding libraries.
      • Adding Hyperloop.defineClass() method calls. (Involves native code generation.)

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              jquick Joshua Quick
              Reviewer:
              Jan Vennemann
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration