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.)
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.
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.
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.)