When using iQ Tag Management in your app, custom remote commands provide the ability to trigger native code blocks from the non-rendered webview. This is used in cases where data held inside the non-rendered webview needs to be passed back to the native code for further processing.
A remote command has a command name and a payload of data.
The name of the command, or command ID, registered with native code in your app.
The data passed to the native app and received as an object named requestPayload in the response callback of the handler.
Define remote commands in your native app at build time. The Custom Remote Command tag only executes pre-defined code on the device.
In the native code, the add() function registers a remote command handler. The callback function response has access to the payload with response.payload. In the following example, the referenced payload variables have a matching data layer variable configured in iQ Tag Management.