User Guide Cancel

Package mobile applications

Alert:

All mobile and mobile-related features are removed in ColdFusion (2025 release).

View Deprecated features in ColdFusion for more information.

Overview

Once you are done building the mobile application, you can package the application targeting some common mobile platforms. ColdFusion builder packaged applications can access the native capabilities of the mobile platform.  When you are building the applications, you will be writing only CFML code and not any device-specific native code.

Ideally, you will be using ColdFusion Builder for building the mobile application and ColdFusion Server for translating the ColdFusion code in your application to corresponding HTML/JavaScript code that can be packaged and installed on the device. ColdFusion builder gets this translation done through ColdFusion Server seamlessly with a few easy configuration settings. ColdFusion Builder helps in creating platform-specific installers (.apk and .ipa) by invoking the Cordova build service. However, you do not need to package the application targeting individual platforms if you are not using any hardware or device-specific functionalities.

See Types of mobile applications for all the supported types while building ColdFusion-based mobile applications. Information available in this chapter is only applicable for Type 1 and Type 3 deployments.

Supported mobile platforms

The ColdFusion builder currently supports packaging applications for the following mobile platforms:

  • Android 4.x or higher
  • iOS 6.0 or higher

Packaging applications using ColdFusion Builder

After creating your mobile application in ColdFusion Builder, you can generate a platform-specific package that can be installed on the mobile device (iOS and Android). ColdFusion Builder sends the ColdFusion (.cfm) files to the ColdFusion Server, which converts the .cfm files to .html and .js files.

Global configuration requirements

The following sections describe the global configurations required to prepare ColdFusion Builder for creating platform-specific mobile applications.

Step 1 – Get the required certificates

The ColdFusion Builder supports creating platform-specific builds for Android and iOS platforms. In order to package the mobile applications for these platforms, you need to configure the ColdFusion Builder to sign the applications with an appropriate developer/self-signed certificate. In the case of Android, providing the certificate details is optional as you can create an Android Application Package (APK) file for testing on your devices without signing it. However, testing the mobile application on iOS devices require you to have a developer certificate and a provisioning profile file.

Ensure that you follow the steps provided in this article to get started:

For iOS development

For Android development

Step 2 – Provide the server and authentication details

Once you have created and stored the required certificates, go to Windows > Preferences > ColdFusion > Cordova and provide the required details as shown in the following screen:

Keystore details
Keystore details

Note: If any of the iOS key details are not specified, packaging will not work. Ensure that you specify ALL the details.

Project-specific configuration requirements

The following sections describe the project-specific configurations required to prepare ColdFusion Builder for creating platform-specific mobile applications.

Step 1 Configuring the mobile project properties

  • If you have already created a ColdFusion Builder Mobile project (see Building Mobile Applications), right-click the project in the Navigator panel and click Properties.
  • Select the ColdFusion Mobile Project in the left pane to see the available properties for configuration.
    Note: For packaging Server CFCs, go to the Miscellaneous tab and provide the application base URL.
  • In the ColdFusion Mobile Project panel, select the Resource Selection tab and ensure that only the CFM files and other supporting assets (under the Server’s web root directory) are selected:
ColdFusion mobile project
ColdFusion mobile project

  • Keep your CFM files and other supporting assets in a separate directory under the web root directory so that you can select just that directory. 
    Important: All the selected files must be present under the Server’s web root directory or under web root’s sub-directories. Also, it is mandatory to have an index. cfm  file in your application. 
  • Select the Cordova tab. 
Cordova tab
Cordova tab

  • All these properties are automatically populated by ColdFusion Builder. You just need to change the author-specific information. If you need to add any other platform-specific attributes, you can add them through by clicking the New button.
  • Also, you need to link the web root path to your project. Click ColdFusion Project > Add to map the ColdFusion Server web root directory to a linked alias:
Webroot path
Webroot path

Step 2 Invoking the Cordova build service

After you have configured the mobile project with Cordova build service settings, you can invoke the Cordova build service, by right-clicking the mobile project and by clicking Cordova Build > Generate Debug Build. 

Note that you need to enable your Android device to install non-market applications. See the troubleshooting section on installing non-market applications.

On iOS

When you have an IPA file stored locally, you can use Apple iTunes software to install the application on your iOS device.

To install the test application on your device, perform the following tasks:

  1. In the Finder, drag the provisioning profile (the file with the .mobileprovision extension) to the iTunes icon in the Dock.
  2. Double-click the app archive <App_Name>.ipa. The app appears in the iTunes Applications list.
  3. Sync your device. If the version of iOS on your device is earlier than the test application can run on, you need to update your device with the current version of iOS.

See this video to understand how IPA files can be installed on devices using Apple iTunes. Ensure that the test device is provisioned before installing the IPA file.

Loading Hybrid applications (Type 3)

To build a hybrid application, develop a ColdFusion Mobile application in ColdFusion Builder and deploy the application on ColdFusion Server.  You need to include the /CFIDE/ cfclient / useragent . cfm  file that will allow your application to detect the mobile platform and will correspondingly load  the platform-specific (Android or iOS) Cordova JavaScript file at runtime.

When the hybrid application is invoked, the content gets loaded from the ColdFusion Server. Also, the platform-specific Cordova-*.js file gets served by the ColdFusion Server depending on the mobile platform.

Get help faster and easier

New user?