A promise that will resolve when the operation is complete.
service exceptions - Thrown when the underlying Pinpoint service returns an error.
validation: InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.
// Sync InApp messages with Pinpoint and device.
await syncMessages();
Fetch and persist messages from Pinpoint campaigns. Calling this API is necessary to trigger InApp messages on the device.