Package a mobile app

Follow this procedure to create a package for your mobile app.

If you created your project using the BAM Mobile Project (.4pw) or Mobile Project (.4pw) options, default package nodes were created for both Android and iOS devices. Even with these packaging nodes, you should still read through this procedure to add any additional directories and validate all properties.
  1. Launch Genero Studio.
  2. Open your project.
  3. Make a list of all the files needed to run your app and the full path to where these files currently reside.
  4. Right-click on the Group node and select New Package.
  5. Define the package properties. You can accept many of the default values. You should, however, provide details for the properties listed under the Package group.

    Figure 1. Package properties

    Screen shot of Properties pane for a package node.
  6. Create a New Directory in the Package node for each physical directory on disk that contains files to be included in the package. Right-click on the Package node and select New Directory. Define the properties for each directory added. In the Source directory property, you must specify the directory where the file(s) will come from. In the Destination directory directory, specify the directory where you want the file copied to. This directory must be contained in the Root directory.
    Note: In the default project that is set up when you create a new BAM Mobile Project (.4pw), both of these properties are set to $(ProjectDir)/bin. If the source and destination directories are the same, the packaging process does not have to perform the copy, resulting in an optimization of the packaging process.
    If you need to include or exclude files from the source directory, you would add the criteria to the Included files and/or Excluded files properties.
    Screen shot of Properties pane for a directory node.

    Figure 2. Directory properties

  7. Confirm the Package rules. Right-click on the Package node and select Edit Package Rules.
    Note: You will typically not have to modify the package rules.
  8. Right-click on the package node and select Build. This action builds the package according to the package rules. Progress of the packaging will appear in the output panel.
    Important: You need an internet connection for the first time you build an Android package. During this first build, an automated process will download and install Gradle with all necessary extensions into a directory in your user directory. Gradle is a project automation tool, find out more about Gradle at http://www.gradle.org.
    Right-click contextual menu showing Build menu option.

    Figure 3. Build package

  9. Confirm that the package is on your local file system.
  10. Validate this package on a device by transferring it to the device, installing it on the device, and running it on the device. To do so, follow the instructions to Deploy a mobile app for testing.