AEM 6.4 has reached the end of extended support and this documentation is no longer updated. For further details, see our technical support periods. Find the supported versions here.
Adobe recommends using the SPA Editor for projects that require single page application framework-based client-side rendering (e.g. React). Learn more.
See the following guidelines for developing Content Sync Handlers:
The following lists out-of-the-box app handlers:
mobileapppages Renders app pages.
type - String - mobileapppages
path - String - path to a page
extension - String - Extension that should be used in the request. For pages this is almost always html, but others are still possible.
selector - String - Optional selectors separated by dot. Common examples are touch for rendering mobile versions of a page.
deep - Boolean - Optional boolean property determining if child pages should be included, as well. The default value is true.
includeImages - Boolean - Optional boolean property determining if images should be included. The default value is true.
includeVideos - Boolean - Optional boolean property determine if videos should be include. The default value is true.
includeModifiedPagesOnly - Boolean - If false or omitted render all pages and check updates in rendering. If true, base diffs on changes to a pages lastModified.
+ rewrite (node)
- relativeParentPath - String - the path to write all other paths relative to.
The resource type of the image and video components that are affected by this handler is set by configuring the properties of the com.adobe.cq.mobile.platform.impl.contentsync.handler.MobilePagesUpdateHandler OSGi service.
mobilepageassets Collects app page assets.
mobilecontentlisting Lists the content of the ContentSync zip. This is used by the client side js on device to do the initial file copy required for AEM apps.
This handler should be added to any AEM Apps ContentSync Config.
{
"files": [
"config.xml",
"res/screens/ios/screen-ipad-portrait-2x.png",
"res/screens/ios/screen-ipad-landscape.png",
"res/screens/ios/screen-iphone-portrait-2x.png",
"res/screens/ios/screen-iphone-landscape.png",
"res/screens/ios/screen-iphone-portrait.png",
"apps/weretail-app/components/splash-page/clientlibs.css",
...
"pge-content-packages.json"
],
"count": 382,
"lastModified": 1422902754733
}
mobilecontentpackageslisting Lists the AEM content package in a given app as well as the serverURL to make update requests to. This is used the client side js on device to request content updates
The handler should be used on AEM App Shell ContentSync Config (node with pge-type=app-instance)
The following code block is not an exact implementation and should be used as a reference example:
{
"content": [
{
"name": "en",
"title": "We Retail Mobile App - English",
"type": "CONTENT",
"path": "/content/phonegap/weretail-outdoors/en",
"updatePath": "/content/phonegap/weretail/en/jcr:content/pge-app/app-config"
},
{
"name": "shell",
"title": "We Retail Mobile App",
"type": "INSTANCE",
"path": "/content/phonegap/weretail-outdoors/shell",
"updatePath": "/content/phonegap/weretail/shell/jcr:content/pge-app/app-config"
}
],
"serverURL": "http://localhost:4503/"
}
widgetconfig Includes an updated config.xml that merges any edits made via the Command Center with a provided config.xml. If this handler is not included any app details that are changed via the Administration interface will not be included in the cache.
This handler should be used on a AEM App Shell ContentSync config (node with pge-type=[app-instance]).
mobileADBMobileConfigJSON Include the ADBMobileConfig.JSON file if the AMS cloudservice was configured.
This is used at compile time to configure the AMS plugin for analytic support.
The handler should be used on AEM App Shell ContentSync Config (node with pge-type=app-instance)
notificationsconfig Extracts notifications configurations required on device. The properties are extracted from the respective push service cloud
service configuration associated with the app.
Non-AEM properties in the cloud service’s jcr:content node are extracted and added to the pge-notifications-config.json JSON
file for inclusion in the app content’s www root.
AEM properties are those that are name-spaced with “cq”, “sling” or “jcr”. Other properties
may be excluded using the “excludeProperties” property on the content-sync config node.
contentsyncconfigcontent Collects content from an existing ContentSync config.
type - String - contentsyncconfigcontent
path - String - Path to one of:
autoCreateFirstUpdateBeforeImport - Boolean - if true, create an initial update in the target config before importing if once does not exist already
autoFillBeforeImport - Boolean - if true, update/fill the target config before importing
configSuffix - String - a string to append to the path indicated on the “phonegap-exportTemplate” property of app-content. This can be used to distinguish different export templates. For example, this property can be set to “-dev” to indicate that “/…/…/…/appconfig-dev” should be used (as opposed to “/…/…/…/appconfig”).
app-assets Includes all assets associated with an app instance. This handler will include any assets found under the specified path along with any assets referenced by an app instance’s appAssetPath property.
type - String - app-assets
path - String - path to a location under an app instance where app assets are stored
mobileappoffers A new content sync handler has been introduced for the Personalization use case to render targeted content. The ‘mobileappoffers’ handler knows how to render the associated target offers that have been created by the content author. The mobileappoffers handler extends the abstract pages update handler therefore many of the properties are similar. The details of the mobileappoffers handler has the following properties.
The mobileappsoffers handler exends the mobileappspages handler and adds the following properties:
mobileappconfig The mobileappconfig content sync handler provide a way to inject JSON data into the MobileAppsConfig.json. To register a provider class developers will add their MobileAppsInfoProvider class with the list of providers. The handler will iterate over the list of MobileAppsInfoProviders and allow the provider to inject data into the resulting json file. The list of properties which this handler supports are:
[]
- the list of fully qualified MobileAppsInfoProvidersIt is possible to have multiple mobileappconfig handlers configured each with a unique set of providers writing to different JSON files.
Steps for Checking Integrity Clear cache
Steps for Debugging
Logging Enable ContentSync Debug logging via OSGI logger configurations on package com.day.cq.contentsync
This will allow you to track what handlers ran and whether they updated the cache and reported updating the cache.
To learn about the roles and responsibilities of an Administrator and Developer, see the resources below:
To get started with AEM Mobile app development, click here.