When you use the Hybrid App Generation wizard to create a
Hybrid App package, all the package files are generated the first
time. Subsequent generations overwrite only a small subset of the files.
Generated package files are created in a top-level folder with the name of the
Hybrid App. If you choose the option to generate into the
current project, this file is visible in WorkSpace Navigator under the project
Generated Hybrid App folder.
These files are always
generated:
- hybridapp-name.zip – a single archive
containing all of the Hybrid App files, including the Web
application files, look and feel files, and JavaScript files.
- manifest.xml – describes the contents of the
hybridapp-name.zip file.
- datajs-version.js
– a JavaScript library of functions for ODATA and native device services that
are not included in Hybrid Apps by default. By referencing
these functions in your customization (in Custom.js, you
can incorporate functionality from third-party JavaScript SDKs into your
Hybrid Apps.
These files are regenerated only if you select
the Generate platform specific files option
in the Hybrid App Package Generation wizard:
- hybridapp.html –
contains all the screens in the Hybrid App, each in
its own div element. This is used with the Optimize for
performance look and feel. On Windows Mobile, it is used for all
looks-and-feels.
- hybridapp_Custom.html – contains all the screens in the Hybrid App.
- hybridapp_jQM.html – contains all the screens in the Hybrid App. This is used with the Optimize for appearance look and feel on iOS,
BlackBerry, and Android.
- WorkflowClient.xml –
contains metadata that specifies how to map the data in the
Hybrid App message to and from calls to Mobile Business
Object (MBO) operations and object queries.
- hybridapp_name.xml
– look and feel file that uses the basic hybridapp_name.html
file.
- js and css – subfolders containing the
Javascript and CSS style sheet files for the application, including these files:
- Resources.js – allows you to access localized
string resources.
- HybridApp.js – contains functions for common menu,
screen, and database operations.
- PhoneGap JavaScript file. Typically
named
js\platform\cordova-x.x.x.javascript,
for any Hybrid App package that is built for an Android,
iOS, or BlackBerry device using the PhoneGap library. The file is copied from
<SUP_HOME>\MobileSDK<version>\HybridApp\API\Container.
These files are generated only if you select the Generate option and the files do not exist:
- API.js and Utils.js – provide
Hybrid App functions used to communicate with the
Hybrid Web Container.
- Custom.js – enables you to
add JavaScript code to customize the Hybrid App. Your file
is preserved each time you regenerate the package.
You can edit this file to
customize your Hybrid App. It is generated the first
time, but is not overwritten subsequently. In this way, your changes are
preserved each time you regenerate the Hybrid App
package. Examples of ways you can customize the
Hybrid App include:
- Manipulating HTML elements.
- Writing code that is called before or after generated behavior is
invoked for menu items.
- Implementing custom validation logic.
- WorkflowMessage.js –
provides functions to access Hybrid App message
resources.
- All *.css files – defines
formatting rules to render the screens in HTML.
These files are overwritten when you regenerate a package:
- All the files in the top-level Generated Hybrid
App\hybridapp-name folder, including the
XML and ZIP files.
- The files in the html subfolder.