@spectrum-ts/imessage
v5.2.0
Published
iMessage provider for spectrum-ts — local and remote (advanced) modes.
Downloads
1,259
Readme
@spectrum-ts/imessage
iMessage provider for spectrum-ts, supporting local (imessage-kit) and remote (advanced-imessage) modes — including tapbacks, special effects, polls, and mini-apps.
Install
bun add spectrum-ts @spectrum-ts/imessageUse
import { Spectrum } from "spectrum-ts";
import { imessage } from "@spectrum-ts/imessage";
const spectrum = Spectrum({
providers: [imessage.config({ /* ... */ })],
});This package also exports the iMessage-specific content helpers effect, read, background, customizedMiniApp, and nativeContactCard.
nativeContactCard() shares the bot account's own contact card (Apple's "Share Name and Photo") with a chat — remote mode only:
import { nativeContactCard } from "@spectrum-ts/imessage";
await space.send(nativeContactCard());
// or the sugar form, typed on the iMessage space:
await space.shareContactCard();See the spectrum-ts documentation for the full guide.
