In general, the app descriptor describes the behavior of an app through attributes. It doesn't directly influence that behavior itself for the most part. When a section in the app descriptor does affect the behavior of an app, this is described in the API Reference. for the corresponding namespace.
The data of the app descriptor is stored in JSON format in the
manifest.json file. The developer creates the file with attributes
in different namespaces. It contains, for example, the app ID, the version, the data
sources used, along with the required components and libraries. The existence of the
manifest.json file must be declared in the component metadata,
which is then delivered as part of the application archive. After delivery, the file is
read-only.
Every new version of SAPUI5 implies a new
version of the app descriptor. In the following table, you can see how the SAPUI5 version is
related to the descriptor version and the value of _version.
|
App Descriptor Release |
SAPUI5 Version |
_version |
|---|---|---|
|
Version 2 |
>=1.30 |
1.1.0 |
|
Version 3 |
>=1.32 |
1.2.0 |
|
Version 4 |
>=1.34 |
1.3.0 |
|
Version 5 |
>=1.38 |
1.4.0 |
|
Version 6 |
>=1.42 |
1.5.0 |
|
Version 7 |
>=1.46 |
1.6.0 |
|
Version 8 |
>=1.48 |
1.7.0 |
|
Version 9 |
>=1.50 |
1.8.0 |
|
Version 10 |
>=1.52 |
1.9.0 |
|
Version 11 |
>=1.54 |
1.10.0 |
|
Version 12 |
>=1.56 |
1.11.0 |
|
Version 13 |
>=1.58 |
1.12.0 |
|
Version 14 |
>=1.61 |
1.13.0 |
|
Version 15 |
>=1.62 |
1.14.0 |
|
Version 16 |
>=1.66 |
1.15.0 |
|
Version 17 |
>=1.70 |
1.16.0 |
|
Version 18 |
>=1.71 |
1.17.0 |
|
Version 19 |
>=1.74 |
1.18.0 |
|
Version 20 |
>=1.75 |
1.19.0 |
|
Version 21 |
>=1.76 |
1.20.0 |
|
Version 22 |
>=1.77 |
1.21.0 |
|
Version 23 |
>=1.78 |
1.22.0 |
|
Version 24 |
>=1.79 |
1.23.0 |
|
Version 25 |
>=1.80 |
1.24.0 |
|
Version 26 |
>=1.81 |
1.25.0 |
|
Version 27 |
>=1.82 |
1.26.0 |
|
Version 28 |
>=1.83 (SAPUI5 1.83 was not released, see 2979657) |
1.27.0 |
|
Version 29 |
>=1.84 |
1.28.0 |
|
Version 30 |
>=1.85 |
1.29.0 |
|
Version 31 |
>=1.86 |
1.30.0 |
|
Version 32 |
>=1.87 |
1.31.0 |
|
Version 33 |
>=1.88 |
1.32.0 |
|
Version 34 |
>=1.90 |
1.33.0 |
|
Version 35 |
>=1.92 |
1.34.0 |
|
Version 36 |
>=1.93 |
1.35.0 |
|
Version 37 |
>=1.95 |
1.36.0 |
|
Version 38 |
>=1.96 |
1.37.0 |
|
Version 39 |
>=1.98 |
1.38.0 |
|
Version 40 |
>=1.99 |
1.39.0 |
|
Version 41 |
>=1.100 |
1.40.0 |
|
Version 42 |
>=1.101 |
1.41.0 |
|
Version 43 |
>=1.102 |
1.42.0 |
|
Version 44 |
>=1.103 |
1.43.0 |
|
Version 45 |
>=1.104 |
1.44.0 |
|
Version 46 |
>=1.105 |
1.45.0 |
|
Version 47 |
>=1.106 |
1.46.0 |
|
Version 48 |
>=1.107 |
1.47.0 |
|
Version 49 |
>=1.108 |
1.48.0 |
|
Version 50 |
>=1.109 |
1.49.0 |
|
Version 51 |
>=1.110 |
1.50.0 |
|
Version 52 |
>=1.111 |
1.51.0 |
|
Version 53 |
>=1.112 |
1.52.0 |
|
Version 54 |
>=1.113 |
1.53.0 |
|
Version 55 |
>=1.114 |
1.54.0 |
|
Version 56 |
>=1.115 |
1.55.0 |
|
Version 57 |
>=1.116 |
1.56.0 |
|
Version 58 |
>=1.117 |
1.57.0 |
|
Version 59 |
>=1.118 |
1.58.0 |
|
Version 60 |
>=1.119 |
1.59.0 |
|
Version 61 |
>=1.120 |
1.60.0 |
For more information on the new fields introduced in each version, check out Migration Information for Upgrading the Descriptor File
The component factory function Component.create, as introduced with 1.58, loads the manifest.json by
default before the component instance is created. With this, you can preload the dependencies (libraries and components) and, thus,
improve the performance for loading the component. The preload is also available for models, which can be flagged for preload during
component loading.
The manifest option allows you to configure when and from where the
descriptor is loaded:
Default, equivalent to setting manifest to
true.
// "Component" required from module "sap/ui/core/Component"
// load manifest.json from default location and evaluate it before creating an instance of the component
Component.create({
name: "sap.my.component",
});manifest for the
component factory
function:// "Component" required from module "sap/ui/core/Component"
// load via manifest URL
Component.create({
name: "sap.my.component",
manifest: "any/location/sap/my/component/manifest.json"
});There are two possible scenarios for setting the manifest
flag to false:
The component defines manifest: "json" in its
Component Metadata.
In this case, the descriptor is loaded and evaluated after the Component controller. All dependencies defined in the descriptor will then also be loaded. Afterwards, the Component is instantiated.
The component does not define manifest: "json"
in its Component Metadata.
This is typically the case for older legacy Components without a descriptor. In this case, only the Component's class metadata is evaluated. No additional descriptor file will be loaded.
// "Component" required from module "sap/ui/core/Component"
// load component without loading a manifest first
// - Case 1: the manifest.json is loaded after the Component controller
// - Case 2: no manifest.json is loaded (legacy)
Component.create({
name: "sap.my.component",
manifest: false
});When you enable manifest, all legacy component metadata needs to
be migrated into the descriptor for applications/components. Only those entries in
the descriptor for components will be respected by the component and all other
entries will be ignored.
ui5://
URLsInside the app descriptor, you can use special URLs prefixed with
ui5://. These URLs will be resolved automatically during
component startup before any models are created.
The ui5://
URLs have the following properties:
ui5://my/path/to/sample, but not
ui5:my/app/path,ui5:// URL must be
registered on the UI5 loader beforehand (see the example below),sap.ui5/resourceRoots can be part of a
ui5:// URL,Component.create takes care of
defining the resource roots before any ui5:// URLs are
resolved.One common use case is the resolution of local annotation files. By default the
local annotation files are resolved relative to the manifest. When using a
ui5:// URL, you can enforce a different resolution, e.g. to
a server-absolute URL.
In this sample, we make sure that the component location is registered as a path
on the UI5 loader. Additionally, we assume that the host system is
http://localhost:8080 :
sap.ui.loader.config({
paths: {
"my/url/prefix": "this/url/is/reachable"
}
})The following snippet shows a sample annotation file configuration in the
sap.app/dataSources section of the app descriptor:
{
...
"sap.app": {
"dataSources": {
"OData": {
"uri": "/path/to/odata/service",
"type": "OData",
"settings": {
"odataVersion": "2.0",
"annotations": ["annotations"]
...
}
},
...
"annotations": {
"uri": "ui5://my/url/prefix/annotations.xml",
"type": "ODataAnnotation"
}
...
}
}
...
}During startup of the respective component the resolution of the
ui5:// URL for the sample annotation will look like
this:
ui5://my/url/prefix/annotations.xml
is resolved to:
http://localhost:8080/this/url/is/reachable/annotations.xml
You can find an example manifest.json file with sample code for
the descriptor content here.
The content for the descriptor is contained in the following namespaces:
without, sap.app, sap.ui,
sap.ui5, sap.platform.abap,
sap.platform.hcp, and sap.fiori. The
following tables show the application-specific attributes provided by the respective
namespaces:
Current version of the manifest.json
The following sample contains the full scope of all available descriptor properties. Some properties might
not be applicable for all manifest.json variants. For example, the sap.ui5/models section is
not supported for library descriptors. For more information, see the above listing of namespaces and properties.
For the following namespaces, the indicated teams are responsible:
sap.mobile - in Mobile responsibility
sap.flp - in SAP Fiori launchpad responsibility
sap.ui.generic.app - in SAP Fiori elements responsibility
sap.ovp - in Overview Page responsibility
sap.ui.smartbusiness.app - in Smart Business responsibility
sap.wda - in Web Dynpro ABAP responsibility
sap.gui - in SAP GUI responsibility
sap.cloud.portal - in SAP BTP responsibility
sap.apf - in Analysis Path Framework responsibility
sap.platform.cf - in Cloud Foundry/XSA responsibility
sap.copilot - in Copilot responsibility
sap.map - in SAP Visual Business responsibility
sap.url - in SAP Fiori launchpad responsibility
sap.platform.sfsf - for SAP SuccessFactors specific attributes
sap.wcf - for WCF Application specific attributes
sap.cloud - for SAP BTP-specific attributes
sap.integration - in Application Integration responsibility
sap.platform.mobilecards - in Mobile Cards responsibility
sap.artifact - in SAP Work Zone responsibility
sap.package - in SAP Work Zone responsibility
sap.insights - for My Insights inside My Home
sap.bpa.task - in SAP Build Process Automation responsibility
sap.fe - in SAP Fiori elements responsibility
sap.card - in SAPUI5 responsibility
The component declares the existence of the application descriptor by specifying
manifest: "json" in the component metadata. Setting this flag
makes the component load the manifest.json file and read the
relevant entries for SAPUI5. This metadata
is used to define the dependencies that need to be loaded in order to start the
component. The following code snippet shows how to add the manifest link:
sap.ui.define(['sap/ui/core/UIComponent'], function(UIComponent) {
return UIComponent.extend("sap.samples.Component", {
metadata : {
manifest: "json"
}
});
});At runtime, the manifest.json content can be accessed from the
component via the component metadata:
// get the component class
sap.ui.require(['sap/samples/Component'], function(SampleComponent) {
// getting complete manifest from component metadata
SampleComponent.getMetadata().getManifest();
//or getting a namespace
SampleComponent.getMetadata().getManifestEntry("sap.app");
});