customizedMiniApp from the
iMessage provider:
space.send(customizedMiniApp(...)) returns the sent message record. Unlike
background and read, iMessage App cards are real outbound messages.
appStoreId is optional. Omit it to send a card whose extension isn’t
published on the App Store. When set, recipients without the extension are
directed to its App Store entry.
Set live: true when you want Messages to render the installed extension’s
live UI instead of only showing the static layout preview:
live, or set it to false, to keep the static layout preview.
customizedMiniApp() accepts a
.
Its layout field uses
.
CustomizedMiniAppInput
Fields for building an iMessage App card.
CustomizedMiniAppInput
Fields for building an iMessage App card.
CustomizedMiniAppLayout
Layout fields for an iMessage App card.
CustomizedMiniAppLayout
Layout fields for an iMessage App card.
Update an iMessage App
Keep the message returned by the original send and use it as the target ofedit(). The following example updates the card’s URL, caption, and rendering
mode without sending a new bubble:
card includes the miniAppCardSession metadata required for the update.
Spectrum manages and refreshes that session automatically, so reuse card for
later updates instead of constructing the metadata yourself. The edit operation
returns undefined.
iMessage Apps require
@spectrum-ts/imessage. With
@spectrum-ts/imessage-local, customizedMiniApp() throws an
.