Sorting and Filtering the List of Mobile Workflow Packages and Messages

By default, the Hybrid Web Container sorts the list of applications and messages in alphabetical order by package name.

There is no filtering by default.

You can sort and filter this list in any way you want. For example, you can filter Workflow packages from appearing according to whatever criteria you specify. You can filter out particular Workflow packages by name, or you can sort Workflow messages by subject. Workflow messages are server-initiated messages associated with a Workflow package, and appear in a separate TableView.

The WorkflowViewController.h file defines the interface for a Workflow object. You can sort and filter the properties of this object.

  1. Locate the WorkflowViewController.h file.
    You do not need to modify this file, but you can view the properties of a WorkFlow object on which you might want to filter or sort.
    This file is included in the WorkFlow/includes directory, but it is not explicitly included in the Xcode project. To get the file to appear in the Xcode editor:
    1. In Xcode, open the Workflow.xcodeproj.
    2. Open the WidgetFolderController.h file.
    3. Locate this line: #import “WorkflowViewController.h”, right-click inside the quotes, then select Jump to Definition.
      Xcode opens the file.
  2. Customizations involving filtering and sorting for both Mobile Workflow packages and messages can be made in the CustomizationHelper.m file.
    1. In Xcode Project Navigator, open the CustomizationHelper.m file, which is located in Workflow\Clases.
    2. If you are customizing sorting behavior, locate the IOS_CUSTOMIZATION_POINT_SORTING customization tag that accompanies the functions compareApplicationPackages and compareMessages.
      Overwrite the implementation of one or both of these functions to customize the comparison criteria for application packages and messages, respectively.
    3. If you are customizing the filtering behavior, locate the IOS_CUSTOMIZATION_POINT_FILTERING customization tag that accompanies the functions filterApplicationPackages and filterMessages.
      Overwrite the implementation of one or both of these functions to customize the filtering for application packages and messages, respectively.
  3. Save the file.
  4. Rebuild the project.
Related concepts
Mobile Workflow Application Launching Behavior