Including a Prepackaged Hybrid App in the iOS Hybrid Web Container

Run a prepackaged Hybrid App in the iOS Hybrid Web Container so that the Hybrid Web Container functions as a single-purpose application rather than a general purpose one.

  1. Package the Hybrid App files.
    You can use a Hybrid App that was generated with the Hybrid App Designer, or you can use the packaging tool to generate a new Hybrid App.
    When packaging the Hybrid App, optimize the size by generating a version for each specific platform that includes only files for that platform.
    See Packaging Hybrid Apps Using the Packaging Tool.
  2. Copy the generated Hybrid App folder to a location that is accessible to your Xcode project.
  3. In the Xcode Project Navigator, right-click the Resources group folder, and select Add Files to HWC.
  4. Navigate to the directory you just created that contains the generated package, and select the top-level directory of the package.
    Create folder references, not group references, when you add the files. The directories appear directly under Resources.
  5. In the Project Navigator, find and open the CustomizationHelper.m file, which is located in the Classes group folder.
  6. Locate the customization point, designated by the comment IOS_CUSTOMIZATION_POINT_PREPACKAGED_APP, that accompanies the getPrepackagedAppPath function, and change the contents of this function to return the name of the top-level directory you just added to the project.
  7. Rebuild the HWC.xcodeproj project.
    1. From the Xcode menu, select Product > Clean.
    2. Select Product > Build.