This page lists information on how to use Hyperloop with new and existing projects. Hyperloop works as a native module and is pre-packaged with the SDK 7.0.0 and later.
Each Titanium project that wants to use Hyperloop requires the Hyperloop service to be enabled. By default, Hyperloop is disabled and you can enable it for your projects via the CLI or within Studio.
Refer to Hyperloop Requirements for instructions on what and how to install the necessary requirements for Hyperloop.
If you’d like to use Hyperloop in a new or existing Titanium project, add the following code to your tiapp.xml to configure the module:
<modules> <module>hyperloop</module> </modules>
You need to change some additional values in your
tiapp.xml file to get Hyperloop working. Note that these changes are unnecessary in SDK 7.0.0 as the defaults will work.
For iOS, you’ll need to ensure that the
<use-jscore-framework> flag is enabled (This is enabled by default in Titanium SDK 7.0.0 and later, only will only be disabled if explicitly set to false here):
<ios> <use-jscore-framework>true</use-jscore-framework> </ios>
Also ensure to have the "run-on-main-thread" property set in the top-level of your tiapp.xml (It is enabled by default in Titanium SDK 7.0.0 and later, only will only be disabled if explicitly set to false here):
<property name="run-on-main-thread" type="bool">true</property>
When creating a new project, the CLI will check if you are entitled to use Hyperloop. If you are, the CLI will prompt you with the following message: "Would you like to enable Hyperloop for this app (This may take a while...)". If you enable Hyperloop, it may take some time to retrieve the module and set up your project. Newer SDK versions ship the module and will not need to download it.
Note: If you have any issue enabling Hyperloop from the CLI, or, you are not asked if you want to enable Hyperloop, ensure you are logged into the platform with the appropriate subscription, use the
appc login command to confirm you are logged in.
With Appcelerator Studio open and logged in, follow these steps to create a new Hyperloop-enabled project:
To confirm that Hyperloop was set up, you can open the
tiapp.xml file in the Service section.
After enabling Hyperloop, the following tags should have been added to the
tiapp.xml file, you can validate them here:
<modules> <module platform="android">hyperloop</module> <module platform="iphone">hyperloop</module> ... </modules>
If Hyperloop was disabled or not available when the project was created, you can enable Hyperloop from the
tiapp.xml editor service section by clicking on Enable Services and selecting Hyperloop. Please note that this may also require the other changes mentioned above in Using Hyperloop on existing projects.
Make sure to follow the Hyperloop Guides section for deep-dives on how to use the native platforms in Titanium.